Re: Query taking seq scan on a table - Mailing list pgsql-admin

From Avinash Kumar
Subject Re: Query taking seq scan on a table
Date
Msg-id CAN0TujdziL1CD7FFwKogObZSoe-b1rLLHUPc9m-H+GNbLm5naQ@mail.gmail.com
Whole thread Raw
In response to Query taking seq scan on a table  (Shrikant Bhende <shrikantpostgresql@gmail.com>)
Responses Re: Query taking seq scan on a table
List pgsql-admin


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 by date:

Previous
From: Shrikant Bhende
Date:
Subject: Query taking seq scan on a table
Next
From: Shrikant Bhende
Date:
Subject: Re: Query taking seq scan on a table