Sequential scan faster than index

Поиск
Список
Период
Сортировка
От Arthur Ramsey
Тема Sequential scan faster than index
Дата
Msg-id CAEJqy4UbHAbVJXygE1CuYuwm1ZRRK+iwgh=0VW8O3mkPwMManQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Sequential scan faster than index  (Luca Ferrari <fluca1978@gmail.com>)
Re: Sequential scan faster than index  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-general
I'm trying to figure out why a sequential scan is out performing.  I've tried psql 13.7, psql14.6 and REINDEX.  The REINDEX didn't help.  This is on an RDS instance that's a db.m5.large (2 * vCPU, 8 GB memory) with 200 storage on io1 with 10000 provisioned IOPS.  I restarted the RDS instance in between each test.

Schema: https://pastebin.com/bZvTLYGa

psql 13.7: https://pastebin.com/QtHXJtxq
psql 14.6: https://pastebin.com/PfVbCPJp
psql 14.6 with enable_seqscan=OFF: https://pastebin.com/i0g2NfUh
psql 14.6 with enable_sort=OFF: https://pastebin.com/9v9SGunw

Thanks,
Arthur

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

Предыдущее
От: Ben Chrobot
Дата:
Сообщение: Re: Query plan for "id IS NULL" on PK
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Automatic aggressive vacuum on almost frozen table takes too long