Euler Taveira de Oliveira wrote:
Mladen Gogala escreveu:
Optimizer chooses to scan each partitioned table sequentially, instead of
using the available index:

This is not a bug. How would the optimizer know that the maximum value is in
that specific partition? There is neither a global index for a partitioned
table nor an optimizer artifact to know aggregate information before scanning
all of the partitions. Maybe when we have a better support for table
partitioning such optimizer artifact would be implemented but don't hold your
breath.


Euler, optimizer is selecting a wrong path, which is a bug by definition. I am not asking the optimizer to know what is the maximum, I am asking it to select the right path, something that it isn't doing. As is visible from the original bug report, the optimizer is choosing sequential scan instead of the index scan. When only a single partition is involved, the index scan is selected, while for the entire table, sequential scan is selected for every partition.

--

Mladen Gogala Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com The Leader in Integrated Media Intelligence Solutions




--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to