摘要:
http://www.mssqltips.com/sqlservertip/3090/how-to-find-user-who-ran-drop-or-delete-statements-on-your-sql-server-objects/?utm_source=dailynewsletter&utm_medium=email&utm_content=headline&utm_campaign=20131202 阅读全文
摘要:
Tuning MethodologyWhen dealing with performance problems, database professionals tend to focus on the technical aspects of the system, such as resource queues, resource utilization, and so on. However, users perceive performance problems simply as waitsthey make a request and have to wait to get the 阅读全文
摘要:
Summary DescriptionThe SQL language is spoken by most database experts, and all relational database products include some dialect of the SQL standard. Nevertheless, each product has its own particular query-processing mechanism. Understanding the way a database engine processes queries helps softwar 阅读全文
摘要:
Logical Query Processing Phases Summary(8) SELECT (9) DISTINCT (11) (1) FROM (3) JOIN (2) ON (4) WHERE (5) GROUP BY (6) WITH {CUBE | ROLLUP}(7) HAVING (10) ORDER BY Brief Description of Logical Query Processing Phases Don't worry too much if the description of the steps doesn't seem ... 阅读全文
摘要:
http://www.mssqltips.com/sqlservertip/3078/report-launcher-to-run-ssrs-report-subscriptions-on-demand/?utm_source=dailynewsletter&utm_medium=email&utm_content=headline&utm_campaign=20131024ProblemSSRS report subscriptions are a great feature for automatic report delivery on regular sched 阅读全文
摘要:
SQL server运行到一定的时候, 执行计划的缓存可能会相当大,有些能到几个GB的大小。这个时候假设某个语句比较复杂而且SQL server 生成的执行计划不够优化,你希望把该执行计划的缓存清除使得SQL server能够重新编译该语句。该如何做呢?如果是存储过程则很好办,直接使用sp_recompile就可以了,如下所示。如果参数是表,那么所有用到该表的存储过程或trigger都会重新编译,从而把原来的plan 替换掉:USE AdventureWorks;GOEXECsp_recompileN'Sales.Customer';GO如果是一般的语句呢? 比如下面的语句:u 阅读全文
摘要:
你也许会想,假如非聚集索引可以快速的找到所求的数据,但遗憾的是,非聚集索引却不包含所有所求列时该怎么办?这时SQL Server会面临两个选择,直接访问基本表去获取数据或是在非聚集索引中找到数据后,再去基本表获得非聚集索引没有覆盖到的所求列。这个选择取决于所估计的行数等统计信息。查询分析器会选择消耗比较少的那个。 一个简单的书签查找如图5所示。 图5.一个简单的书签查找 从图5可以看出,首先通过非聚集索引找到所求的行,但这个索引并不包含所有的列,因此还要额外去基本表中找到这些列,因此要进行键查找,如果基本表是以堆进行组织的,那么这个键查找(Key Lookup)就会变成RID查找(RID L. 阅读全文