上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 102 下一页
摘要: 前言我看过不少对Bit字段能否建立索引,以及建立索引后性能如何的讨论,还有朋友建议用Tinyint代替Bit,我在这里深入研究一下:研究方法:一、建立六张表,具体说明见SQL语句中的注释部分:建表Sql语句Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->CREATEDATABASEIndexTestGOUSEIndexTestGO--bit无索引,0、1相等CREATETABLEdbo.TestBitNoIndex(TestIDINTNOTN 阅读全文
posted @ 2012-04-09 21:48 qanholas 阅读(1056) 评论(0) 推荐(1)
摘要: Now, the question is, do you really WANT an index on a BIT column? We're going to run some experiments, but in general, it is highly unlikely that you will get much use out of such an index. The exception is when the data is heavily weighted towards, say, 1 (e.g. 95-99% of the table), and you ar 阅读全文
posted @ 2012-04-09 21:14 qanholas 阅读(1214) 评论(0) 推荐(0)
摘要: SELECT TOP 100 [Total Cost] = ROUND(avg_total_user_cost * avg_user_impact * ( user_seeks + user_scans ), 0) , user_seeks , user_scans , avg_total_user_cost , avg_user_impact , TableName = statement , [EqualityUsage] = equality_columns , [InequalityUsage] = inequality_columns , [Include Cloumns] = .. 阅读全文
posted @ 2012-04-09 14:36 qanholas 阅读(697) 评论(0) 推荐(0)
摘要: DROP TABLE test1GODROP TABLE test2GOCREATE TABLE test1 (col1 INT, col2 INT)GOCREATE TABLE test2 (col3 INT, col4 INT)GOINSERT INTO test1 VALUES(1,1)INSERT INTO test1 VALUES(2,2)INSERT INTO test1 VALUES(3,3)INSERT INTO test1 VALUES(4,4)INSERT INTO test1 VALUES(5,5)INSERT INTO test2 VALUES(1,1)INSERT I 阅读全文
posted @ 2012-04-08 14:45 qanholas 阅读(178) 评论(0) 推荐(0)
摘要: 原表无压缩原行压缩原页压缩分区表页压缩分区表行压缩分区视图页压缩分区视图行压缩1802883758224955595258479789328701841987178831834380058689384478865810580508540824377594846098449351906682178590801558239853783198132875979397933681488631785985968505810285907816179288910791686528319794888569830486887789786978888000981778241887581048006... 阅读全文
posted @ 2012-04-05 15:22 qanholas 阅读(278) 评论(0) 推荐(1)
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 102 下一页