Subject RFC: Proposal Vulcan and Outer Merge
Author Arno Brinkman
All,

As you probably all know an OUTER JOIN does a bad job when it can't use indexes.
In this case using a OUTER MERGE approach for outer joins would certainly help, but this is only
possible for equality comparisons (same as for inner merge).

The idea is the add new rsb RsbOuterMerge into Vulcan.
This would look a little simular to the inner join merge. I could probably implement it inside the
existing RsbMerge, but i don't want to make that code more complex as it is. Also the OuterMerge can
only handle two Rsb's (outer and inner).
While some functions will be equal to RsbMerge i think the best is to create a base merge class
RsbBaseMerge, so we don't have duplicate code.

As for the PLAN (binary and text) we could use the existing "isc_info_rsb_merge" info item, but i
prefer to create a new "isc_info_rsb_outer_merge" (or whatever).
The reported PLAN in text could stay "MERGE" as we do now als for JOINs (inner and outer are
reported the same).

The sort-keys of both streams are use to compare.
I'm not sure, but could sort-keys compare different than comparing the same data in the record?
If so this meant when the sort-keys compare as equality (zero) a EVL_Boolean() call needs to be made
to check for sure.

Of course the optimizer needs to be changed so that it choose the outer merge approach when no index
is used. Which meant for an inner-stream inside a LEFT JOIN and both streams inside a FULL JOIN.

Suggestions/ideas?

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com

Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info



--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
1498 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!