pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <pg@rbt.ca>
To: Valerie Schneider DSI/DEV <Valerie.Schneider@meteo.fr>
Cc: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: [GENERAL] Tuning queries on large database
Date: Thu, 05 Aug 2004 09:18:47 -0400
Message-ID: <1091711927.84496.22.camel@jester> (raw)
In-Reply-To: <200408050816.i758GxO21560@mu.meteo.fr>
References: <200408050816.i758GxO21560@mu.meteo.fr>

> so it takes about 28 Gb instead of 68 Gb !

Huzzah!

> For my different queries, it's better but less performant than oracle :

Not surprising. Oracle has a number of optimizations that we don't have
implemented at this point, particularly where aggregates are involved. 

One that PG could use, particularly for Q4, is the ability to execute a
selective sequential scan based on a read of the index -- right now it
pulls in actual data from the table structure while following the index
-- creates unnecessary disk-head movement.

The only solution to that, at the moment, is to cluster the table by
pk_data.


I am curious though, could you run the below query on both systems and
report back times?

        select 'Q4', * from data where num_poste between 600 and 625;

I'm wondering if Oracle is using a shortcut since the count(*) doesn't
actually require the data -- just knowledge of whether a matching row
exists or not.





view thread (15+ messages)  latest in thread

Message-ID: <1091711927.84496.22.camel@jester>
Permalink:  ../1091711927.84496.22.camel@jester/
Also on:    postgresql.org/message-id/1091711927.84496.22.camel@jester

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pg@rbt.ca, Valerie.Schneider@meteo.fr, chriskl@familyhealth.com.au
  Subject: Re: [GENERAL] Tuning queries on large database
  In-Reply-To: <1091711927.84496.22.camel@jester>

* 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