Re: join to view over custom aggregate seems like it should be faster

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

 



"Merlin Moncure" <mmoncure@xxxxxxxxx> writes:
> For some reason, I can't get the index to be used on the table sitting
> under a view during a join, even though it should be, or at least it
> seems....

Nope, that's not going to work, because the aggregate keeps the subquery
from being flattened into the upper query, which is what would have to
happen for a nestloop-with-inner-indexscan join to be considered.
AFAICS you've got to structure it so that the aggregation happens above
the join.

			regards, tom lane


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux