It's very strange.
Michael, look at ORACLE help to how create plan table and how run command EXPLAIN PLAN.
MartinJ
>Hi Martin
>
>Thanks for the reply.
>
>>Who are indexes on table PROJ_HRS?
>
>There are a few indexes on this table. But none on the 'proj_cat_no' field. So I added one. This helped speed things up. I also added an index on the 5 fields that make up the WHERE clause.
>
>>Because SQL IN() is not optimalized on ORACLE?
>
>This is what I'd like to know for sure.
>
>>
>>Why Your SQL is not?
>>
>>SELECT PROJ_HRS.* FROM PROJ_HRS
>>WHERE (PROJ_HRS.proj_cat_no = 1 OR
>> PROJ_HRS.proj_cat_no = 3 OR PROJ_HRS.proj_cat_no = 6)
>> AND PROJ_HRS.atelier = 0
>> AND PROJ_HRS.accepted = 0
>> AND PROJ_HRS.refused = 0
>> AND PROJ_HRS.wrk_hrs <> 0
>>
>
>This query was just as slow as the original. The UNION query still blows them away. Even with the new indexes. But now instead of 6 times faster it's only 3 times faster.
>
>Mike