Green-IT und Datenbanken - ODBMS
Green-IT und Datenbanken - ODBMS
Green-IT und Datenbanken - ODBMS
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
6 Energieoptimierungen<br />
Der restliche Teil des Abfrageplans spiegelt den oberen Select-Teil wieder <strong>und</strong> ist<br />
für uns an dieser Stelle nicht von Relevanz. Wie aus Tabelle 6.8 ersichtlich, benutzt<br />
Abfrage 8 den Index für die Spalte o_orderdate <strong>und</strong> p_type.<br />
Abbildung 6.8 zeigt den Abfrageplan für die Ausführung mit zusätzlichem Index. In<br />
Relative Kosten = 749016608<br />
Abfrageplan<br />
Call module C, which populates temp-file D.<br />
Read temp-file D, looping on [expression] and a counter.<br />
For each row:<br />
Output the row.<br />
module C<br />
Call module B, which populates bitmap temp-file A.<br />
Read bitmap temp-file A, looping on ID.<br />
For each row:<br />
Read master map SQLUser.ORDERS.ORDERSPRIMARYIDX, using the given idkey value.<br />
Read master map SQLUser.LINE<strong>IT</strong>EM.LINE<strong>IT</strong>EMPRIMARYIDX, using the given L_ORDERKEY,<br />
and looping on L_LINENUMBER.<br />
For each row:<br />
Read index map SQLUser.PART.PTYPEIDX, using the given %SQLUPPER(P_TYPE) and ID.<br />
For each row:<br />
Read master map SQLUser.SUPPLIER.SUPPLIERPRIMARYIDX, using the given idkey<br />
value.<br />
Read master map SQLUser.CUSTOMER.CUSTORMERPRIMARYIDX, using the given<br />
idkey value.<br />
Read master map SQLUser.NATION.NATIONPRIMARYIDX, using the given idkey value.<br />
Read master map SQLUser.REGION.REGIONPRIMARYIDX, using the given idkey value.<br />
Read master map SQLUser.NATION.NATIONPRIMARYIDX, using the given idkey value.<br />
Check distinct values for [expression] using temp-file C,<br />
subscripted by a hashing of these values.<br />
For each distinct row:<br />
Add a row to temp-file D, subscripted by [expression] and a counter,<br />
with node data of O_ORDERDATE, L_DISCOUNT, L_EXTENDEDPRICE,<br />
%SQLUPPER(N_NAME), the hashing, and [value].<br />
Update the accumulated sum([expression]) in temp-file C,<br />
subscripted by the hashing.<br />
Update the accumulated sum([expression]) in temp-file C,<br />
subscripted by the hashing.<br />
module B<br />
Read index map SQLUser.ORDERS.OORDERDATEIDX, looping on O_ORDERDATE (with a range<br />
condition) and ID.<br />
For each row:<br />
Add ID bit to bitmap temp-file A.<br />
Abbildung 6.8: Abfrageplan TPC-H Abfrage 8 mit zusätzlichem Index.<br />
Veränderung zu Abfrageplan 6.7 werden zwei Module abgearbeitet.<br />
Modul C ruft Modul B auf, welches eine temporäre Datei A erzeugt.<br />
Call module B, which populates bitmap temp-file A.<br />
Modul B führt eine Iteration auf dem Index über der Spalte o_orderdate aus, diese<br />
Iteration hat eine eingrenzende Auswahl, das abgefragte o_orderdate aus dem<br />
WHERE-Teil der Abfrage.<br />
104