pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Vasilis Ventirozos <vendi@cosmoline.com>
Cc: Donald Fraser <demolish@cwgsy.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Are 50 million rows a problem for postgres ?
Date: Mon, 8 Sep 2003 08:21:08 -0500
Message-ID: <20030908132108.GD14906@wolff.to> (raw)
In-Reply-To: <200309081326.05261.vendi@cosmoline.com>
References: <200309081032.51586.vendi@cosmoline.com>
	<Pine.LNX.4.50.0309081014440.22692-100000@short.lancs.ac.uk>
	<001501c375f0$6d3b4eb0$1664a8c0@DEMOLITION>
	<200309081326.05261.vendi@cosmoline.com>

On Mon, Sep 08, 2003 at 13:26:05 +0300,
  Vasilis Ventirozos <vendi@cosmoline.com> wrote:
> This is a simple statement that i run
> 
> core_netfon=# EXPLAIN select spcode,count(*) from callticket group by spcode;
>                                       QUERY PLAN
> ---------------------------------------------------------------------------------------
>  Aggregate  (cost=2057275.91..2130712.22 rows=979151 width=4)
>    ->  Group  (cost=2057275.91..2106233.45 rows=9791508 width=4)
>          ->  Sort  (cost=2057275.91..2081754.68 rows=9791508 width=4)
>                Sort Key: spcode
>                ->  Seq Scan on callticket  (cost=0.00..424310.08 rows=9791508 
> width=4)
> (5 rows)

In addition to making the changes to the config file as suggested in other
responses, you may also want to do some testing with the 7.4 beta.
Hash aggreates will most likely speed this query up alot (assuming there
aren't millions of unique spcodes). The production release of 7.4 will
probably happen in about a month.



view thread (17+ messages)  latest in thread

Message-ID: <20030908132108.GD14906@wolff.to>
Permalink:  ../20030908132108.GD14906@wolff.to/
Also on:    postgresql.org/message-id/20030908132108.GD14906@wolff.to

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruno@wolff.to, vendi@cosmoline.com, demolish@cwgsy.net
  Subject: Re: Are 50 million rows a problem for postgres ?
  In-Reply-To: <20030908132108.GD14906@wolff.to>
  References: <200309081032.51586.vendi@cosmoline.com> <Pine.LNX.4.50.0309081014440.22692-100000@short.lancs.ac.uk> <001501c375f0$6d3b4eb0$1664a8c0@DEMOLITION> <200309081326.05261.vendi@cosmoline.com> <20030908132108.GD14906@wolff.to>

* 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