Re: Select with qualified join condition / Batch inserts

From: "Leeuw van der, Tim" <tim(dot)leeuwvander(at)nl(dot)unisys(dot)com>
To: <matt(at)ymogen(dot)net>, "Bernd" <bernd_pg(at)genedata(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Select with qualified join condition / Batch inserts
Date: 2004-10-15 10:44:37
Message-ID: BF88DF69D9E2884B9BE5160DB2B97A85010D6E6C@nlshl-exch1.eu.uis.unisys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

But he's testing with v8 beta3, so you'd expect the typecast problem not to appear?

Are all tables fully vacuumed? Should the statistics-target be raised for some columns, perhaps? What about the config file?

--Tim

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org [mailto:pgsql-performance-owner(at)postgresql(dot)org]On Behalf Of Matt Clark
Sent: Friday, October 15, 2004 12:37 PM
To: 'Bernd'; pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Select with qualified join condition / Batch inserts

> SELECT cmp.WELL_INDEX, cmp.COMPOUND, con.CONCENTRATION
> FROM SCR_WELL_COMPOUND cmp, SCR_WELL_CONCENTRATION con
> WHERE cmp.BARCODE=con.BARCODE
> AND cmp.WELL_INDEX=con.WELL_INDEX
> AND cmp.MAT_ID=con.MAT_ID
> AND cmp.MAT_ID = 3
> AND cmp.BARCODE='910125864'
> AND cmp.ID_LEVEL = 1;

Quick guess - type mismatch forcing sequential scan. Try some quotes:
AND cmp.MAT_ID = '3'
AND cmp.BARCODE='910125864'
AND cmp.ID_LEVEL = '1';

M

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

Browse pgsql-performance by date

  From Date Subject
Next Message Gavin Sherry 2004-10-15 10:47:56 Re: Select with qualified join condition / Batch inserts
Previous Message Matt Clark 2004-10-15 10:36:35 Re: Select with qualified join condition / Batch inserts