3 ms·
Almost everything is down to join order, and that's mostly down to which join order ends up with the fewest rows to process. MySQL IMHO is better for this than
by barrkel 7y ago
Almost everything is down to join order, and that's mostly down to which join order ends up with the fewest rows to process.
MySQL IMHO is better for this than Postgres because it's more predictable and you have more tools to force its behaviour, with straight_join and index hints, whereas with Postgres you're forced to use CTEs to control evaluation behaviour when you have application knowledge that the DB doesn't have stats for.
If you know nothing about how databases work, and deal in mostly simple queries, Postgres is a better choice though.