Shared Flashcard Set

Details

Tables Lesson 6
Tables
13
Computer Science
Undergraduate 4
09/28/2013

Additional Computer Science Flashcards

 


 

Cards

Term
partition
Definition

subdivided

table

index

view

and can be across servers!

Term
Partition function
Definition

tool to define how rows are to be partitioned

 

CREATE PARTITION FUNCTION

pfQty (int)

AS RANGE LEFT FOR VALUES (50,100)

 

so,

Partition1        Partition2      Partition3

Col<=50                col > 50 and <=100      col > 100

 

FOR RIGHT:

 

col <=50 loses its = and goes right to col > 100 (partition1 to partition3)

 

col >50 gains its = from <=100 (partition2)

 

RESULT: Col < 50  col >=50 and <100  col> =100

 

Term
partition scheme
Definition

once the function is done

 

mapping is done by a database object

 

to a set of filegroups

Term
Table
Definition

they store data

 

relational: rows and columns (intersection)

Term
Where can you use compression?
Definition

on rows

on columns but

not both at the same time

 

on data tables

 

on nonclustered indexes

 

Term

what is

sp_estimate_data_compression_savings

Definition

this is a stored procedure that came with the 2008 version

 

you can estimate space savings

 

without having to actually compress a table first

Term
how do you compress?
Definition

CREATE TABLE

ALTER TABLE

 

CREATE INDEX

ALTER INDEX

 

ALTER TABLE mytable REBUILD WITH (DATA_COMPRESSION = ROW);

 

ALTER TABLE mytable REBUILD WITH (DATA_COMPRESSION = COLUMN);

Term
Row Compression
Definition

this is the preferred compression

 

use this where data to be compressed has a higher % of unique data

Term
Page Compression
Definition

Many rows (going down)

This is to reduce redundant data

 

This is the preferred method

Use when you have repetitive data

Term

Row versus Page

Compression

Definition

Use row when you have a lot of unique data to compress

 

Use Page (many rows) when you have a lot of repetitive data to compress

Term
Sparse Column
Definition

This setting is used when you have a lot of

Rows that are null for a particular column

 

if so, make that column SPARSE

Term
Sparse Column Rules
Definition

must be nullable column

 

no constraint or ruled column

 

can't use IDENTITY

 

can't use ROWGUIDCOL

 

can't use datatypes GEOGRAPHY, GEOMETRY, TEXT, NTEXT, IMAGE, TIMESTAMP, VARBINARY(MAX), FILESTREAM

 

no alias data types

 

cannot be compressed

 

a total or computed column cannot be sparse

 

no merge replication

 

no primary key

 

no clustered index involvement

Term
when is it appropriate to use filtered indexes
Definition

use these for sparse columns

 

sparse columns should have a high percentage of null valued rows

Supporting users have an ad free experience!