Search Postgresql Archives

Re: More records after sort

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

 



Nicolas Seinlet <nicolas@xxxxxxxxxxx> writes:
> Many thanks for the fast response. The full query plan is below, and the Dalibo link points to it as well. You're right, it's a merge join. One table doesn't have up-to-date statistics, because the table is filled during the transaction involving this query.

Sure looks like incorporating an ANALYZE into the transaction would help
matters.  This misestimation:

>                                                    ->  Seq Scan on account_invoice_line il  (cost=0.00..9885.48 rows=752 width=22) (actual time=0.049..121.238 rows=150448 loops=1)
>                                                          Filter: (display_type IS NULL)

looks like it's really hurting you, and "ANALYZE account_invoice_line"
after loading that table ought to be enough to fix that.

			regards, tom lane






[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux