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
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).