msdn - 공간인덱싱 개요
https://goo.gl/1MTmEL
인덱싱 심화
https://goo.gl/BDXpsq
대한민국 위/경도 범위
https://goo.gl/Fx1rmr
Q : Spatial index statistics missing
https://goo.gl/Bo8Juk
인덱스 통계보기
declare c cursor static for select object_id, name, index_id from sys.indexes where type_desc = 'SPATIAL' open c declare @obj int declare @statsname varchar(max) declare @indid int declare @tname varchar(max) fetch next from c into @obj, @statsname, @indid while (@@fetch_status = 0) begin declare @internaltablename varchar(max) declare @stmt varchar(max) fetch next from c into @obj, @statsname, @indid select top 1 @tname = name from sys.objects where object_id = @obj set @internaltablename = 'sys.extended_index_' + cast(@obj as varchar(max)) + '_' + cast(@indid as varchar(max)) select 'Showing statistics for ', @tname select @stmt = 'dbcc show_statistics (''' + @internaltablename + ''', ''' + @statsname + ''')' exec (@stmt) end close c deallocate c
'DB > mssql' 카테고리의 다른 글
[mssql] IDENTITY 컬럼 + 0으로 자리수 채우기 (0) | 2017.07.20 |
---|---|
테이블에 자동증가 primary 컬럼 한번에 추가하기 (0) | 2017.07.20 |
[mssql] CONVERT Datatime to string (0) | 2017.06.26 |
[mssql] SP에서 특정 TEXT 검색 (0) | 2017.06.08 |
[mssql] 튜닝 #1 - insert , delete 로 인한 duration (0) | 2017.06.08 |