4 ms·
There's a really nice article about the Postgres query optimizer, which goes into much more detail about the algorithms used (it's likely that at least the basi
by psi-squared 10y ago
There's a really nice article about the Postgres query optimizer, which goes into much more detail about the algorithms used (it's likely that at least the basic ideas are shared with SQL server, though I can't say for sure). I really like the exposition in this:
http://jinchengli.me/post/postgres-query-opt/ http://jinchengli.me/post/postgres-query-opt/
- crench 10y agothanks for that!
- Someone 10y agoThere’s also https://www.sqlite.org/optoverview.html https://www.sqlite.org/optoverview.html and (more detailed) https://www.sqlite.org/queryplanner-ng.html https://www.sqlite.org/queryplanner-ng.html for SQLite.
- quizotic 10y agoAs a "newer" engine, SQL Server has a couple of tricks that aren't found in most other systems, including intra-query parallelism across multiple threads. This capability requires occasional reshuffling of data between threads, which makes SQL Servers internals a little more like a distributed DBMS (think Netezza/Teradata) than the wonderful, but ancient, Postgres. All of which means that SQL Server has a larger palette of execution options and some different optimization decisions than PG.