SE の雑記

SQL Server の情報をメインに Microsoft 製品の勉強内容を日々投稿

Author Archive

いちからはじめる Memory Optimized Table その 7

leave a comment

Memory Optimized Table にはいくつかの制限があります。
今回はその制限について少しまとめてみたいと思います。

BOL には SQL Server Support for In-Memory OLTP にまとめられています。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 22nd, 2013 at 6:47 am

Posted in SQL Server

Tagged with ,

いちからはじめる Memory Optimized Table その 6

leave a comment

ここまで Memory Optimized Table について数回書いてきました。
ここで一度 Memory Optimized Table のデータストレージの基本構成をまとめてみたいと思います。

Memory Optimized Table の構成を理解するためには以下のポイントを押させておく必要がありそうです。

  • メモリ上のデータ構成
  • チェックポイントファイルのデータ構成

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 21st, 2013 at 1:09 pm

Posted in SQL Server

Tagged with ,

SQL Server のセキュリティを調査するためのサンプルクエリ

leave a comment

クラウドで提供されている SQL Server の権限周りを調べたくていくつかのサンプルクエリを作ってみました。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 20th, 2013 at 1:09 pm

Posted in SQL Server

Tagged with

デッドロックのサンプルクエリ

2 comments

デッドロックのテストをする際のサンプルクエリなどを。

BOL では、デッドロック を確認するとよいかと思います。
第 3 章 トランザクション分離レベルの選択とデッドロックの問題~ SQL Server 2000 における Web アプリケーション開発 ~  も参考になります。

今回は以下のデッドロックを発生させるためのサンプルクエリとなっています。

  • サイクルデッドロック
  • 変換デッドロック
  • インデックス間デッドロック

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 15th, 2013 at 3:35 pm

Posted in SQL Server

Tagged with

ロックリソースを取得する仮想列

leave a comment

The Curious Case of the Dubious Deadlock and the Not So Logical Lock  や Undocumented Virtual Column: %%lockres% を見て初めて知りました。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 14th, 2013 at 7:54 pm

Posted in SQL Server

Tagged with

いちからはじめる Memory Optimized Table その 5

leave a comment

Memory Optimized Table のメモリ上ですが通常のデータベースページとは異なる領域として取得がされるようです。

以下は 900MB 程度のデータを Memory Optimized Table に格納した際のメモリの利用状態を SQL Server:Memory Manager から取得したものになります。
image

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 11th, 2013 at 11:52 pm

Posted in SQL Server

Tagged with ,

いちからはじめる Memory Optimized Table その 4

leave a comment

Memory Optimized Table のデータの実体はメモリ上に配置されることになります。
データの永続性の指定として DULABILITY = SCHEMA_ONLY / SCHEMA_AND_DATA を設定し、永続化をするかを指定することになります。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 11th, 2013 at 8:58 am

Posted in SQL Server

Tagged with ,

いちからはじめる Memory Optimized Table その 3

leave a comment

Memory Optimized Table を作成する際には以下のようなクエリでテーブルを作成します。
# CREATE TABLE のサンプルは Creating a Memory Optimized Table に記載されています。

CREATE TABLE MemTable
(
Col1 int NOT NULL,
Col2 nchar(450) COLLATE Japanese_XJIS_100_BIN2 NOT NULL INDEX NCIX_MemTable_col2 HASH (Col2) WITH (BUCKET_COUNT = 1024),
Col3 int,
CONSTRAINT PK_MemTable PRIMARY KEY NONCLUSTERED HASH (Col1) WITH (BUCKET_COUNT = 100)
) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA)
GO

Memory Optimized Table を使用するためには WITH 句 で指定をする必要があります。
Read the rest of this entry »

Written by Masayuki.Ozawa

7月 10th, 2013 at 11:40 pm

Posted in SQL Server

Tagged with ,

いちからはじめる Memory Optimized Table その 2

leave a comment

前回は基本的な構成について確認してみました。
今回はログファイルについてみていきたいと思います。

Read the rest of this entry »

Written by Masayuki.Ozawa

7月 10th, 2013 at 9:49 am

Posted in SQL Server

Tagged with ,

いちからはじめる Memory Optimized Table その 1

leave a comment

SQL Server 2014 で実装される Memory Optimized Table (Hekaton) をじっくり勉強していきたいと思います。
勉強するにあたっては以下の情報が参考になります。
# 日本語だとメモリ最適化テーブルとかになるんですかね??
Books Online
In-Memory OLTP (In-Memory Optimization)
TechEd North America 2013
Microsoft SQL Server In-Memory OLTP: Overview of Project “Hekaton”
Microsoft SQL Server In-Memory OLTP Project “Hekaton”: Management Deep Dive
Microsoft SQL Server In-Memory OLTP Project “Hekaton”: App Dev Deep Dive
TechEd Europe 2013
Microsoft SQL Server 2014 In-Memory OLTP: Overview
Microsoft SQL Server 2014 In-Memory OLTP: DB Developer Deep Dive
Microsoft SQL Server 2014 In-Memory OLTP: Management Deep Dive
ホワイトペーパー
SQL Server In-Memory OLTP Internals Overview for CTP1
Microsoft research
Hekaton: SQL Server’s Memory-Optimized OLTP Engine
High-Performance Concurrency Control Mechanisms for Main-Memory Databases
@IT
SQL Server 2014 処理高速化の仕掛け/Redshiftの先行評価の内容とは? (1/2)
Read the rest of this entry »

Written by Masayuki.Ozawa

7月 8th, 2013 at 11:19 pm

Posted in SQL Server

Tagged with ,