Re: This table won't use INDEX until I DUMP/RESTORE it ?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Chris Miles <chris(at)psychofx(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: This table won't use INDEX until I DUMP/RESTORE it ?
Date: 2003-08-20 23:03:24
Message-ID: 20030820160024.X20088-100000@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Anagha Joshi 2003-08-21 05:57:23 URGENT : free result (libpq++ API)
Previous Message Priya G 2003-08-20 22:44:28 Re: This table won't use INDEX until I DUMP/RESTORE it ?