|< < 16 > >|

Optimizing multi-table queries

Overview

To optimize a query block that joins n tables:

Start with a plan for each table

select R.c, S.d from R join S using(r_id) where R.a = 1 and S.b = 2

Single-table plan for R

GetTableRow( SelectIndex(R_a_idx, a = 1))

Single-table plan for S

SelectScan( TableScan(S), b = 2)

|< < 16 > >|