3 ms·
can confirm. That said, one can often capture much of the performance benefit with Postgres indexes - basically, instead of trying to tightly-pack the base tab
by asah 8y ago
can confirm.
That said, one can often capture much of the performance benefit with Postgres indexes - basically, instead of trying to tightly-pack the base tables, copy the data into indexes which are tightly packed exactly as you need. Put another way, Postgres indexes are synchronously updated materialized views - and yes, the Postgres planner/optimizer will automatically answer queries from an index if it's faster and all the columns are in there.
I esp recommend reading about function and expression indexes, as well as the (new) covering indexes.
http://blog.scoutapp.com/articles/2016/05/31/3-postgresql-indexing-tricks-that-surprise-everyone http://blog.scoutapp.com/articles/2016/05/31/3-postgresql-in...
https://www.endpoint.com/blog/2013/06/10/postgresql-functional-indexes https://www.endpoint.com/blog/2013/06/10/postgresql-function...
https://paquier.xyz/postgresql-2/postgres-11-covering-indexes/ https://paquier.xyz/postgresql-2/postgres-11-covering-indexe...