AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.08.2009, 19:34   #1  
Blog bot is offline
Blog bot
Участник
 
25,574 / 848 (80) +++++++
Регистрация: 28.10.2006
The query below combines these three queries into one:Index Usage QueryRecent Bocking HistoryTable Information Query It can be used to just see the number of records in each table. But also by just changing "ORDER BY", it can be used to see which index cause most blocking / wait time / updates or locks. Or to compare Index Updates with Index Reads to get an idea of cost versus benefit for each index for the purpose of index tuning.So in short, one query gives you: - Index / Table Information - Index usage (benefits and costs information for each index) - Index locks, blocks, wait time and updates per read (cost/benefit). The query must be run in your NAV database. It will create a table called z_IUQ2_Temp_Index_Keys and use various Dynamic Management Views to collect information for each index into this table. First time you run it, or if you want to refresh data, you must run the whole query which may take up to a minute of two for each company in the database. After that if you just want to change sorting / get the results again, then you only need to run the last part of the query, beginning with:<span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- Select results</span></span></span></span>The last lines suggest various "ORDER BY"s that might be useful to enable instead of the default one, which is by Table Name. Lars Lohndorf-Larsen Microsoft Dynamics UK Microsoft Customer Service and Support (CSS) EMEA These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use. <span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">--use NavisionDatabase</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">IF</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">OBJECT_ID</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'z_IUQ2_Temp_Index_Keys'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'U'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">IS</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">DROP</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">TABLE</span></span></span></span><span style="font-size:10pt;line-height:100%"> z_IUQ2_Temp_Index_Keys</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">;</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- Generate list of indexes with key list</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">create</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">table</span></span></span></span><span style="font-size:10pt;line-height:100%"> z_IUQ2_Temp_Index_Keys</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">[l1] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Obj_ID] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Schema_Name] [nvarchar] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">128</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Table_Name] [nvarchar] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">128</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Row_Count] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Reserved] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Data] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_Size] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_UnUsed] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_Name] [nvarchar] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">128</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_ID] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Column_Name] [nvarchar] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">128</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_User_Updates] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_User_Reads] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Locks] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Blocks] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Block_Wait_Time] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Last_Used] [datetime] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_Type] [nvarchar] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">128</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_Column_ID] [int] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NOT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Last_Seek] [datetime] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Last_Scan] [datetime] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Last_Lookup] [datetime] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL,</span></span></span></span><span style="font-size:10pt;line-height:100%">[Index_Key_List] [nvarchar] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">MAX</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL)</span></span></span></span><span style="font-size:10pt;line-height:100%">go</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">CREATE</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">NONCLUSTERED</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">INDEX</span></span></span></span><span style="font-size:10pt;line-height:100%"> [Object_ID_Index] </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> [dbo]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">[z_IUQ2_Temp_Index_Keys]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Obj_ID] </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ASC</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%">go</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">CREATE</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">NONCLUSTERED</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">INDEX</span></span></span></span><span style="font-size:10pt;line-height:100%"> [Index_ID_Index] </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> [dbo]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">[z_IUQ2_Temp_Index_Keys]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_ID] </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ASC</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%">go</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">CREATE</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">NONCLUSTERED</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">INDEX</span></span></span></span><span style="font-size:10pt;line-height:100%"> [RowCount_ID_Index] </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> [dbo]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">[z_IUQ2_Temp_Index_Keys]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Row_Count] </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ASC</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%">go </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">insert</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">into</span></span></span></span><span style="font-size:10pt;line-height:100%"> z_IUQ2_Temp_Index_Keys</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">SELECT</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">row_number</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">()</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">over</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">order</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">by</span></span></span></span><span style="font-size:10pt;line-height:100%"> a3</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">name</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"> a2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">name</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))%</span></span></span></span><span style="font-size:10pt;line-height:100%">2 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">as</span></span></span></span><span style="font-size:10pt;line-height:100%"> l1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">a3</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">name </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> [schemaname]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">a2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">name </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> [tablename]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">rows </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">as</span></span></span></span><span style="font-size:10pt;line-height:100%"> row_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,(</span></span></span></span><span style="font-size:10pt;line-height:100%">a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">reserved </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a4</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">reserved</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">0</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))*</span></span></span></span><span style="font-size:10pt;line-height:100%"> 8 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> reserved</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">data </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">*</span></span></span></span><span style="font-size:10pt;line-height:100%"> 8 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> data</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">CASE</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">WHEN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">used </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a4</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">used</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">0</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">></span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">data </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">THEN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">used </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a4</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">used</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">0</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">-</span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">data </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ELSE</span></span></span></span><span style="font-size:10pt;line-height:100%"> 0 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">END</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">*</span></span></span></span><span style="font-size:10pt;line-height:100%"> 8 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> index_size</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">CASE</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">WHEN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">reserved </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a4</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">reserved</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">0</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">></span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">used </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">THEN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">reserved </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a4</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">reserved</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">0</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">-</span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">used </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ELSE</span></span></span></span><span style="font-size:10pt;line-height:100%"> 0 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">END</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">*</span></span></span></span><span style="font-size:10pt;line-height:100%"> 8 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> unused</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- Index Description</span></span></span></span><span style="font-size:10pt;line-height:100%">SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">name</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">Index_ID</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">index_col</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_name</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">SIC</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">),</span></span></span></span><span style="font-size:10pt;line-height:100%">SIC</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">SIC</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">Index_Column_ID</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">),</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- Index Stats</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">user_updates</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">user_seeks </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">user_scans </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">user_lookups User_Reads</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- Index blocks</span></span></span></span><span style="font-size:10pt;line-height:100%">IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">row_lock_count </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">page_lock_count </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">row_lock_wait_count </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">page_lock_wait_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">row_lock_wait_in_ms </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">page_lock_wait_in_ms</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- Dates</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">casewhen</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_seek</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'00:00:00.000'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">>=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_scan</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'00:00:00.000'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_seek</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'00:00:00.000'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">>=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_lookup</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'00:00:00.000'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">then</span></span></span></span><span style="font-size:10pt;line-height:100%"> US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_seek</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">when</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_scan</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'00:00:00.000'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">>=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_seek</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'00:00:00.000'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_scan</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'00:00:00.000'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">>=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">ISNULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_lookup</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'00:00:00.000'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">))</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">then</span></span></span></span><span style="font-size:10pt;line-height:100%"> US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_scan </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">else</span></span></span></span><span style="font-size:10pt;line-height:100%"> US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_lookup</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">end</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">as</span></span></span></span><span style="font-size:10pt;line-height:100%"> Last_Used_For_Reads</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">type_desc</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">SIC</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_column_id</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_seek</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_scan</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">last_user_lookup</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">''</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">FROM</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">SELECT</span></span></span></span><span style="font-size:10pt;line-height:100%"> ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">SUM</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">CASEWHEN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><</span></span></span></span><span style="font-size:10pt;line-height:100%"> 2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">THEN</span></span></span></span><span style="font-size:10pt;line-height:100%"> row_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ELSE</span></span></span></span><span style="font-size:10pt;line-height:100%"> 0</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">END</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> [rows]</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">SUM</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">reserved_page_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> reserved</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">SUM</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">CASEWHEN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><</span></span></span></span><span style="font-size:10pt;line-height:100%"> 2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">THEN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">in_row_data_page_count </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">lob_used_page_count </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">row_overflow_used_page_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ELSE</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">lob_used_page_count </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">row_overflow_used_page_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">END</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> data</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">SUM</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">used_page_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> used</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">FROM</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">sys.dm_db_partition_stats</span></span></span></span><span style="font-size:10pt;line-height:100%"> ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">GROUP</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">BY</span></span></span></span><span style="font-size:10pt;line-height:100%"> ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">LEFT</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">OUTER</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">JOIN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">SELECT</span></span></span></span><span style="font-size:10pt;line-height:100%"> it</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">parent_id</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">SUM</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">reserved_page_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> reserved</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">SUM</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">used_page_count</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> used</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">FROM</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">sys.dm_db_partition_stats</span></span></span></span><span style="font-size:10pt;line-height:100%"> ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">INNER</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">JOIN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">sys.internal_tables</span></span></span></span><span style="font-size:10pt;line-height:100%"> it </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">it</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> ps</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">WHERE</span></span></span></span><span style="font-size:10pt;line-height:100%"> it</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">internal_type </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">IN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">202</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">204</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">GROUP</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">BY</span></span></span></span><span style="font-size:10pt;line-height:100%"> it</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">parent_id</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">AS</span></span></span></span><span style="font-size:10pt;line-height:100%"> a4 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a4</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">parent_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)INNER</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">JOIN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">sys.all_objects</span></span></span></span><span style="font-size:10pt;line-height:100%"> a2 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> a2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">INNER</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">JOIN</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">sys.schemas</span></span></span></span><span style="font-size:10pt;line-height:100%"> a3 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">a2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">schema_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> a3</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">schema_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)inner</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">join</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">sys.indexes</span></span></span></span><span style="font-size:10pt;line-height:100%"> SI </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> a1</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">"object_id"</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)inner</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">join</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">sys.index_columns</span></span></span></span><span style="font-size:10pt;line-height:100%"> SIC </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">SIC</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> SIC</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)left</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">outer</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">join</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">sys.dm_db_index_usage_stats</span></span></span></span><span style="font-size:10pt;line-height:100%"> US </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> US</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">database_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">db_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">())left</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">outer</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">join</span></span></span></span><span style="font-size:10pt;line-height:100%"> sys.dm_db_index_operational_stats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(NULL,NULL,NULL,NULL)</span></span></span></span><span style="font-size:10pt;line-height:100%"> IStats </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ON</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">object_id</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> SI</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">index_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> IStats</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">database_id </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">db_id</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">())</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">WHERE</span></span></span></span><span style="font-size:10pt;line-height:100%"> a2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">type </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><></span></span></span></span><span style="font-size:10pt;line-height:100%"> N</span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'S'</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> a2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">.</span></span></span></span><span style="font-size:10pt;line-height:100%">type </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><></span></span></span></span><span style="font-size:10pt;line-height:100%"> N</span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">'IT'</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">order</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">by</span></span></span></span><span style="font-size:10pt;line-height:100%"> row_count </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">desc</span></span></span></span><span style="font-size:10pt;line-height:100%">go</span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- Populate key string</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">declare</span></span></span></span><span style="font-size:10pt;line-height:100%"> IndexCursor </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">cursor</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">forselect</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_Obj_ID</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_Index_ID </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">from</span></span></span></span><span style="font-size:10pt;line-height:100%"> z_IUQ2_Temp_Index_Keys</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">for</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">update</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">of</span></span></span></span><span style="font-size:10pt;line-height:100%"> Index_Key_List</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">declare</span></span></span></span><span style="font-size:10pt;line-height:100%"> @objID </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">intdeclare</span></span></span></span><span style="font-size:10pt;line-height:100%"> @IndID </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">intdeclare</span></span></span></span><span style="font-size:10pt;line-height:100%"> @KeyString </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">VARCHAR</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">MAX</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">set</span></span></span></span><span style="font-size:10pt;line-height:100%"> @KeyString </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">NULL</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">open</span></span></span></span><span style="font-size:10pt;line-height:100%"> IndexCursor</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">set</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">nocount</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">onfetch</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">next</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">from</span></span></span></span><span style="font-size:10pt;line-height:100%"> IndexCursor </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">into</span></span></span></span><span style="font-size:10pt;line-height:100%"> @ObjID</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"> @IndID</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">while</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">@@fetch_status</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> 0 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">beginset</span></span></span></span><span style="font-size:10pt;line-height:100%"> @KeyString </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">''</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">select</span></span></span></span><span style="font-size:10pt;line-height:100%"> @KeyString </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">COALESCE</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">@KeyString</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">''</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_Column_Name </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">+</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000"><span style="font-size:10pt;line-height:100%"><span style="color:#ff0000">', '</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">from</span></span></span></span><span style="font-size:10pt;line-height:100%"> z_IUQ2_Temp_Index_Keys</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">where</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_Obj_ID </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> @ObjID </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">and</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_Index_ID </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> @IndID</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">ORDER</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">BY</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_Index_ID</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_Index_Column_ID</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">set</span></span></span></span><span style="font-size:10pt;line-height:100%"> @KeyString </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">LEFT(</span></span></span></span><span style="font-size:10pt;line-height:100%">@KeyString</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff"><span style="font-size:10pt;line-height:100%"><span style="color:#ff00ff">LEN</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">(</span></span></span></span><span style="font-size:10pt;line-height:100%">@KeyString</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">-</span></span></span></span><span style="font-size:10pt;line-height:100%">2</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">)</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">update</span></span></span></span><span style="font-size:10pt;line-height:100%"> z_IUQ2_Temp_Index_Keys</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">set</span></span></span></span><span style="font-size:10pt;line-height:100%"> Index_Key_List </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> @KeyString</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">where</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">current</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">of</span></span></span></span><span style="font-size:10pt;line-height:100%"> IndexCursor</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">fetch</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">next</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">from</span></span></span></span><span style="font-size:10pt;line-height:100%"> IndexCursor </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">into</span></span></span></span><span style="font-size:10pt;line-height:100%"> @ObjID</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"> @IndID</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">end</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">;</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">close</span></span></span></span><span style="font-size:10pt;line-height:100%"> IndexCursor</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">deallocate</span></span></span></span><span style="font-size:10pt;line-height:100%"> IndexCursorgo</span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- clean up table to one line per index</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">delete</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">from</span></span></span></span><span style="font-size:10pt;line-height:100%"> z_IUQ2_Temp_Index_Keys</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">where</span></span></span></span><span style="font-size:10pt;line-height:100%"> [F_Index_Column_ID] </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">></span></span></span></span><span style="font-size:10pt;line-height:100%"> 1go</span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">-- Select results</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">select</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Table_Name] TableName</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Row_Count] No_Of_Records</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Data] Data_Size</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_Size] Index_Size</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_Name] Index_Name</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_User_Updates] Index_Updates</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_User_Reads] Index_Reads</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">casewhen</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_User_Reads </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">=</span></span></span></span><span style="font-size:10pt;line-height:100%"> 0 </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">then</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_User_Updates</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">else</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_User_Updates </span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">/</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_User_Reads</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">end</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">as</span></span></span></span><span style="font-size:10pt;line-height:100%"> Updates_Per_Read</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Locks] Locks</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Blocks] Blocks</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Block_Wait_Time] Block_Wait_Time</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Last_Used] Index_Last_Used</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[F_Index_Type] Index_Type</span><span style="font-size:10pt;line-height:100%"><span style="color:#808080"><span style="font-size:10pt;line-height:100%"><span style="color:#808080">,</span></span></span></span><span style="font-size:10pt;line-height:100%">[Index_Key_List] Index_Fields</span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">from</span></span></span></span><span style="font-size:10pt;line-height:100%"> z_IUQ2_Temp_Index_Keys</span><span style="font-size:10pt;line-height:100%"><span style="color:#008000"><span style="font-size:10pt;line-height:100%"><span style="color:#008000">--order by F_Row_Count desc, F_Table_Name, [F_Index_ID]--order by F_User_Updates desc--order by Blocks desc--order by Block_Wait_Time desc--order by Updates_Per_Read desc</span></span></span></span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">order</span></span></span></span><span style="font-size:10pt;line-height:100%"> </span><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff"><span style="font-size:10pt;line-height:100%"><span style="color:#0000ff">by</span></span></span></span><span style="font-size:10pt;line-height:100%"> F_Table_Name</span><span style="font-size:10pt;line-height:100%">[/size] [size="2"]</span> <span style="font-size:10pt;line-height:100%"> </span>Читать дальше
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 10:18.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.