- Архив списков рассылки pgsql-general

Поиск
Список
Период
Сортировка
От Tom Lane
Тема
Дата
Msg-id 819625.1625239352@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re:  (Igor Korot <ikorot01@gmail.com>)
Ответы Re:  (Atul Kumar <akumar14871@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Damaged (during upgrade?) table, how to repair?
Следующее
От: "W.P."
Дата:
Сообщение: Re: Damaged (during upgrade?) table, how to repair?