Re: [HACKERS] I feel the need for speed. What am I doing wrong? - Mailing list pgsql-general

From Tom Lane
Subject Re: [HACKERS] I feel the need for speed. What am I doing wrong?
Date
Msg-id 8582.1041902752@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] I feel the need for speed. What am I doing wrong?  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-general
"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
>> select a."RT_REC_KEY", a."cnxarraycolumn", a."CRC" from
>> "CNX_DS_53_SIS_STU_OPT_FEE_TB" a left outer join
>> "CNX_DS2_53_SIS_STU_OPT_FEE_TB" b on ( a."RT_REC_KEY" = b."RT_REC_KEY"
>> and a."cnxarraycolumn" = b."cnxarraycolumn") where b.oid is null ;

> I suspect you get no results because it's unlikely b.oid will be null.

Try "it's impossible for b.oid to be null --- unless a dummy b row is
being provided by the LEFT JOIN".  I interpret the purpose of the query
to be to look for "a" rows that have no matching "b" row.

Using OID for this is kind of cute, I guess, since it is guaranteed
not-null in a real row; he doesn't have to think about whether any of
his regular columns are not-null.

            regards, tom lane

pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: [HACKERS] I feel the need for speed. What am I doing wrong?
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: [pgsql-advocacy] www.postgresql.org