Subject FB 2.1.1 slow performance with subselect
Author intellekta
Hello,
my first --1-- select takes 2,6 seconds an the result has 51 records.
i stop the second --2-- select after 25 minutes with no result.
Any suggestions about this?
Thanks in advance

--1--
select k.order_id from online_order k where k.order_date > 01.01.2009'
and k.customer = 16244 group by 1 having count(*) > 1

------ Plan info ------
PLAN (K ORDER ONLINE_ORDER_ORDERID INDEX (ONLINE_ORDER_CUSTOMER))
Adapted plan:
PLAN (K ORDER ONLINE_ORDER_ORDERID INDEX (ONLINE_ORDER_CUSTOMER))
------ Performance info ------


--2-- the second with subselect is:
select x.* from online_order x where x.order_id in
(
select k.order_id from online_order k where k.order_date > 01.01.2009'
and k.customer = 16244 group by 1 having count(*) > 1
)
order by x.order_id

------ Plan info ------
PLAN (K ORDER ONLINE_ORDER_ORDERID INDEX (ONLINE_ORDER_ORDERID,
ONLINE_ORDER_CUSTOMER))
PLAN (X ORDER ONLINE_ORDER_ORDERID)
Adapted plan:
PLAN (K ORDER ONLINE_ORDER_ORDERID INDEX (ONLINE_ORDER_ORDERID,
ONLINE_ORDER_CUSTOMER)) PLAN (X ORDER ONLINE_ORDER_ORDERID)