Home > database >  Table links to check one more fast or a single table to check many times fast?
Table links to check one more fast or a single table to check many times fast?

Time:10-09

Now is such,
Either single table query four times,
Either the left link six times (seven table link) check once,
Could you tell me which is fast,,,,
Left a link which is actually four tables, but a list of the same field between the three different fields of the main table,
Thank you for your bosses ~

CodePudding user response:

You can use single table query to solve four requirements, you this a few table data volume is not large, otherwise can't get outside to do matching all of the data,
So in theory, left connection is quicker, reduced the number of communication,

Impact performance is the key to on condition to have matching table index of the largest, if not match, is to take the data in the table on the left turn to the right table traversal, if the right side of the table is large that is very slow

CodePudding user response:

Data volume is not large, consider creating a view (left connection write statement)

CodePudding user response:

I also want to know, split into 10 small child table, check again combination results 10 times faster, or query a not split a large table soon?

CodePudding user response:

reference administrator reply: 3/f
I also want to know, split into 10 small child table, check again combination results 10 times faster, or query a not split a large table soon?

A query is faster, and the performance of database connection takes far outweigh it takes a query performance, try to use the same connection, the data are taken out,

CodePudding user response:

references fly me, 4/f, cloud reply:
Quote: refer to the third floor administrator reply:

I also want to know, split into 10 small child table, check again combination results 10 times faster, or query a not split a large table soon?

A query is faster, and the performance of database connection takes far outweigh it takes a query performance, try to use the same connection, the data are taken out,
that big table look up to more than 30 seconds

CodePudding user response:

reference at the fifth floor response:
Quote: refer to fly me, 4/f, cloud reply:
Quote: refer to administrator reply: 3/f

I also want to know, split into 10 small child table, check again combination results 10 times faster, or query a not split a large table soon?

A query is faster, and the performance of database connection takes far outweigh it takes a query performance, try to use the same connection, the data are taken out,
that big table look up to more than 30 seconds oh

You get a 30 s query, take out we optimize the together

CodePudding user response:

refer to 6th floor clouds fly me reply:
Quote: refer to fifth floor administrator reply:

Quote: refer to fly me, 4/f, cloud reply:
Quote: refer to the third floor administrator reply:

I also want to know, split into 10 small child table, check again combination results 10 times faster, or query a not split a large table soon?

A query is faster, and the performance of database connection takes far outweigh it takes a query performance, try to use the same connection, the data are taken out,
that big table look up to more than 30 seconds oh

You get a 30 s query, take out together we optimize the

Well, it takes 30 million data table

CodePudding user response:

reference at the 7th floor response:
Quote: refer to the sixth floor clouds fly me reply:

Quote: 5 reference building administrator reply:

Quote: refer to fly me, 4/f, cloud reply:
Quote: refer to the third floor administrator reply:

I also want to know, split into 10 small child table, check again combination results 10 times faster, or query a not split a large table soon?

A query is faster, and the performance of database connection takes far outweigh it takes a query performance, try to use the same connection, the data are taken out,
that big table look up to more than 30 seconds oh

You get a 30 s query, take out together we optimize the

Well, it needs 30 million data table

30 million data, typically from the application and logic to consider, although there are 30 million data, but a query, should be a very small part of the data and the application of index is good, also won't to 30 s

CodePudding user response:

The join table data volume is not big, not much, but if there is a big table jion2 edge, I recommend the split apart, mainly is a question of connections, when many requests are calling this a SQL, database connection will slowly filled
  • Related