Re: Seq Scan

From: Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar>
To: Linh Luong <linh(dot)luong(at)computalog(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Seq Scan
Date: 2001-05-28 12:46:20
Message-ID: 01052815462000.01658@bugs
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)unl(dot)edu(dot)ar
Programador, Administrador | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------

In response to

  • Seq Scan at 2001-05-28 16:24:41 from Linh Luong

Browse pgsql-sql by date

  From Date Subject
Next Message tjk@tksoft.com 2001-05-28 13:29:15 Re: SQL specified sort
Previous Message Kapil Tilwani 2001-05-28 11:27:09 Query Optimisation required