Friday, July 28, 2017

7 ways to convince MySQL to use the right index



Sometimes MySQL gets it wrong. It doesn't use the right index. It happens that MySQL generates a query plan which is really bad (EXPLAIN says it's going to explore some 10,000,000 rows), when another plan (soon to show how was generated) says: "Sure, I can do that with 100 rows using a key".

No comments:

How can you work with a JSON value if you know nothing about it?

I have talked about the difficulty of typing certain JSON values coming from some APIs. The JSON is just very complicated. When I do that,...