3 ms·
EXPLAIN is almost useless on mysql, but very helpful in postgres. EXPLAIN is a very useful command once you have some degree of success (users).
by pabl0rg 7y ago
EXPLAIN is almost useless on mysql, but very helpful in postgres.
EXPLAIN is a very useful command once you have some degree of success (users).
- johannes1234321 7y agoEXPLAIN with the JSON or TREE formats in MySQL got a lot better. Also MySQL's optimzer traces give lots of information more https://dev.mysql.com/doc/internals/en/optimizer-tracing.html https://dev.mysql.com/doc/internals/en/optimizer-tracing.htm...
- barrkel 7y agoMySQL's tabular explain is largely understandable once you also understand how simple its optimizer and execution mechanism is. All you mostly need to look at is the join order and indexes used, and whether there's a filesort in there, and then it's clear enough. The linear list of steps doesn't work well for a smarter engine.
- th3sly 7y agoCheck EXPLAIN ANALYZE too as it's freshly baked into MySQL https://dev.mysql.com/doc/refman/8.0/en/explain.html#explain-analyze https://dev.mysql.com/doc/refman/8.0/en/explain.html#explain... especially useful if you switch from PosgreSQL to MySQL