pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: Chris Huston <chuston@bangjafwac.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Reading data in bulk - help?
Date: Wed, 10 Sep 2003 10:16:14 -0700
Message-ID: <200309101016.14652.josh@agliodbs.com> (raw)
In-Reply-To: <91D7A447-E361-11D7-A142-000393011B1A@bangjafwac.com>
References: <91D7A447-E361-11D7-A142-000393011B1A@bangjafwac.com>

Chris,

> The system is currently running on a single processor 500Mhz G4. We're
> likely to move to a two processor 2Ghz G5 in the next few months. Then
> each block may take only a 30-60 milliseconds to complete and their can
> be two concurrent blocks processing at once.

What about explaining your disk setup?   Or mentioning postgresql.conf?   For 
somebody who wants help, you're ignoring a lot of advice and questions.

Personally, I'm not going to be of any further help until you report back on 
the other 3 of 4 options.

> RELATED QUESTION: How now do I speed up the following query: "select
> distinct group_id from datatable"? Which results in a sequential scan
> of the db. Why doesn't it use the group_id index? I only do this once
> per run so it's not as critical as the fetch speed which is done 6817
> times.

Because it can't until PostgreSQL 7.4, which has hash aggregates.    Up to 
7.3, we have to use seq scans for all group bys.  I'd suggest that you keep a 
table of group_ids, instead.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (10+ messages)  latest in thread

Message-ID: <200309101016.14652.josh@agliodbs.com>
Permalink:  ../200309101016.14652.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200309101016.14652.josh@agliodbs.com

 · 

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-performance@postgresql.org
  Cc: josh@agliodbs.com, chuston@bangjafwac.com
  Subject: Re: Reading data in bulk - help?
  In-Reply-To: <200309101016.14652.josh@agliodbs.com>
  References: <91D7A447-E361-11D7-A142-000393011B1A@bangjafwac.com> <200309101016.14652.josh@agliodbs.com>

* 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