pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bernd <bernd_pg@genedata.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Select with qualified join condition / Batch inserts
Date: Fri, 15 Oct 2004 13:08:01 -0400
Message-ID: <10423.1097860081@sss.pgh.pa.us> (raw)
In-Reply-To: <200410151225.26083.bernd_pg@genedata.com>
References: <200410151225.26083.bernd_pg@genedata.com>

Bernd <bernd_pg@genedata.com> writes:
> 1/ The following query takes about 5 sec. with postrgres whereas on Oracle it
> executes in about 30 ms (although both tables only contain 200 k records in 
> the postgres version).

What does EXPLAIN ANALYZE have to say about it?  Have you ANALYZEd the
tables involved in the query?

You would in any case be very well advised to change the "numeric"
columns to integer, bigint, or smallint when appropriate.  There is
a substantial performance advantage to using the simple integral
datatypes instead of the general numeric type.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <10423.1097860081@sss.pgh.pa.us>
Permalink:  ../10423.1097860081@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/10423.1097860081@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, bernd_pg@genedata.com
  Subject: Re: Select with qualified join condition / Batch inserts
  In-Reply-To: <10423.1097860081@sss.pgh.pa.us>

* 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