Re: Postgres not using indices defined on my table with certain queries using "in" - Mailing list pgsql-novice

From Tom Lane
Subject Re: Postgres not using indices defined on my table with certain queries using "in"
Date
Msg-id 21442.1183667729@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres not using indices defined on my table with certain queries using "in"  ("s anwar" <sanwar@gmail.com>)
List pgsql-novice
"s anwar" <sanwar@gmail.com> writes:
> Thank you for your response. The actual table that will have 400
> million rows. The last time I created an index on an integer field on
> a table that size it was too big for Postgres to use (to high a cost
> of using the index). Hence, Postgres reverted back to sequential scan.

I rather doubt that you analyzed that situation correctly.  An index
being large is not a reason not to use it (since the table will also be
large, hence the seqscan cost is even higher).  However, with no details
it's impossible to guess the real reason the index wasn't being used.

            regards, tom lane

pgsql-novice by date:

Previous
From: "s anwar"
Date:
Subject: Re: Postgres not using indices defined on my table with certain queries using "in"
Next
From: Raimon Fernandez
Date:
Subject: Re: subquery with more than one column