Re: slow result - Mailing list pgsql-performance

From A. Kretschmer
Subject Re: slow result
Date
Msg-id 20070123105335.GD24927@a-kretschmer.de
Whole thread Raw
In response to slow result  (Laurent Manchon <lmanchon@univ-montp2.fr>)
List pgsql-performance
am  Tue, dem 23.01.2007, um 11:34:52 +0100 mailte Laurent Manchon folgendes:
> Hi,
>
> I have a slow response of my PostgreSQL database 7.4 using this query below
> on a table with 800000 rows:
>
> select count(*)from tbl;

If i remember correctly, i saw this question yesterday on an other
list...


Answer:

Because PG force a sequencial scan. You can read a lot about this in the
archives. Here some links to explanations:

http://www.pervasive-postgres.com/instantkb13/article.aspx?id=10117&cNode=0T1L6L
http://sql-info.de/postgresql/postgres-gotchas.html#1_7
http://www.varlena.com/GeneralBits/49.php


Hope that helps, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

pgsql-performance by date:

Previous
From: "Heiko W.Rupp"
Date:
Subject: Re: slow result
Next
From: "Steinar H. Gunderson"
Date:
Subject: Re: slow result