Re: Why isn't PG using an index-only scan?

Поиск
Список
Период
Сортировка
От Jean-Christophe BOGGIO
Тема Re: Why isn't PG using an index-only scan?
Дата
Msg-id 63d65775-0130-4c5c-a151-8d7728b6d4e8@thefreecat.org
обсуждение исходный текст
Ответ на Re: Why isn't PG using an index-only scan?  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Why isn't PG using an index-only scan?
Список pgsql-performance
Thanks David,

Le 18/09/2025 à 09:20, David Rowley a écrit :
> Yes. Since *all* records of "oeu" are required and they're not
> required in any particular order, then Seq Scan should be the fastest
> way to access those records.

Ok but then why is it doing it on the AD table? Is it because of the 
number of rows?

> 5 hours seems very slow for the estimated number of records. Have you
> tried running the SELECT using EXPLAIN ANALYZE without the INSERT
> part? Even if the 84 million Merge Join row estimate is accurate, 5
> hours seems excessively long.

I tried this, it took 1 second. And then I discovered that I had an old 
trigger on the copyrightad table.

The insert took 2 seconds.

Very sorry for wasting your time and thanks again for putting me on the 
right track.

Have a great day!



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