Re: Seq Scan - Mailing list pgsql-sql

From Martín Marqués
Subject Re: Seq Scan
Date
Msg-id 01052815462000.01658@bugs
Whole thread Raw
In response to Seq Scan  (Linh Luong <linh.luong@computalog.com>)
List pgsql-sql
On Lun 28 May 2001 19:24, Linh Luong wrote:
> Hi,
>
> I am trying to execute this query I wrote and it is not returning at a
> reasonable time to the browser.  I took the query and ran EXPLAIN on it
> and it displayed that every JOIN I do it is doing a Seq Scan on it.  I
> have indexes on that table but it doesn't seem to use it.
>
> Is there a way I can ensure that postgres will use my indexes?

When Postgres doesn´t use indexes, it´s because sequencial scans are faster 
(I think the normal case would be a table with not so much rows).
AFAIK, the planer is who does this, and it uses internal data which was 
gathered during a VACUUM analyze.

So I would do a VACUUM analyze and the re-run the EXPLAIN to see what it 
shows.

Saludos... :-)

-- 
Cualquiera administra un NT.
Ese es el problema, que cualquiera administre.
-----------------------------------------------------------------
Martin Marques                  |        mmarques@unl.edu.ar
Programador, Administrador      |       Centro de Telematica                      Universidad Nacional
        del Litoral
 
-----------------------------------------------------------------


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems with pg_dump (on Debian i386)
Next
From: Najm Hashmi
Date:
Subject: ERROR: parser: parse error at or near "$1"