DBA > Job Interview Questions > DB2 ( IBM Database 2 ) Interview Questions

DB2 can implement a join in three ways using a m

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

DB2 can implement a join in three ways using a merge join...

Q: DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

AN:
A merge join requires that the tables being joined be in a sequence; the rows are retrieved with a high cluster ratio index or are sorted by DB2. A nested join does not require a sequence and workd best on joining a small number of rows. DB2 reads the outer table values and each time scans the inner table for matches, The hybrid join is a nested join that requires the outer table be in sequence.

(Continued on next question...)

Other Job Interview Questions