Subject Re: FB 2.1.1 slow performance with subselect
Author eddressel
Wanting to brush up on my SQL.... where do I find help on the new
features in 2.x? Maybe these are not 2.x issues... I'm looking at your
SQL, and it's well over my head. If there's a better place to answer
these questions, please let me know.

Specific questions:

> with temp_order(order_id) as

that creates a temp table, correct? It's only available inside the
current transaction, correct?

> and exists(select null from online_order k2
> where k2.order_date > 01.01.2009'
> and k2.customer = 16244
> and k2.rdb$db_key > k.rdb$db_key))

If I was writing this I would have probably added 'select first 1...':
would that make sense?

> select x.* from online_order x
> join temp_order t on x.order_id = t.order_id
> order by x.order_id

I thought it created a temp order, what is x.*?

Thanks
Ed Dressel