SQL Server 中,Index Location(索引的位置)
在 SQL Server 中,Index Location(索引的位置) 通常是指「索引資料實際儲存的檔案位置」或「索引是放在哪個資料表分割區(partition)、資料檔案(filegroup)或頁面(page)上」。 CREATE INDEX ... ON <filegroup|partition_scheme> 若將非叢集索引放到與資料表不同的 filegroup 且位於不同磁碟,可能提升查詢效能,因為可以平衡 I/O 載荷;亦可利用 partition scheme 將 Clustered / Nonclustered index 分散到多個 filegroup 之上 https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-index-design-guide?view=sql-server-ver17 官方 T‑SQL 語法說明 CREATE INDEX 對比 ON filegroup_name、ON partition_scheme(column) 與 ON [default] 若不指定,非分割資料表的 index 將放在與 base table 相同檔案群組。 [default] 並非資料庫預設組,而是指基表使用的 filegroup 或 partition scheme https://learn.microsoft.com/zh-tw/sql/t-sql/statements/create-index-transact-sql?view=sql-server-ver17 建立索引時指定特定檔案 or filegroup https://stackoverflow.com/questions/7823882/how-to-create-indexs-on-a-different-file-of-filegroup?utm_source=chatgpt.com 將現有的索引移至不同的檔案群組 https://learn.microsoft.com/zh-tw/sql/relational-databases/indexes/move-an-existing-index-to-a-different-filegroup?view=sql-server...