Subject Re: [firebird-support] Re: Limits of IN operator with Delphi 7
Author Helen Borrie
At 10:26 PM 16/11/2004 +0000, you wrote:

>I am not comfortable with using the IN operator. What is a better way
>of doing the same thing? Keep in mind I can not use a sub-query
>because the information on which record is selected comes from user
>input, not from other tables. If I have a list of records that I need
>to query, what is the most efficient way of running that query?

The way you are doing it is probably the only way, unless you create a
"permanent temporary table" for storing these numbers and implement some
kind of task id (e.g. a generator value + transaction_id) to isolate the
current transaction's numbers.

>I
>assumed the IN operator would have given the optimiser a big hint as
>to the index to use,

As I explained, the IN() operator *is* using the correct index...your IBX
components are using their own rules to reject the plan sent by the optimiser!!

>but I am happy to work the way firebird does.

?


>Also, is your book currently in stock? Is the online link you have
>posted before the best place to buy it in Aus?

Shop around. It's out of stock at EverythingLinux but I heard last week
that it was available from Dymocks in Melbourne (at full price). Apress
just ran a reprint so there are probably stockouts in some
places. IBPhoenix still has good stocks. I have a few copies so, if you
get stuck, contact me privately.

./heLen