We have a couple of fields with regular indexes on them:
"create index index01 on table1(field01)"
"create index index02 on table1(field02)"
when I run a search like this with tsql I get a count returned quickly:
select count(MYID) on table1 where field01 > '77787676' and field02 < '81076437'
476 hits in total.
However, when I try to write out the results, it takes five minutes to do so:
select MYID on table1 where field01 > '77787676' and field02 < '81076437'
If I leave out the AND bit and run each term individually, IDs stream on the screen lighting-quick. Can you think of why the AND would slow things down so much here?
We're using Solaris version 4.00.1019027849. Thanks.
"create index index01 on table1(field01)"
"create index index02 on table1(field02)"
when I run a search like this with tsql I get a count returned quickly:
select count(MYID) on table1 where field01 > '77787676' and field02 < '81076437'
476 hits in total.
However, when I try to write out the results, it takes five minutes to do so:
select MYID on table1 where field01 > '77787676' and field02 < '81076437'
If I leave out the AND bit and run each term individually, IDs stream on the screen lighting-quick. Can you think of why the AND would slow things down so much here?
We're using Solaris version 4.00.1019027849. Thanks.