Re: Query hangs (and then timeout) after using COPY to import data

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Query hangs (and then timeout) after using COPY to import data
Дата
Msg-id 53d92d3f-9957-41d5-bf0e-6c7a95866ac0@aklaver.com
обсуждение исходный текст
Ответ на RE: Query hangs (and then timeout) after using COPY to import data  (<steott@gmail.com>)
Ответы Re: Query hangs (and then timeout) after using COPY to import data
Список pgsql-general
On 2/11/24 15:13, steott@gmail.com wrote:
> Thanks, Adrian, for the suggestion, but same problem.
> 
> I've just tried to execute "ANALYZE" (on the whole database) after the import of all the tables (with COPY) and
beforethe other queries, but the query always hangs (I hope this was the way you suggested).
 

Yes, this is what I was suggesting. Anytime I see data migration and 
slow queries, my first suggestion is to run ANALYZE to get the planner 
statistics up to date. That at least eliminates one possible source of 
slowness. In this case though there seems to be something else at work, 
see Tom Lanes suggestion. This may end up requiring installing auto-explain:

https://www.postgresql.org/docs/current/auto-explain.html

to get an EXPLAIN of the query.

> 
> Stefano


-- 
Adrian Klaver
adrian.klaver@aklaver.com




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

Предыдущее
От: Greg Sabino Mullane
Дата:
Сообщение: Re: How to do faster DML
Следующее
От: Greg Sabino Mullane
Дата:
Сообщение: Re: How should we design our tables and indexes