index-only-scan when there is an index on all columns
With the following definition: create table t1 (a int, b int, c int); create index on t1 (a,b,c); I get the following plan for the following query: postgres=# explain select sum(c) from t1 where a > 0; QUERY PLAN --
index-only-scan when there is an index on all columns
With the following definition: create table t1 (a int, b int, c int); create index on t1 (a,b,c); I get the following plan for the following query: postgres=# explain select sum(c) from t1 where a > 0; QUERY PLAN ---