I am looking to compare indexes and further optimize my code. What I would like to do is force the query to run without an index so I can see what difference it has made. Is it possible to do this?

有帮助吗?

解决方案

Yes, you can ask the query to not use indexes by adding IGNORE INDEX (index1, index2, ...) to your query. More details can be found here.

Note: I know this is an old question and you would already have found the answer, but I hope this will help others looking for the same answer, and they wouldn't have to spend their valuable time digging through the MySQL docs.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top