Search Postgresql Archives

Re: huge discrepancy between EXPLAIN cost and actual time (but the table has just been ANALYZED)

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

 



Kent Tong <kent.tong.mo@xxxxxxxxx> writes:
> I have a complex query involving over 15 joins and a CTE query and it takes
> over 17s to complete.

If you want constructive comments about that, you're going to need to show
us the whole thing (and the underlying tables' schemas).  Little bits in
isolation are not very intelligible.

https://wiki.postgresql.org/wiki/Slow_Query_Questions

One thought is that you might need to raise from_collapse_limit and/or
join_collapse_limit to at least 15 to get the planner to do a complete
search of the join-order space.

			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