From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: Atul Kumar <akumar14871(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject:
Date: 2021-07-02 15:22:32
Message-ID: 819625.1625239352@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Igor Korot <ikorot01(at)gmail(dot)com> writes:
> On Fri, Jul 2, 2021, 5:24 AM Atul Kumar <akumar14871(at)gmail(dot)com> wrote:
>> -> Seq Scan on sam_participant pp (cost=0.00..777393.87 rows=56113 width=10) (actual time=0.277..10869.750 rows=2335154 loops=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

In response to

  • Re: at 2021-07-02 15:05:56 from Igor Korot

Responses

  • Re: at 2021-07-05 06:12:47 from Atul Kumar

Browse pgsql-general by date

  From Date Subject
Next Message W.P. 2021-07-02 17:18:12 Re: Damaged (during upgrade?) table, how to repair?
Previous Message Adrian Klaver 2021-07-02 15:16:15 Re: Damaged (during upgrade?) table, how to repair?