Search Postgresql Archives

Re: Strange query plan

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

 



Am Thursday, 14. August 2008 schrieb Dmitry Teslenko:
> SELECT SUM(...) FROM table1 WHERE field3 = 'ABC' AND field1 <> 1
> 	GROUP BY field2
>
> And planner picks up a sequential scan of a table. Why does he?

Presumably because it thinks it is the best plan, and I see no reason to doubt 
that outright.  You might get better performance with an index on field3.


[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