Misbehaving select
Date: Tue, 5 Nov 2013 11:56:54 +1100
Message-ID: <CAFeFPA8OOO+ney7qbp9KVsrs_ACH1=Y7NAHYKXB95VuJd49qeA_at_mail.gmail.com>
Hi All,
Oracle 10.2.0.5
AIX 6.1
We have this select statement on a table that is in a cluster by itself and
has an index on it.
if we run the following version of our select it uses the index and returns 2 rows
SELECT distinct(m.channel_number)
FROM table_x m
where m.channel_number=503
and m.metering_system_sid=53799 AND m.gmt_day = to_date('10-09-2013','dd-mm-yyyy') AND m.VERSION = 1 501 <---- wrong result as we specifically wan t only 503503
If we force it to use full table scan it returns 1 row
SELECT /*+ full(m) parallel(m 8) */ distinct(m.channel_number)
FROM table_x m
where m.channel_number=503
and m.metering_system_sid=53799 AND m.gmt_day = to_date('10-09-2013','dd-mm-yyyy') AND m.VERSION = 1
503
Which is correct. this assumes something is not quite right with index, correct?
We have dropped and recreated the index but that was no joy. I have tried to find something on metalink that would point to possible bug, but my searches have not come up with anything worthwhile.
Can anybody else shed some light on this
Jack van Zanen
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Thank you for your cooperation
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 05 2013 - 01:56:54 CET