Re: Seq Scan used instead of Index Scan

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: Gary Warner <gar(at)cis(dot)uab(dot)edu>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Seq Scan used instead of Index Scan
Date: 2011-11-23 22:42:52
Message-ID: CAGTBQpbaW_PQf-3bH5Xc6x9SSAawNsUUBRMESkRz8AKTqZ96fQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Nov 23, 2011 at 7:24 PM, Gary Warner <gar(at)cis(dot)uab(dot)edu> wrote:
> See that "Seq Scan on link_url"?  We can't figure out why that is there!  We should be scanning for a matching "urlid" and we have an index on "urlid"?
>
> When this is happening in a "two table" version of this problem, we can get temporary relief by giving the statement:
>
> set enable_seqscan = false;

Obviously, because it thinks the index scan will perform worse.

It would be interesting to see the explain analyze with
enable_seqscan=false to see why

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2011-11-24 01:30:01 Re: Seq Scan used instead of Index Scan
Previous Message Gary Warner 2011-11-23 22:24:36 Seq Scan used instead of Index Scan