<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>utiowa</author_name>
  <author_url>https://blog.hatena.ne.jp/utiowa/</author_url>
  <blog_title>小物SEのメモ帳</blog_title>
  <blog_url>https://memorandom-nishi.hatenablog.jp/</blog_url>
  <categories>
    <anon>SQL Server</anon>
  </categories>
  <description>実行プランでCWT_PrimaryKeyというテーブルを参照していることがありますが、どのようなものか気になり調べてみました。これは静的カーソルの結果セットを保存するtempdbのワークテーブルのようです。静的カーソルは、カーソルを開いた時点の結果をtempdbへ一旦退避し、後続処理ではそれをFETCHして参照することで、カーソル処理中の処理対象への変更有無に関わらず、開いた時点の情報で処理をすることができます。このときの静的カーソルの結果セットの格納先がtempdbのCWT_PrimaryKeyとなります。 テスト用データ作成 テスト用にテーブルとレコードを作成します。 CREATE DAT…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmemorandom-nishi.hatenablog.jp%2Fentry%2F2017%2F07%2F21%2F030236&quot; title=&quot;【SQL Server】tempdbのCWT_PrimaryKeyとは - 小物SEのメモ帳&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/u/utiowa/20170721/20170721025251.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-07-21 03:02:36</published>
  <title>【SQL Server】tempdbのCWT_PrimaryKeyとは</title>
  <type>rich</type>
  <url>https://memorandom-nishi.hatenablog.jp/entry/2017/07/21/030236</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
