Home > database >  Mysql interview questions, please explain
Mysql interview questions, please explain

Time:09-29


The last but one do not understand, please explain, thank you

CodePudding user response:

B> 10, b like 'XXXX' % is a range, is not a specific value, followed by the use index

CodePudding user response:

Since this is the interview questions, you should directly ask your interviewer
In my opinion, if there is no further restrictions or evaluation purposes, so all can be the index of
If your second from bottom, if in terms of retrieval efficiency index using:
According to he can set up the first to understand, c can't use index:
Don't judge c established conditions associated with the original data to a table? As efficient than direct judgment efficiency in the index? You might say you have to take data associated with the original table, but I can say, you don't have to query, if the query list don't need to be connected the original table?
Even if there is an index c, how do you ensure that ab direct index + c condition index and than ABC index and set must be the result of the high efficiency? Such as a, b can filter large amounts of data, c can't filter the data clearly separate go to poor efficiency will list
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
So the final conclusion is that you should ask the interviewer, look at his assessment purpose

CodePudding user response:

On the surface can use index, but specific to the combination of application scenarios,

CodePudding user response:

The characteristics of the mysql index of joint decisions.

Joint index leftmost prefix matching principle is a very important principle, mysql will match to the right until hit range queries (& gt; , CodePudding user response:

This should take index is one of the most left prefix matching principle, just see the answer whether people understand,

The second floor, third floor is too serious,,,

CodePudding user response:

reference 4 floor VertigozZ response:
mysql index of joint characteristics decide!

Joint index leftmost prefix matching principle is a very important principle, mysql will match to the right until hit range queries (& gt; ,
are you sure this right? What's the basis?
  • Related