Re: Slow Cursor
Posted in 1998
That's funny, I don't remember writing this stuff. You should be a little more
careful with your attributions. (or is it just my memory going again?)
Is it just me that has trouble reading posts from this guy? I get equal signs
followed by hex numbers (?) in place of ".","=", and who knows what else. Is
there some font or something I have to set in my browser to get this stuff to
display properly?
June
--
june_t@hotmail.com
Lost in the wilds of Palo Alto, living on Peanut M&M's
rfurdzik@paulweiss.com wrote:
> June Tong <june_t@hotmail=2Ecom> on 09/30/98 10:35:56 PM
> Please respond to June Tong <june_t@hotmail=2Ecom>
> To: informix-list@iiug=2Eorg
> cc: (bcc: Rafal Furdzik/PaulWeiss)
> Subject: Re: Slow Cursor
>
> If you can convert this select to delete that should be much faster, subque=
> ries=20
> are usually very slow, joining tables is MUUUCH faster (that is from my=20
> experience)=2E Try This:
>
> 1) Get unmatching rows to a new table
> select A=2EPK1, B=2EPK2
> from FirstTable As A, OUTER SecondTable As B
> Into temp T1
> Where A=2EPK1=3DB=2EPK2
> AND A=2EPK2=3DB=2EPK2
> AND B=2EPK2 IS Null
>
> 2) Delete Unmatching rows from a first table
> Delete from FirstTable As A, T1 As B
> Where A=2EPK1=3DB=2EPK2
> AND A=2EPK2=3DB=2EPK2>
> It Should work, let me know I would like to know=2E
> =20
>
> > delete from FirstTable
> > where> > FirstTable=2EPK1 || FirstTable=2EPK2 not in
> > (select secondtable=2EPK1 || secondtable=2EPK2)
>
> Note: Some recipients have been dropped due to syntax errors=2E
> Please refer to the "$AdditionalHeaders" item for the complete headers=2E
>