Green-IT und Datenbanken - ODBMS
Green-IT und Datenbanken - ODBMS
Green-IT und Datenbanken - ODBMS
Erfolgreiche ePaper selbst erstellen
Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.
Read index map SQLUser.PART.PSIZEIDX,<br />
looping on P_SIZE (with a given set of values) and ID.<br />
6.2 Energieeffizienz <strong>und</strong> Indizes<br />
Bei der Ausführung ohne zusätzlichen Index. Zeigt der Abfrageplan 6.16, dass in<br />
Relative Kosten = 116187574<br />
Abfrageplan<br />
Call module B, which populates temp-file A.<br />
Call module F, which populates temp-file C.<br />
Read temp-file C, looping on count(PS_SUPPKEY), %SQLUPPER(P_BRAND),<br />
%SQLUPPER(P_TYPE), P_SIZE, and a counter.<br />
For each row:<br />
Output the row.<br />
module B<br />
Read master map SQLUser.PART.PARTPRIMARYIDX, looping on ID.<br />
For each row:<br />
Read master map SQLUser.PARTSUPP.PARTSUPPPRIMARYIDX, using the given PS_PARTKEY,<br />
and looping on PS_SUPPKEY.<br />
For each row:<br />
Check distinct values for %SQLUPPER(P_BRAND), P_SIZE, and %SQLUPPER(P_TYPE)<br />
using temp-file A,<br />
subscripted by a hashing of these values.<br />
For each distinct row:<br />
Add a row to temp-file A, subscripted by the hashing,<br />
with node data of P_SIZE, %SQLUPPER(P_TYPE), %SQLUPPER(P_BRAND), and<br />
PS_SUPPKEY.<br />
Check distinct values for %SQLUPPER(P_BRAND), P_SIZE, %SQLUPPER(P_TYPE), and<br />
PS_SUPPKEY using a temp-file.<br />
For each distinct row:<br />
Update the accumulated count(PS_SUPPKEY) in temp-file A,<br />
subscripted by the hashing.<br />
module F<br />
Read temp-file A, looping on the hashing subscript.<br />
For each row:<br />
Add a row to temp-file C, subscripted by count(PS_SUPPKEY), %SQLUPPER(P_BRAND),<br />
%SQLUPPER(P_TYPE), P_SIZE, and a counter,<br />
with node data of [expression] and [expression].<br />
subquery<br />
Read master map SQLUser.SUPPLIER.SUPPLIERPRIMARYIDX, using the given idkey value.<br />
Determine subquery result.<br />
Abbildung 6.16: Abfrageplan TPC-H Abfrage 16 ohne zusätzlichen Index.<br />
Modul B eine Iteration über die Tabelle part ausgeführt wird.<br />
Read master map SQLUser.PART.PARTPRIMARYIDX, looping on ID.<br />
Dies ist der der einzige Unterschied bei der Ausführung beider Abfragepläne. Die<br />
Anzahl der Datensätze, die die Bedingung für p_size erfüllen, ist 319.686 von 2 Millionen.<br />
115