pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martín Marqués <martin@bugs.unl.edu.ar>
To: Linh Luong <linh.luong@computalog.com>
To: pgsql-sql@postgresql.org
Subject: Re: Seq Scan
Date: Mon, 28 May 2001 15:46:20 +0300
Message-ID: <01052815462000.01658@bugs> (raw)
In-Reply-To: <3B127BC9.683CD993@computalog.com>
References: <3B127BC9.683CD993@computalog.com>

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
-----------------------------------------------------------------



view thread (2+ messages)  latest in thread

Message-ID: <01052815462000.01658@bugs>
Permalink:  ../01052815462000.01658@bugs/
Also on:    postgresql.org/message-id/01052815462000.01658@bugs

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: martin@bugs.unl.edu.ar, linh.luong@computalog.com
  Subject: Re: Seq Scan
  In-Reply-To: <01052815462000.01658@bugs>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox