Re: Why the difference in plans ??

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

 



"Joost Kraaijeveld" <J.Kraaijeveld@xxxxxxxxxx> writes:
> Why the difference and can I influence the result so that the first
> query plan (which is the fastest) is actually used in both cases (I
> would expect that the limit would be done after the sort?)? 

It likes the second plan because 6694025.41/353 < 41812.78.  It would
probably be right, too, if the number of matching rows were indeed 353,
but it seems there are only 7.  Try increasing your statistics target
and re-analyzing.

			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