You need to import data to Table1

DRAG DROP
You have a table named Table1. Table1 has 1 million rows.
Table1 has a columnstore index for a column named Column1.
You need to import data to Table1. The solution must minimize the amount of time it takes to
import the data.
What should you do?
To answer, move the appropriate actions from the list of actions to the answer area and
arrange them in the correct order.

DRAG DROP
You have a table named Table1. Table1 has 1 million rows.
Table1 has a columnstore index for a column named Column1.
You need to import data to Table1. The solution must minimize the amount of time it takes to
import the data.
What should you do?
To answer, move the appropriate actions from the list of actions to the answer area and
arrange them in the correct order.

Answer: See the explanation.

Explanation:

Box 1: Create a table named Table2 by using the same schema s Table1.
Note: Table2 is the a staging table.
Box 2: Partition Table1
Box 3: Import the data to Table2.
Box 4: Create a columnstore index on Table2 for Column1.
Box 5: Switch Table2 to Table1

Note:
* An xVelocity memory optimized columnstore index, groups and stores data for each
column and then joins all the columns to complete the whole index.
Columnstore indexes can transform the data warehousing experience for users by enabling
faster performance for common data warehousing queries such as filtering, aggregating,
grouping, and star-join queries.
* Tables that have a columnstore index cannot be updated.
There are three ways to work around this problem.
A) To update a table with a columnstore index, drop the columnstore index, perform any
required INSERT, DELETE, UPDATE, or MERGE operations, and then rebuild the
columnstore index.
B) (applies in this scenario) Partition the table and switch partitions. For a bulk insert, insert
data into a staging table, build a columnstore index on the staging table, and then switch the
staging table into an empty partition. For other updates, switch a partition out of the main
table into a staging table, disable or drop the columnstore index on the staging table,
perform the update operations, rebuild or re-create the columnstore index on the staging
table, and then switch the staging table back into the main table.
C) Place static data into a main table with a columnstore index, and put new data and recent
data likely to change, into a separate table with the same schema that does not have a
columnstore index.
Reference: Best Practices: Updating Data in a Columnstore Index



Leave a Reply 2

Your email address will not be published. Required fields are marked *


ryahan

ryahan

the question is wrong You need to import data to Table1 ???

Skippo

Skippo

Question is not wrong; you need to import data into a table (Table1) that has a columnstore Index defined on it.

Because Table1 already has 1 million rows of data in it, you do not want to drop the index and re-create it; instead, you create a clone of table1 (staging table), import the data into it, add a columnstore index to the staging table, partition table1, and switch a new partition (of table1) to the staging table.