pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Seq Scan
2+ messages / 2 participants
[nested] [flat]

* Re: Seq Scan
@ 2001-05-28 12:46  Martín Marqués <martin@bugs.unl.edu.ar>
  parent: Linh Luong <linh.luong@computalog.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Martín Marqués @ 2001-05-28 12:46 UTC (permalink / raw)
  To: Linh Luong <linh.luong@computalog.com>; 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
-----------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Seq Scan
@ 2001-05-28 16:24  Linh Luong <linh.luong@computalog.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Linh Luong @ 2001-05-28 16:24 UTC (permalink / raw)
  To: pgsql-sql

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?

Thanks again

-- 
Linh Luong
Computalog Ltd.
Software Developer
Phone: (780) 464-6686 (ext 325)
Email: linh.luong@computalog.com



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-05-28 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-28 16:24 Seq Scan Linh Luong <linh.luong@computalog.com>
2001-05-28 12:46 ` Martín Marqués <martin@bugs.unl.edu.ar>

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