*** Welcome to piglix ***

Nested loop join


A nested loop join is a naive algorithm that joins two sets by using two nested loops. Join operations are important to database management.

Two relations and are joined as follows:

This algorithm will involve nr*bs+ br block transfers and nr+br seeks, where br and bs are number of blocks in relations R and S respectively, and nr is the number of tuples in relation R.

The algorithm runs in I/Os, where and is the number of tuples contained in and respectively and can easily be generalized to join any number of relations.


...
Wikipedia

...