retrieve NAME where (COUNTRY = Cuba AND AGE > 15 AND
CRIME <> political)
Q, is given below:
construct parse tree of Q
mark each leaf that refers to an indexed field
loop
for each unmarked node
if the node is an AND node with
at least one marked child
or it is an OR node with
both children marked then
mark the node
exit when no nodes were marked
end loop
if root is marked, then the indices help
What traversal method would require only a single pass through the loop,
for any parse tree, to determine whether or not the indices help answer
Q?