Subject | Re: How to handle a large 'IN' clause? |
---|---|
Author | phil_hhn |
Post date | 2005-04-10T09:22:09Z |
--- In firebird-support@yahoogroups.com, Kjell Rilbe
<kjell.rilbe@a...> wrote:
... 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...?
<kjell.rilbe@a...> wrote:
> phil_hhn wrote:block
>
> > So how should we go about handling this? One solution may be to
> > the users in the interface...which
>
> 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
> would be more efficient.Thanks Kjell
>
> 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...?