Sunday, February 21, 2016
MySQL Ignore Index
I had to use something in a MySQL query last week that I haven't needed before. IGNORE INDEX I was aware that you could do this sort of thing, but I don't recall ever using it or seeing it in use before. I have a query that joins a couple tables and looks for records with a particular foreign key value. For some values of that column it was using an index that I added specifically for this query. This was taking 1-2 seconds to run. For other values it would use a different index and take 25-30 seconds to run. I added an IGNORE INDEX for the one that I didn't want. Then it started using a different index that had the same problem, so I had to ignore that one too. Now it seems to be working quickly for all values and using the index that I want. In most cases I have found that the database is pretty good and finding indexes that work best, but I guess not in this case.
Subscribe to:
Post Comments (Atom)
Canvas Paint
Here is another small JS project that I built quite a few years ago. It was basically just an exploration of the canvas tag, which was some...

-
Some Android applications use space on your Google Drive to store data. You can't see this data by browsing drive the normal way. You ...
-
Sometimes you want to allow a limited set of HTML tags in user generated content. This can be done with the XMLValidate function in Coldf...
-
There has been a lot of talk on the subject of serializing queries using JSON. This has come up around the times of the last couple of majo...

No comments:
Post a Comment