Vadim wrote:
> BTW, IN is slow (currently :) - try to create 2-key index on bik (bik,
newkey)
> and rewrite your query as
>
> select * from bik b1 where EXISTS (select newkey from bik where
> bik = '....' and b1.key = newkey)
>
> And let's know... (Note, that index on (newkey, bik) may be more useful
> than on (bik, newkey) - it depends on your data).
I had tried - it really works ! I don't even try to use index for bik
(bik).
It works even when I tried "bik ~ '...'".
The one downside is I need to crunch and twist my brains to use
such SQL statemants :). Thank you.
Igor Sysoev