index scan of whole table, can't see why - Mailing list pgsql-performance

From Dan Langille
Subject index scan of whole table, can't see why
Date
Msg-id 41EEC527.22215.A7AAF84@localhost
Whole thread Raw
Responses Re: index scan of whole table, can't see why
Re: index scan of whole table, can't see why
List pgsql-performance
Hi folks,

Running on 7.4.2, recently vacuum analysed the three tables in
question.

The query plan in question changes dramatically when a WHERE clause
changes from ports.broken to ports.deprecated.  I don't see why.
Well, I do see why: a sequential scan of a 130,000 rows.  The query
goes from 13ms to 1100ms because the of this.  The full plans are at
http://rafb.net/paste/results/v8ccvQ54.html

I have tried some tuning by:

  set effective_cache_size to 4000, was 1000
  set random_page_cost to 1, was 4

The resulting plan changes, but no speed improvment, are at
http://rafb.net/paste/results/rV8khJ18.html

Any suggestions please?

--
Dan Langille : http://www.langille.org/
BSDCan - The Technical BSD Conference - http://www.bsdcan.org/


pgsql-performance by date:

Previous
From: "Benjamin Wragg"
Date:
Subject: Re: Disk configuration
Next
From: "Benjamin Wragg"
Date:
Subject: Query performance and understanding explain analzye