29.01.2014 Views

Tutorial slides

Tutorial slides

Tutorial slides

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DB Performance: Star Schema Queries<br />

<br />

<br />

<br />

<br />

Queries on Star Schemas typically retrieve aggregates of Fact<br />

table measures (Sales Quantity/Dollars/Cost/Profit)<br />

The Query Where Clauses typically restrict Dimension Columns:<br />

Product Category, Store Region, Month, etc.<br />

Usually some Group By for Aggregation<br />

Example Query 2.1 from Star Schema Benchmark (SSB):<br />

select sum(lo_revenue), d_year, p_brand1<br />

from lineorder, date, part, supplier<br />

where lo_orderdate = d_datekey and lo_partkey = p_partkey<br />

and lo_suppkey = s_suppkey and p_category = 'MFGR#12'<br />

and s_region = 'AMERICA'<br />

group by d_year, p_brand1 order by d_year, p_brand1;<br />

38

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!