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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: huge discrepancy between EXPLAIN cost and actual time (but the table has just been ANALYZED)
Дата
Msg-id 338272.1683553458@sss.pgh.pa.us
обсуждение исходный текст
Ответ на huge discrepancy between EXPLAIN cost and actual time (but the table has just been ANALYZED)  (Kent Tong <kent.tong.mo@gmail.com>)
Список pgsql-general
Kent Tong <kent.tong.mo@gmail.com> 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



В списке pgsql-general по дате отправления:

Предыдущее
От: Ron
Дата:
Сообщение: Re: huge discrepancy between EXPLAIN cost and actual time (but the table has just been ANALYZED)
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: "PANIC: could not open critical system index 2662" - twice