Any point in using LIMIT in EXISTS query?

后端 未结 3 2183
Happy的楠姐
Happy的楠姐 2021-02-19 06:53

Is there any performance benefit in adding a LIMIT to an EXISTS query, or would MySQL apply the limit on its own?

Example:

IF E         


        
3条回答
  •  一个人的身影
    2021-02-19 07:29

    This depends on how many records in your table(my_table).If records are not too much then you will not see any performance improvement but if your table has too much records then you will see the performance improvement but this will also depends on many factor as do you have index in the column those are being used in select(if you will do this then you will get the benefit of covering index also).

提交回复
热议问题