I'm having a problem getting records back from the following query
select winid from ccontacts where responsibility_code like 38 and revenue in (12,14,17,19)
This does not return and any records or even an error message. I have an index on both 'responsibility_code' and 'revenue' fields. About 50% of the data has a revenue code of '12'. I would imagine that this would make the index unusable but I would have thought it would still do a table scan. It doesn't seem to be a doing a table scan because it does not return a timeout message. If I change the query to ( Just remove the '12' code ):
select winid from ccontacts where responsibility_code like 38 and revenue in (14,17,19)
I get a resultset back. Do you know why this is happening?
select winid from ccontacts where responsibility_code like 38 and revenue in (12,14,17,19)
This does not return and any records or even an error message. I have an index on both 'responsibility_code' and 'revenue' fields. About 50% of the data has a revenue code of '12'. I would imagine that this would make the index unusable but I would have thought it would still do a table scan. It doesn't seem to be a doing a table scan because it does not return a timeout message. If I change the query to ( Just remove the '12' code ):
select winid from ccontacts where responsibility_code like 38 and revenue in (14,17,19)
I get a resultset back. Do you know why this is happening?