Database Reference
In-Depth Information
Figure 10.12 Importing data using the DMS and its
ExternalShuffleOperation
The only difference between a query that performs a join and an import at
this stage is that the import takes an additional step. An import persists
the data in a user-defined table residing in a user database. In contrast,
when running a Polybase query, PDW will still issue the DMS operation
ExternalShuffleOperation but will instead only bulk-insert the data
into a temporary table, in tempdb. PDW will then use that temporary table
to satisfy joins and where-predicates to answer the user query.
We can see this clearly when we compare plans. If we look at the plan in
Figure 10.9 , we can see that there are a total of13 steps. Step 5is responsible
for the insert of the rows into the table FactInternetSales_Import .
The row count of 60,398 against step 5 is a telltale sign that this
OnOperation is performing the insert. If we were to drill in, we'd have
seen that the query was a select against the temp table with a MAXDOP
1 option applied to ensure a nice, clean, contiguous write into our target.
Contrast this with Figure 10.11 and Figure 10.12 . Neither query has an
OnOperation immediately after their DMS operation. Both have moved
on to perform other steps to fully resolve their queries. For the simple
read, all that is left to do is to perform the ReturnOperation , which
streams the results back to the client. Our more complex query needs to
 
Search WWH ::




Custom Search