Re: sequential scans and the like operator

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: "Roderick A(dot) Anderson" <raanders(at)tincan(dot)org>
Cc: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: sequential scans and the like operator
Date: 2002-01-08 21:53:34
Message-ID: 20020108165334.M7451@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 08, 2002 at 10:45:25AM -0800, Roderick A. Anderson wrote:
> On Tue, 8 Jan 2002, Dave Trombley wrote:
>
> > You can always check exaclty what's being done in your queries by
> > using the EXPLAIN command. For example, to test your hypothesis:
> >
>
> >From your example I'm assuming I don't need data to test the optimizer.
> Cool! This is why I asked (and a little laziness) instead of trying it.
> No real data to populate the table with.

Uh, except that the results will be different depending on how much
data there is. If you only have three rows in the table, it's always
going to use a seqscan no matter what the indices are: it's cheaper
just to look at all the records than to read the index.

That's why VACUUM ANALYSE is so important, by the way.

A

--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roderick A. Anderson 2002-01-08 22:09:26 Re: sequential scans and the like operator
Previous Message Alaric B. Snell 2002-01-08 21:42:13 Query planner isn't using my indices