Search Postgresql Archives

Re: Help with unpredictable use of indexes on large tables...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:

Also I'd suggest trying

	select year from [table] group by year

which is capable of using a hash aggregation approach; that will likely
beat either of these plans.

Just out of curiosity, why doesn't the planner consider the same plan for the OP's original query:

  select distinct year from [table]

Aren't these equivalent (except for the order)?

Thanks.

- John Burger



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux