SQL Server Performance Tuning
Question What is the best way to capture Performance Monitor data and review it over time? I want to be able to produce baseline performance data for my SQL Server so I can compare past performance with current performance. Answer There are a variety of options you can consider. Each has their pros and cons. […]
Question I have a server running SQL Server 2000, SP3. I recently used Performance Monitor to track the Memory: pages/sec counter to see if I have a paging problem. What surprised me what that the pages/sec were running over 200, which is way above the maximum value of 20 suggested on your website. What is […]
Question All other things being equal, which of the following CPU options is the better choice for heavy-duty queries in SQL Server 2000: –A single Xeon CPU running at 2.4 GHz (with 512KB L2 cache)–Quad Xeon running at 550 MHz (with 1MB L2 cache) Also assume that the server would have 1GB of RAM. Answer […]
Question I am running SQL Server 2000 on Windows 2000 with 1GB of RAM on a dedicated server, but I am getting the following error message when doing backup and running simple queries like ALTER TABLE. What can be the problem? Server: Msg 845, Level 17, State 1, Line 1Time-out occurred while waiting for buffer […]
Question I have been taking a look at the queries run against a particular table, along with the indexes on the table, and I have discovered the following: 1) Query #1 uses a composite index that includes a three column index. 2) Query #2 uses a composite index that includes a two column index. 3) […]
Each night we have to run a job that takes about 10 hours to complete. As it runs, it uses 100% of the CPU. What can I do?
Question Each night we have to run a job that takes about 10 hours to complete. As it runs, it uses 100% of the CPU. Obviously, other users are unable to access SQL Server during this time period. What can we do to speed SQL Server up? Answer I see lots of questions like this […]
Question I have a very large table, over 30 million records, that has a logical fragmentation of about 60%, and this is even if I run DBCC INDEXDEFRAG on it. Is this normal, and if not, what can I do about reducing the fragmentation? Answer In SQL Server 2000, Microsoft introduced DBCC INDEXDEFRAG to help […]
For those not familiar with page splits, let’s first take a look at what they are. Whenever you INSERT new data into a SQL Server table, or in some cases, UPDATE data in a SQL Server table, there may not enough room for the newly INSERTed or UPDATEd row in the applicable data page. In […]
Whenever a stored procedure is run in SQL Server for the first time, it is optimized and a query plan is compiled and cached in SQL Server’s memory. Each time the same stored procedure is run after it is cached, it will use the same query plan, eliminating the need for the same stored procedure […]
Is there any significant performance difference when joining tables across different databases on the same server?
This is very easy to test yourself. For example, make a test copy of one of your databases. Then create a query that JOINs two tables from within the same database. Next, create a second JOIN query similar to the first, but modify the second query so that it JOINs a table from the original and test […]