Tom Lane schrieb:
Marinos Yannikos m...@geizhals.at writes:
i_a btree (a)
i_ab btree (a, b)
I suspect that these indexes are exactly the same size --- look at
pg_class.relpages or use the pg_relation_size() function to verify.
For some reason, the first one is actually about twice the size
Recent versions of PostgreSQL seem to prefer 2d indexes somehow:
for a table foo with
i_a btree (a)
i_ab btree (a, b)
SELECT * FROM foo WHERE a=123
will often use i_ab and not i_a (even right after ANALYZE). This
raises some questions:
- is there even any benefit in still having both these
Marinos Yannikos m...@geizhals.at writes:
Recent versions of PostgreSQL seem to prefer 2d indexes somehow:
for a table foo with
i_a btree (a)
i_ab btree (a, b)
SELECT * FROM foo WHERE a=123
will often use i_ab and not i_a (even right after ANALYZE).
I suspect that these indexes are exactly