Got some fairly hefty tables in a DB at work and from time to time (rarely) I need to look through them when something goes a bit wonky.
I have been using;
This is taking an age, so I altered it slightly;
My thinking would be that it'd short-circuit and speed up a lot. It did not.
Is there a way to get MySQL to short-circuit? Is there a better way of doing what I'm trying to do? I cannot alter the DB structure at this time.
I have been using;
Code:
SELECT * FROM table WHERE cData LIKE '%search_term%' ORDER BY dtCreated DESC;
This is taking an age, so I altered it slightly;
Code:
SELECT * FROM table WHERE dtCreated > '2010-12-01 00:00:00' AND cData LIKE '%search_term%' ORDER BY dtCreated DESC;
My thinking would be that it'd short-circuit and speed up a lot. It did not.
Is there a way to get MySQL to short-circuit? Is there a better way of doing what I'm trying to do? I cannot alter the DB structure at this time.