pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Chris Miles <chris@psychofx.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: This table won't use INDEX until I DUMP/RESTORE it ?
Date: Wed, 20 Aug 2003 16:03:24 -0700 (PDT)
Message-ID: <20030820160024.X20088-100000@megazone.bigpanda.com> (raw)
In-Reply-To: <3F425458.2020802@psychofx.com>


On Tue, 19 Aug 2003, Chris Miles wrote:

> I have a DB that appears to perform badly.  A test of one table
> with one of the typical queries gives me a query plan indicating
> a Seq Scan;
>
>  DB=# EXPLAIN select pcref,pcseqnbr from catrecrel where
> pcbsref='something' and (pccaref is null or pccaref='') and pcpar is
> null order by pcseqnbr ;
>  NOTICE:  QUERY PLAN:
>
>  Sort  (cost=38266.65..38266.65 rows=4 width=58)
>    ->  Seq Scan on catrecrel  (cost=0.00..38266.61 rows=4 width=58)

What does it give if you set enable_seqscan=off; before the explain?
And what does explain analyze give both with seqscan disabled and enabled?

Also, what version are you running?






view thread (7+ messages)  latest in thread

Message-ID: <20030820160024.X20088-100000@megazone.bigpanda.com>
Permalink:  ../20030820160024.X20088-100000@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20030820160024.X20088-100000@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, chris@psychofx.com
  Subject: Re: This table won't use INDEX until I DUMP/RESTORE it ?
  In-Reply-To: <20030820160024.X20088-100000@megazone.bigpanda.com>
  References: <3F425458.2020802@psychofx.com> <20030820160024.X20088-100000@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox