Partitioned Views Flashcards

1
Q

What is a partitioned View?

A

They are views that allow the data in a large table to be split into smaller member tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What version of SQL Server is table partitioning available?

A

Enterprise

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What can be done in Standard edition for partitioning a table?

A

By using a partitioned view

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is the data partitioned between tables?

A

It is based on ranges of data values in one of the columns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is required for the ranges for a column for the view to be able to select specific tables only?

A

A check constraint is required on the partitioning column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is the view set up with the partitioned tables?

A

By using UNION ALL:

CREATE VIEW VIEWNAME AS
SELECT * FROM TABLE1PART1
UNION ALL
SELECT * FROM TABLE1PART2
UNION ALL 
SELECT * FROM TABLE1PART3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can you perform updates on a partitioned view?

A

The partitioning column MUST be part of the primary key of the base table. If not, then you must use an INSTEAD OF trigger to perform updates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What happens if you don’t have check constraints on the partitioned columns?

A

The query optimizer cannot guarantee that records don’t exist in each of the partitioned tables so it results in table scans of each one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is it called when all of the member tables referenced by a partitioned view are on the same server?

A

A Local Partitioned View

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is it called when all of the member tables referenced by a partitioned view are on multiple servers?

A

A Distributed Partitioned View

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the benefit of a Distributed Partitioned View over a Local Partitioned View?

A

Distributed Partitioned Views can be used to spread the database processing load of a system across a group of servers.

They also make it easier to maintain the member tables independently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What can you use to create Insert statements with execution plans that have a significant chance of being reused in systems with many concurrent users?

A

SP_EXECUTESQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Is BULK IMPORTING supported using BCP or BULK INSERT or SELECT * FROM OPENROWSET(BULK…)?

A

No, the only way to insert multiple records in to a partitioned view is by using an INSERT statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly