>I am having trouble getting this sql to speed up.
>
>This sql works fine. I have an index tag on CIREGNUMB.
>
>Sele * from mytable;
> WHERE mytable.ciregnumb = lcVar
>
>Because of the tag, the query is instant.
>
>But if I want to add a sub query it bogs down.
>
>Sele * from mytable;
> WHERE mytable.ciregnumb in ;
> (sele ciregnumb from mysmalltable)
>
>Ideas on why this slows down to a crawl? I use subqueries all the time and I can't figure this one out.
>
>Thanks.
>Terrence
How about changing this to a two-table-join? You don't need to include fields from table MySmallTable.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)