Database Reference
In-Depth Information
Now when spreading butter on your toast, you want to make sure that
you get a nice even spread across the slice. Marmite has quite a strong,
distinctive flavor, so it's even more important that you get this right. You
want to make sure that every bite you take gets a bit of everything; not too
much to be overbearing, and not too little so you can't taste it. You want it
even.ThesameappliestoPDW.Theneedtokeepthingsevenstartswiththe
database creation:
CREATE DATABASE AdventureworksPDW2012
WITH
(
REPLICATED_SIZE = nn
, DISTRIBUTED_SIZE = nn
, LOG_SIZE = nn
, AUTOGROW = ON | OFF
)
That is it! PDW handles the rest. PDW takes this information and converts
this into data definition language (DDL) that it can use to drive parallelism
in the appliance. Let's look at what CREATE DATABASE does and then each
of these properties in turn.
Create Database
Although only one CREATE DATABASE statement is fired, as shown in the
preceding code, many are created. One database is created on each compute
node, and one database is created on the control node. What is important to
understand is that their purposes differ significantly.
Thedatabasecreatedonthecontrolnodeistheretoholdthemetadataabout
the database. This database is also referred to as the shell database . Apart
from holding all thesecurity configuration, table, and procedure definitions,
it also holds all the consolidated statistics from all the other databases held
on the compute nodes. The shell database is actually very small; it holds no
user data. Its primary function is during query optimization. There's more
to come on that topic later in this chapter.
Search WWH ::




Custom Search