Each operation would
store its
result on
disk
(= materialized as a relation)
Subsequent operators read
the result of its
predecessor from
disk
Note:
It was not so long ago that
materialization
was the only way to
execute a query....
(because computer memory used to be
very expensive and a
computer has very littlemain memory....)
More efficient way to process a query
More efficient way:Pipelining
Interleave the
execution of
alloperators
in the query plan
All operators
are activeunless they are
blocked waiting
for
input data
Tuples produced by
an operator is
passed directly
to its
successor (consumer)
(without storing
the data on disk)
Caveat:
Pipelining has
a higher requirement
on memory buffers
I.e.:
Pipelining will
needmorememory buffers
If there are
insufficient buffers,
then pipelining will cause:
thrashing !!!
Thrashing is
when the virtual memory management system
swaps
memory pages (buffers)
in and out to
diskmany many times
during the execution of the program)
Result:
Poor performance
(In fact, the performance of
pipelining can be
worst than
materialization if
thrashing is
severe)