Re: Performance question
Posted in 1998
In article <6d3o58$ntm$1@news.xmission.com>, Guillermo Labatte
<labatteg@usa.net> writes
>
>Hi,
>I have been told that
>
>select * from table1 where col between value1 and value2>
>is faster than
>
>select * from table1 where col>=value1 and col<=value2>
Proably little difference. I just prefer the first syntax as it is
clearer what you mean..
>Is that true for Online 5.07?
>
>How about
>
>select * from table1 where col in (value1,value2,value3,value4, ...)>
That will do a sequential scan of the table
>vs
>
>select * from table1 where col=value1 or col=value2 or col=value3 or ...>
and so will that
instead do
select * from table1 where col1=value1
union
select * from table1 where col1=value2
union
select * from table1 where col1=value3
union
select * from table1 where col1=value4
Or course with PDQ enabled the way this can be parallelized is more
obvious to the engine...
Can anyone confirm that with PDQPRIORITY=1 i.e. parallel scans
that unions are scanned in parallel?
>?
>
>Thanks
>
--
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