Re: Query taking seq scan on a table

Поиск
Список
Период
Сортировка
От Shrikant Bhende
Тема Re: Query taking seq scan on a table
Дата
Msg-id CAMTQpJCrPLcbw6vmR2i8S6qbXVG3bLioTG7aCBm1JkBHoFtmrw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query taking seq scan on a table  (Avinash Kumar <avinash.vallarapu@gmail.com>)
Ответы Re: Query taking seq scan on a table  (Avinash Kumar <avinash.vallarapu@gmail.com>)
Список pgsql-admin
Hello,

show seq_page_cost;   1

show random_page_cost; 4

storage type : SSD 

Table size : 39 GB 

There are no columns added, also I haven't found anything where we need to update the data for older rows.

Thanks 

On Sun, Sep 20, 2020 at 6:55 PM Avinash Kumar <avinash.vallarapu@gmail.com> wrote:


On Sun., Sep. 20, 2020, 10:19 a.m. Shrikant Bhende, <shrikantpostgresql@gmail.com> wrote:
Hello all, 

I am facing issues with one of the queries running on Amazon Aurora (PG VERSION 9.6) which is taking more than a minute to complete. As per the initial investigation I assume that one part of the query is taking a sequential scan on a table("wldbowner.member") which is consuming most of the execution time. I tried to use index (Btree and GIN ) as well but none of them were helping to get the query to run faster. Attached is the query along with the explain analyze of the same, any help on the same would be appreciated. 

NOTE : I have done the vacuum on the table already to get rid of bloat issues.
             Reindex and test with more work mem is also helping.
Just wanted to clarify one thing before looking at the query. 

What is random_page_cost set to ? 


Thanks and regards


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

Предыдущее
От: Avinash Kumar
Дата:
Сообщение: Re: Query taking seq scan on a table
Следующее
От: Avinash Kumar
Дата:
Сообщение: Re: Query taking seq scan on a table