Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8i and poor query performance in some queries
"Noel" <tbal_at_go2.pl> wrote in message news:<bn3dah$jso$1_at_inews.gazeta.pl>...
> Does:
> select id from a1
> minus
> select id from a2;
> takes so much time, eigher??
Tried this one:
select count(*) from (
select id from a1
minus
select id from a2
);
It executes in 0,08 seconds! And the row counts in plan seem more realistic now. The total cost is 560, compared to earlier 109, but the query executes 25212,5 times faster than the earlier one. Quite a peformance gain!
Now the problem seems to be an optimizer problem.
-- HeikkiReceived on Wed Oct 22 2003 - 02:31:30 CDT