Subject Re: How to handle a large 'IN' clause?
Author phil_hhn
--- In firebird-support@yahoogroups.com, Kjell Rilbe
<kjell.rilbe@a...> wrote:
> phil_hhn wrote:
>
> > So how should we go about handling this? One solution may be to
block
> > the users in the interface...
>
> Store the list in a temporary table and refer to that table in your
> select, either by using an in clause or an inner join. Not sure
which
> would be more efficient.
>
> Kjell

Thanks Kjell

... but even if the data is in a temporary table, would that not still
give me a problem when I select over 1500 records in the 'in' clause?
When the user selects some records this is completely arbitrary and
there is no database relationship that can cater for this.

Unless you meant that I should put all the selected records into a
temp table (Hmmm, I wonder how quick that'd be...) and select all PKs
from that as the argument in the original querys 'in' clause...?