Re: Wierd Explain

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Varun Kacholia <varunk(at)cse(dot)iitb(dot)ac(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Wierd Explain
Date: 2002-06-18 08:34:25
Message-ID: 20020618183425.B2786@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 18, 2002 at 12:33:26PM +0530, Varun Kacholia wrote:
> hi ,
> Many ppl have suggested me vaccum analyze .
> But the manuals say me that it is reqd after "major update/deletion".
> I have just 'created' the tables and done fresh insertions.
> is it still required?
> BTW i am using 7.1.3 ... seems it does not support analyze :(.

Fresh inserts would count as "major" since now there are values and before
there wern't :).

Anyway, a vacuum analyze is recommended anything you think the planner is
doing something wrong. Prior to 7.2 you could only do the analyze with a
vacuum, in 7.2 it was separated out

Also, EXPLAIN VERBOSE could be helpful also.

> On Mon, Jun 17, 2002 at 11:17:06PM +0200, Jochem van Dieten wrote:
> > Varun Kacholia wrote:
> > > hi ,
> > > I have just migrated to PostgreSQL...and found the following wierd :
> > >
> > > suryadb=# explain select * from dbwin where id in (select id from wdwin
> > > where word='bacd');
> > > NOTICE: QUERY PLAN:
> > > Seq Scan on dbwin (cost=0.00..8158.20 rows=1000 width=76)
> >
> > 1000 rows should trigger the obvious question: did I run vacuum analyze?
> >
> > Jochem

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Henrik Steffen 2002-06-18 09:15:04 Re: Serious Crash last Friday
Previous Message Martijn van Oosterhout 2002-06-18 08:30:57 Re: Enclosing values in single quotes