- Mailing list pgsql-general

From Tom Lane
Subject
Date
Msg-id 819625.1625239352@sss.pgh.pa.us
Whole thread Raw
In response to Re:  (Igor Korot <ikorot01@gmail.com>)
Responses Re:
List pgsql-general
Igor Korot <ikorot01@gmail.com> writes:
> On Fri, Jul 2, 2021, 5:24 AM Atul Kumar <akumar14871@gmail.com> wrote:
>> ->  Seq Scan on sam_participant pp  (cost=0.00..777393.87 rows=56113 width=10) (actual time=0.277..10869.750
rows=2335154loops=1) 
>>       Filter: ((igroupid)::integer = (current_setting('env.groupid'::text))::integer)

>> I have already an index on the column igroupid of table
>> sam_participant, but still it is doig seq scan, which is time
>> consuming or is their something else is fishy.

Where is that cast to integer coming from?  That's likely causing
the WHERE clause to not match your index.  What's the actual type
of the igroupid column?

            regards, tom lane



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Damaged (during upgrade?) table, how to repair?
Next
From: "W.P."
Date:
Subject: Re: Damaged (during upgrade?) table, how to repair?