zdg/
共35个网摘 [
1 2 ]
下一页 |
访问zdg的个人空间
zdg收录,使用标签:SQLServer, Performance,时间:2007-12-26 1:19:42 | 相关网摘,我也收藏
当你的SQL Server数据库系统运行缓慢的时候,你或许多多少少知道可以使用SQL Server Profiler(中文叫SQL事件探查器)工具来进行跟踪和分析。是的,Profiler可以用来捕获发送到SQL Server的所有语句以及语句的执行性能相关数据(如语句的read/writes页面数目,CPU的使用量,以及语句的duration等)以供以后分析。但本文并不介绍如何使用Profiler 工具,而是将介绍如何使用read80trace(有关该工具见后面介绍)工具结合自定义的存储过程来提纲挈领地分析Profiler捕获的Trace文件,最终得出令人兴奋的数据分析报表,从而使你可以高屋建瓴地优化SQL Server数据库系统。
本文对那些需要分析SQL Server大型数据库系统性能的读者如DBA等特别有用。在规模较大、应用逻辑复杂的数据库系统中Profiler产生的文件往往非常巨大,比如说在Profiler中仅仅配置捕获基本的语句事件,运行二小时后捕获的Trace文件就可能有GB级的大小。应用本文介绍的方法不但可以大大节省分析Trace的时间和金钱,把你从Trace文件的海量数据中解放出来,更是让你对数据库系统的访问模式了如指掌,从而知道哪一类语句对性能影响最大,哪类语句需要优化等等。
http://www.microsoft.com/china/msdn/library/data/sqlserver/Profiler.mspx
zdg收录,使用标签:SQLServer,时间:2007-2-6 0:35:37 | 相关网摘,我也收藏
In the public forums for SQL Server, you often see people asking How do I use arrays in SQL Server? Or Why does SELECT * FROM tbl WHERE col IN (@list) not work? This text describes several methods to do this, both good and bad ones. I also present data from performance tests of the various methods.
http://www.sommarskog.se/arrays-in-sql.html
zdg收录,使用标签:SQLServer, 分页,时间:2006-10-27 1:28:27 | 相关网摘,我也收藏
It is amazing the amount of cycles, hardware and brain ware, go into paging results efficiently. Recently Scott Mitchell authored an article titled Efficiently Paging Through Large Result Sets in SQL Server 2000 that looked at a stored procedure that returned a particular "page" of data from a table. After examining Scott's approach, I saw some potential improvements in his method. (If you haven't yet perused Scott's technique, take a moment to do so before continuing here, as this article builds upon Scott's example.)
Scott's approach made use of a table variable to generate a synthetic ID to act as a row counter. Every time a page is requested, all of the data in the table being paged must be read and inserted into the table variable in order to generate the synthetic ID, at which point a SELECT statement returns just those records whose IDs fall within the desired range. While Scott's method is faster than blindly returning all of the records, his approach can be greatly improved by using ROWCOUNT to greatly reduce the number of records that must be read and inserted into the table variable.
In this article we'll look at two ways to improve Scott's method. The first approach uses a table variable (just like Scott's), but utilizes the SET ROWCOUNT command to reduce the number of records read and inserted into the table variable. The second technique more cleverly uses SET ROWCOUNT to provide an even more efficient approach than the first. Read on to learn more!
http://www.4guysfromrolla.com/webtech/042606-1.shtml
zdg收录,使用标签:SQLServer, 分页,时间:2006-10-27 1:27:53 | 相关网摘,我也收藏
思归: Erik Porter 在开发下一个版本的Channel 9 中发现 SQL Server 2005 中的 ROW_NUMBER OVER 函数在海量数据(譬如250,000行)的情形下分页性能有点问题,最后采用了Greg Hamilton 的SET ROWCOUNT方案,把查询时间从8秒减小到少于1秒!
Currently, to do paging we've been using the ROW_NUMBER OVER function. It's a new feature of SQL Server 2005 and is very simple and easy to use. Unfortunately, it doesn't work very well with a lot of rows (250,000 for example). I did some searching and came across this gem of an article. It uses an interesting trick to use SET ROWCOUNT to get the first record to start with in a paged result set, then you just run the query again and set the row count again to the number you want where the values are greater than the first row from the starting point of the paged result set and man is it snappy. Do check it out if you're having troubles with performance of ROW_NUMBER() OVER.
http://weblogs.asp.net/eporter/archive/2006/10/17/ROW_5F00_NUMBER_28002900_-OVER-Not-Fast-Enough-With-Large-Result-Set.aspx
zdg收录,使用标签:DataBase, SQLServer,时间:2006-6-12 10:14:15 | 相关网摘,我也收藏
SQL Server 2005 is packed with many new features. One of the new features that I would like to discuss in this article is Database Snapshots, which are read only static views of a database. SQL Server 2005 allows you to create multiple snapshots on a database. In this article, I would like to demonstrate the creation of database snapshots and automating the creation of database snapshots.
http://blog.csdn.net/longrujun/archive/2006/06/12/790102.aspx
zdg收录,使用标签:DataBase, SQLServer,时间:2006-6-10 3:07:36 | 相关网摘,我也收藏
Replication is designed to increase data availability by distributing the data across multiple database servers. Availability is increased by allowing applications to scale out the SQL Server read workload across databases. SQL Server 2005 offers enhanced replication using a new peer-to-peer model that provides a new topology in which databases can be synchronized transactionally with any identical peer database.
http://blog.csdn.net/longrujun/archive/2006/06/09/783357.aspx
共35个网摘 [
1 2 ]
下一页