Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
データベース内のすべてのインデックスを一覧表示するクエリが必要です。この単純なコードは機能しますか?
select * from sys.indexes
これが正しいのか、それともより大きなコードが必要なのかはわかりません。
sys.indexes には、非クラスター化インデックスとクラスター化インデックスに加えて HEAPS が含まれているため、実際にはオブジェクトが多すぎます。HEAPS が不要な場合は、次のようにします。
select * from sys.indexes where name is not null