In Memory OLTP Tables & Natively Compiles SPs Flashcards

1
Q

When is it beneficial to use an In Memory OLTP Table?

A

With systems that process large numbers of SQL Inserts concurrently

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

When is it beneficial to use a natively compiled stored procedure?

A

With systems that process heavy calculations in T-SQL

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

Do In Memory OLTP tables have pages?

A

No

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

Are In Memory OLTP Table Transactions Pessimistic or Optimistic regarding isolation?

A

Optimistic. They use Row Versioning to handle Isolation (Snapshot isolation level)

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

Is the log file bigger or smaller with OLTP?

A

Smaller. The before and after versions of the updated rows are held in the memory table.

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

What settings need to be set to enable memory optimized tables?

A

*SET COMPATIBILITY_LEVEL >= 130
*SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON
CREATE AN OPTIMIZED FILEGROUP:
ADD FILEGROUP [GROUPNAME] CONTAINS MEMORY_OPTIMIZED_DATA
ADD FILE (NAME=’NAME’, FILENAME=’C:\PATH’) TO FILEGROUP [GROUPNAME]

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

What are the limitations of a Natively Compiled Stored Proc?

A

Can’t access disk based table

Proc must be recompiled after a restart

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

Why must you have at least 1 index for an Memory Optimized OLTP Table?

A

It is the indexes that connect the rows together

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

How often are changes to indexes on an Memory Optimized OLTP table written to disk?

A

Never. Only the data rows and changes to the data are written to disk and the log file

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

What is necessary to be able to create the Memory Optimized OLTP table with DURABILITY = SCHEMA_AND_DATA?

A

A nonclustered primary key

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

What are hash indexes good for with regard to Memory Optimized OLTP Tables?

A

Single Item Lookups

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

What shouldn’t you use hash indexes for?

A

Like/Range Operations

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

What are some issues with hash indexes?

A

Static Size determined at creation time

Can suffer from link crawling

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

Which is faster when using inequality predicates, nonclustered index or nonclustered hash index?

A

Nonclustered Index

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

What is the other name a nonclustered index for a Memory Optimized OLTP table known for?

A

Range Index (BW-TREE)

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

Do you have to specify the size of the buckets when creating a nonclustered (non hash) index?

A

No