pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Russell Smith <mr-russ@pws.com.au>
To: Gavin Sherry <swm@linuxworld.com.au>
Cc: Bernd <bernd_pg@genedata.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Select with qualified join condition / Batch inserts
Date: Wed, 20 Oct 2004 09:18:57 +1000
Message-ID: <200410200918.57761.mr-russ@pws.com.au> (raw)
In-Reply-To: <Pine.LNX.4.58.0410152043320.30125@linuxworld.com.au>
References: <200410151225.26083.bernd_pg@genedata.com>
	<Pine.LNX.4.58.0410152043320.30125@linuxworld.com.au>

On Fri, 15 Oct 2004 08:47 pm, Gavin Sherry wrote:
> On Fri, 15 Oct 2004, Bernd wrote:
> 
> > Hi,
[snip]

> > Table-def:
> >         Table "public.scr_well_compound"
> >    Column   |          Type          | Modifiers
> > ------------+------------------------+-----------
> >  mat_id     | numeric(10,0)          | not null
> >  barcode    | character varying(240) | not null
> >  well_index | numeric(5,0)           | not null
> >  id_level   | numeric(3,0)           | not null
> >  compound   | character varying(240) | not null
> > Indexes:
> >     "scr_wcm_pk" PRIMARY KEY, btree (id_level, mat_id, barcode, well_index)
> 
numeric is not optimized by postgresql like it is by Oracle.  You will get much better
performance by changing the numeric types to int, big int, or small int.

That should get the query time down to somewhere near what Oracle is giving you.

Regards

Russell Smith.



[snip]



view thread (7+ messages)

Message-ID: <200410200918.57761.mr-russ@pws.com.au>
Permalink:  ../200410200918.57761.mr-russ@pws.com.au/
Also on:    postgresql.org/message-id/200410200918.57761.mr-russ@pws.com.au

 · 

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: mr-russ@pws.com.au, swm@linuxworld.com.au, bernd_pg@genedata.com
  Subject: Re: Select with qualified join condition / Batch inserts
  In-Reply-To: <200410200918.57761.mr-russ@pws.com.au>

* 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