Re: union all vs. left outer join

From: <henrik.sorensen_at_balcab.ch>
Date: Tue, 08 Nov 2005 00:15:31 +0000
Message-ID: <dkoitg$upp$2_at_news.hispeed.ch>


vc wrote:

>
> henrik.sorensen_at_balcab.ch wrote:

>> Warning long mail ...
>>
>> For several days I have tried to figure out why two sql with an union all
>> is much faster than using a single sql with left outer join.

>
>
> What do you mean much faster ? In Oracle, both queries execute in
> approximately the same time ~15-16 msec.
Sorry for not being more precise.
The queries with the provided test data does of course not present any serious database engine with any problems.

The test case is reduced from a production system where each table have 200'000 records, and hence the materialization of the tables A-B-C is performing very very badly.

>
>

>> Henrik Received on Tue Nov 08 2005 - 01:15:31 CET

Original text of this message