Subject Re: [firebird-support] Slow IN operator
Author Michael Stover
I second this question and moreover:

A query such as

select field from (4 joined tables) where field=x

takes about .01 seconds.

a query such as

select field from (4 joined tables) where field in (x,y)

takes over 30 seconds. And:

select field from (4 joined tables) where field=x or field=y

also takes over 30 seconds. There are roughly 500,000 rows in the main
table being queried. These results make certain obvious query types
impossible to use.

-Mike Stover

On Tue, 2005-12-20 at 12:20 +0000, jasajona wrote:
> Hello,
>
> I use something like this:
> ...
> Where field1 in (select field2 from table2)
>
> table2 has about 50 records. Why does it so dramaticly slow down
> query, even if I write all these values without doing subselect.
>
> Next question. If subselect is constant (like in my example), how many
> times firebird executes it?