Re: This table won't use INDEX until I DUMP/RESTORE it ? - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: This table won't use INDEX until I DUMP/RESTORE it ?
Date
Msg-id 20030820160024.X20088-100000@megazone.bigpanda.com
Whole thread Raw
In response to This table won't use INDEX until I DUMP/RESTORE it ?  (Chris Miles <chris@psychofx.com>)
Responses Re: This table won't use INDEX until I DUMP/RESTORE it ?
List pgsql-admin
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?




pgsql-admin by date:

Previous
From: "Priya G"
Date:
Subject: Re: This table won't use INDEX until I DUMP/RESTORE it ?
Next
From: "Anagha Joshi"
Date:
Subject: URGENT : free result (libpq++ API)