-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


13- MS SQL Server

, 24 2017 . 19:49 +
jobgemws 19:49

13- MS SQL Server

  • Tutorial


, .
.
, - .


  1. ( )
    ( ) - , . , , , , . , . , 1 , MS SQL Server 2 1 , 2 . , 32 ( ), . , , 32 1024 . ? , 1 , 0 . . , - , , 32 1024 .

  2. - , ? , . - . (), , , , . . (), 1 .

  3. , , , . , , . :
    select DB_NAME(t.database_id)		as [DBName]
    	 , SCHEMA_NAME(obj.schema_id)	as [SchemaName]
    	 , OBJECT_NAME(t.object_id)		as [ObjectName]
    	 , obj.Type						as [ObjectType]
    	 , obj.Type_Desc				as [ObjectTypeDesc]
    	 , ind.name						as [IndexName]
    	 , ind.Type						as IndexType
    	 , ind.Type_Desc				as IndexTypeDesc
    	 , ind.Is_Unique				as IndexIsUnique
    	 , ind.is_primary_key			as IndexIsPK
    	 , ind.is_unique_constraint		as IndexIsUniqueConstraint
    	 , t.[Database_ID]
    	 , t.[Object_ID]
    	 , t.[Index_ID]
    	 , t.Last_User_Seek
    	 , t.Last_User_Scan
    	 , t.Last_User_Lookup
    	 , t.Last_System_Seek
    	 , t.Last_System_Scan
    	 , t.Last_System_Lookup
    from sys.dm_db_index_usage_stats as t
    inner join sys.objects as obj on t.[object_id]=obj.[object_id]
    inner join sys.indexes as ind on t.[object_id]=ind.[object_id] and t.index_id=ind.index_id
    where (last_user_seek	is null or last_user_seek		4 and t.[object_id]>0 --  
    



  4. , . RAID 10 4- SSD-, . , tempdb , . , , , .

  5. , , . , .

  6. , , , , .

  7. , MS SQL Server, , . - , , .

  8. , , . . .

8 , .
.

:


SQL
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/338600/

:  

: [1] []
 

:
: 

: ( )

:

  URL