SQL Server Performance Tuning
Question I have a complex query that, according to the execution plan, uses parallelism, which is what I would expect. But when the query actually runs, it doesn’t appear to use all of the available CPUs to their full potential. For example, when I watch Performance Monitor when I run the query, it appears that […]
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 […]
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 […]
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 […]
My SQL Server seems to take memory from the operating system, but never releases it. Is this normal?
If you are running SQL Server 7.0, SQL Server 2000, or SQL Server 2005, and have the memory setting set to dynamically manage memory (the default setting), SQL Server will automatically take as much RAM as it needs (assuming it is available) from the available RAM of the server. Assuming that the operating system or other […]