Fanr

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  MSSQL

上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页

摘要:QL Server 2008 改进了许多并行计划的已分区表的查询处理性能,更改了并行和串行计划的表示方式,增强了编译时和运行时执行计划中所提供的分区信息。本主题将说明这些改进并提供有关如何解释已分区表和索引的查询执行计划的指南,此外还将提供改进已分区对象的查询性能的最佳方法。注意只有 SQL Server Enterprise Edition、Developer Edition 和 Evaluation Edition 支持已分区表和已分区索引。新增的可识别分区的查找操作在 SQL Server 2008 中,已分区表的内部表示形式已发生变化,即已分区表将作为一个多列索引呈现给查询处理器,其中 阅读全文
posted @ 2011-05-12 10:49 Fanr_Zh 阅读(510) 评论(0) 推荐(0) 编辑

摘要:dbcc inputbuffer 查看最后一次执行的sql 阅读全文
posted @ 2011-05-10 11:02 Fanr_Zh 阅读(715) 评论(0) 推荐(0) 编辑

摘要:SQLServer2005中解决死锁问题数据库操作的死锁是不可避免的,本文并不打算讨论死锁如何产生,重点在于解决死锁,通过SQLServer2005,现在似乎有了一种新的解决办法。将下面的SQL语句放在两个不同的连接里面,并且在5秒内同时执行,将会发生死锁。useNorthwindbegintran insertintoOrders(CustomerId)values(@#ALFKI@#) waitfordelay@#00:00:05@# select*fromOrderswhereCustomerId=@#ALFKI@#commitprint@#endtran@# SQLServer对付死锁 阅读全文
posted @ 2011-05-09 09:20 Fanr_Zh 阅读(533) 评论(0) 推荐(0) 编辑

摘要:某些完整日志记录、大规模索引操作可以生成大型数据负荷,不管是脱机执行操作还是联机执行操作,这些数据负荷都可能导致快速填满事务日志。这可能影响性能。通过在索引操作的持续时间内将数据库的恢复模式设置为大容量日志模式或简单模式,可以使这些索引操作的日志记录最小。最小日志记录比完整日志记录更加有效,并可以降低索引操作填满日志空间的可能性。索引操作日志记录下表列出了索引操作和这些操作的每种数据库恢复模式下可用的日志记录的类型。联机和脱机索引操作均支持这些恢复模式。索引操作 完整 大容量日志 简单 ALTER INDEX REORGANIZE完全记录完全记录完全记录ALTER INDEX REBUILD完 阅读全文
posted @ 2011-05-08 10:06 Fanr_Zh 阅读(390) 评论(0) 推荐(0) 编辑

摘要:如果表含有聚集索引,并对要插入的数据进行排序以匹配聚集索引键,则将把数据大容量复制到已经存在聚集索引的表中,并指定 ORDER 提示。这比先将数据复制到表中再创建聚集索引明显要快。 如果表上还存在非聚集索引,请先删除这些索引再将数据复制到表中。若将数据大容量复制到不带非聚集索引的表中,然后重新创建非聚集索引,一般比将数据大容量复制到存在非聚集索引的表中要快。 阅读全文
posted @ 2011-05-08 10:03 Fanr_Zh 阅读(1109) 评论(0) 推荐(0) 编辑

摘要:------------------------------dbcc page内容解释--author:boyi55----------------------------dbcc page ( {'dbname' | dbid}, filenum, pagenum [, printopt={0|1|2|3} ])The printopt parameter has the following meanings:0 - print just the page header1 - page header plus per-row hex dumps and a dump of t 阅读全文
posted @ 2011-05-03 17:04 Fanr_Zh 阅读(5958) 评论(0) 推荐(2) 编辑

摘要:来源:csdn:http://blog.csdn.net/xiaoxu0123/archive/2011/02/10/6177265.aspx资源调控器是sql server 2008新增中的功能,可以限制某些用户访问sql server所消耗的cpu、内存资源或是对某个库访问所所消耗的cpu、内存资源,可以在SQL Server 的 Enterprise Edition、Developer Edition 和 Evaluation Edition中使用。配置资源调控器基本分为以下步骤:1. 创建并配置一个资源调控器资源池,发生 CPU 争用时,该资源池将限制分配给资源池中的请求的最大平均 C 阅读全文
posted @ 2011-04-21 12:21 Fanr_Zh 阅读(929) 评论(0) 推荐(0) 编辑

摘要:SQL Server 2005 has lot of new and improved components, and theTracer Tokenin replication is one of them. It allows us to validate connections and helps in measuring latencies between the publisher, distributor and subscriber(s). This functionality allows an accurate calculation of latencies that ul 阅读全文
posted @ 2011-04-20 23:18 Fanr_Zh 阅读(344) 评论(0) 推荐(0) 编辑

摘要:Simple but accurate following script will give you list of all the indexes in the database which are unused. If indexes are not used they should be dropped as Indexes reduces the performance for INSERT/UPDATE statement. Indexes are only useful when used with SELECT statement.Script to find unused In 阅读全文
posted @ 2011-04-18 14:02 Fanr_Zh 阅读(407) 评论(0) 推荐(0) 编辑

摘要:USE AdventureWorks2008R2;GOCREATE PROCEDURE dbo.InsertUnitMeasure @UnitMeasureCode nchar(3), @Name nvarchar(25)AS BEGIN SET NOCOUNT ON;-- Update the row if it exists. UPDATE Production.UnitMeasure SET Name = @Name WHERE UnitMeasureCode = @UnitMeasureCode-- Insert the row if the UPDATE statement fail 阅读全文
posted @ 2011-04-14 14:52 Fanr_Zh 阅读(384) 评论(0) 推荐(0) 编辑

摘要:Establishing a Performance BaselineApplies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2Baseline performance monitoring involves establishing a performance baseline for your system. A performance baseline includes a single performance cha 阅读全文
posted @ 2011-04-10 16:27 Fanr_Zh 阅读(445) 评论(0) 推荐(0) 编辑

摘要:Creating a Performance Baseline - Part 1You'll often hear that you should monitor the performance of SQL Server. You may read a little about performance monitoring, and you may turn on a few counters or perform a query against a dynamic management view that you know about. But, you may still won 阅读全文
posted @ 2011-04-09 14:04 Fanr_Zh 阅读(1070) 评论(0) 推荐(0) 编辑

摘要:1.I/O 计数器:PhysicalDisk: Avg. Disk Queue Length 说明 :Avg. Disk Queue Length 指读取和写入请求(为所选磁盘在实例间隔中列队的)的平均数。 瓶颈 :如果在高峰使用的情况下,队列长度>2的话,,可能存在I/O瓶颈 计数器:PhysicalDisk: Avg. Disk Sec/Read Avg. Disk Sec/Write 说明:Avg. Disk sec/Read 指以秒计算的在此盘上读取数据的所需平均时间。 Avg. Disk sec/Write 指以秒计算的在此盘上写入数据的所需平均时间。 瓶颈:当读写的平均时间超 阅读全文
posted @ 2011-04-08 11:31 Fanr_Zh 阅读(1520) 评论(0) 推荐(0) 编辑

摘要:计数器的说明可以在添加计数器那边资源对象\计数器建议的阈值注释磁盘Physical Disk\% Free SpaceLogical Disk\% Free Space15%磁盘Physical Disk\% Disk Time Logical Disk\% Disk Time90%磁盘Physical Disk\Disk Reads/sec、Physical Disk\Disk Writes/sec取决于制造商的规格检查磁盘的指定传送速度,以验证此速度没有超出规格。通常,Ultra Wide SCSI 磁盘每秒可以处理 50 到 70 次 I/O 操作。请注意,无论 I/O 是顺序的还是随机 阅读全文
posted @ 2011-04-07 16:50 Fanr_Zh 阅读(1108) 评论(0) 推荐(0) 编辑

摘要:There are several new features in SQL Server 2005. There are a few features to help find missing indexes, which are some of the very good ones. How great it will be if you know what indexes you need to create based on your workload? In SQL Server 2000, we had to use SQL Profiler trace files and Inde 阅读全文
posted @ 2011-04-02 12:45 Fanr_Zh 阅读(471) 评论(0) 推荐(0) 编辑

摘要:I have a client that was in need of moving all there indexes from the primary file group to an index file group. There were a total of 25 databases so the time needed to script each one individually would have been overwhelming not to mention the need to perform this across multiple environments.I s 阅读全文
posted @ 2011-04-01 13:46 Fanr_Zh 阅读(328) 评论(0) 推荐(0) 编辑

摘要:Introductionsp_who2 is a well known utility that shows what spids are currently executing. However the information it shows is relatively limited. For example, it only shows the type of command executing as SELECT, DELETE etc, with no reference to the actual underlying SQL executing.Knowing what SQL 阅读全文
posted @ 2011-04-01 12:50 Fanr_Zh 阅读(1173) 评论(0) 推荐(0) 编辑

摘要:Below is what is collectedShows SQL Servers information Shows top 5 high cpu used statemants Shows who so logged in Shows long running cursors Shows idle sessions that have open transactions Shows free space in tempdb database Shows total disk allocated to tempdb database Show active jobs Shows clie 阅读全文
posted @ 2011-03-31 14:14 Fanr_Zh 阅读(518) 评论(0) 推荐(0) 编辑

摘要:SQL Server 2005 Logon Triggers by Frederik Vandeputte as SSCLogon triggers by Cristian Lefter as Simple-talk 阅读全文
posted @ 2011-03-31 10:07 Fanr_Zh 阅读(315) 评论(0) 推荐(0) 编辑

摘要:当用户使用的连接如果是可串行的隔离级别 logon trigger 就会报错原文下载 The Best of SQLServerCentral.com, Vol.7The Best of SQLServerCentral.com, Vol.7 阅读全文
posted @ 2011-03-31 09:32 Fanr_Zh 阅读(243) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页