Re: slow result

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: slow result
Date: 2007-01-23 10:53:35
Message-ID: 20070123105335.GD24927@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • slow result at 2007-01-23 10:34:52 from Laurent Manchon

Browse pgsql-performance by date

  From Date Subject
Next Message Steinar H. Gunderson 2007-01-23 10:55:41 Re: slow result
Previous Message Heiko W.Rupp 2007-01-23 10:43:16 Re: slow result