Re: SELECT subquery much slower than IN ( list...)???
Posted in 1998
In article <350413D1.28B8@ictest.delcoelect.com>, Matt Reprogle
<mcreprog@ictest.delcoelect.com> writes
>David Williams wrote:
>>
>> What happens if you use a join instead of a subquery?
>
>OK, I did this:
>
>select l_key, max(h_seq)
>from l_temp_tab t, h_tab h
>where t.temp_l = h.l_key
>group by l_key
>into temp last_temp
with no log..
Remeber this will still require a disk I/O to access the temporary
table. Online also needs to access systable,syscolumns,systabauth,
syscolauth etc. Tables have structures to be access, locks to be taken
out, security ot be checked etc..
>
>and I get a result in 25.8 seconds. Better than 7 minutes, but
>it's not 2 seconds, either.
>
>BTW, since someone asked, the table is not fragmented.
>
>Matt Reprogle
>IS Engineer, Delphi Delco Electronics Systems
>phone:(765)451-9651 FAX: (765)451-8230
>mcreprog@ictest.delcoelect.com
--
David Williams
Maintainer of the Informix FAQ
Primary site (Beta Version) http://www.smooth1.demon.co.uk
Official site http://www.iiug.org/techinfo/faq/faq_top.html
I see you standin', Standin' on your own, It's such a lonely place for you, For
you to be If you need a shoulder, Or if you need a friend, I'll be here
standing, Until the bitter end...
So don't chastise me Or think I, I mean you harm...
All I ever wanted Was for you To know that I care