Re: PostgreSQL performance issues

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: Willo van der Merwe <willo(at)studentvillage(dot)co(dot)za>, pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL performance issues
Date: 2006-08-29 15:15:33
Message-ID: 20060829151533.GA7586@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

am Tue, dem 29.08.2006, um 16:55:11 +0200 mailte Willo van der Merwe folgendes:
> >>4 1/2 seconds for a count(*) ? This seems a bit rough - is there anything
> >>else
> >>
> >
> >Because of MVCC.
> >http://www.thescripts.com/forum/thread173678.html
> >http://www.varlena.com/GeneralBits/120.php
> >http://www.varlena.com/GeneralBits/49.php
> >
> >
> >Andreas
> >
> Hi Andreas,
>
> Thanks for your prompt reply. I understand why this is a sequential
> scan, I'm just a bit perturbed that it takes 4.5 seconds to execute said
> scan. The table is only 750,000 records big. What happens when this
> table 7 million records big? Will this query then take 45 seconds to
> execute?

How often do you need a 'select count(*) from big_table'?

I assume, not frequently. And if you need realy this, you can write a
trigger or read the statistics for the table.

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Junaili Lie 2006-08-29 17:56:50 Re: slow i/o
Previous Message Jignesh K. Shah 2006-08-29 15:10:56 Re: slow i/o