在[primary]和[其他]和模糊选项上[sort_in_tempdb]



我读了这篇文章[主]的意思是什么?

我想知道如何通过使用SQL脚本获得文本"PRIMARY"或任何其他文件组名称。我还研究了CREATE table的语法,并查看SORT_IN_TEMPDB,并尝试在MS SMS中查询中搜索它,但找不到它在哪里。

  1. select OBJECT_NAME(p.object_id) as obj_name, fg.name as fg 
    from sys.partitions p inner join sys.allocation_units au 
            on au.container_id = p.hobt_id 
         inner join sys.filegroups fg 
            on fg.data_space_id = au.data_space_id 
    
  2. sort_in_tempdb是创建索引选项:创建索引(transact-sql(

sort_in_tempdb = {on |OFF}适用于:SQL Server 2008通过SQL 服务器2017和Azure SQL数据库。指定是否存储 临时排序会导致tempdb。默认值关闭。在 用于构建索引的中间排序结果存储 在tempdb中。如果 tempdb与用户数据库不同。然而, 这增加了索引期间使用的磁盘空间的数量 构建。

最新更新