WebProWorld
Dev Forum |
Simple Inventory Managment - Item Codes I am using MS Access to create an inventory database so I can run queries to do product counts/analysis/etc... The best way to make tables work together is to use a key.
MS SQL troubles Okay, I am looking for a way to get a database out of MSSQL server(Ithink). I have asked three times in the ticket system, how to access the database so I can export it, or see it at least.
intergrate flash into a access database I wanted to know is there a way to add flash to an access database. On my site we have added two parts, one is where customers can sell cars and the other is where they can part there cars out (like an online junk yard).
|
|
|
 |
|
Recent Articles |
SQL Server Jobs Can Negatively Affect Performance, If You Are Not Careful Virtually every SQL Server runs one or more daily jobs. And most likely, runs many weekly jobs. Unfortunately, most DBAs set up jobs, and then forget about them, unless of course they break. But if they run day after day without any problems, most jobs are forgotten about.
SQL Server Configuration Performance Checklist Most SQL Server Configuration Settings Should Not Be Changed. In this article, we are going to take a look at some of the performance-related SQL Server configuration settings. These are SQL Server-specific settings that can be modified using either Enterprise Manager or SP_CONFIGURE.
SQL Server Hardware Performance Checklist Auditing SQL Server Hardware Is An Important Early Step. From this previous article, on using Performance Monitor, you may have identified some potential hardware bottlenecks that are negatively affecting your SQL Server's performance.
Embedded Databases An Embedded database is a specific database genus that does not run as a separate process, instead, it is directly linked ("embedded") into the application. Herein, the database is integrated into the application and the end-user has little or no knowledge that the database exists.
The Best Day Ever to Design a Database Structure Have you ever been faced with the challenge of designing a new database structure? Do you have to redevelop an existing database?
Using Performance Monitor to Identify SQL Server Hardware Bottlenecks The best place to start your SQL Server performance audit is to begin with the Performance Monitor (System Monitor). By monitoring a few key counters over a 24 hour period, you should get a pretty good feel for any major hardware bottlenecks your SQL Server is experiencing.
Backing Up And Restoring Your MySQL Database If you've been using MySQL database to store your important data, it is imperative that you make a backup of your data to prevent any loss of data. This article shows you how to backup and restore data in your MySQL database.
Backing Up And Restoring Your MySQL Database If you've been using MySQL database to store your important data, it is imperative that you make a backup of your data to prevent any loss of data. This article shows you how to backup and restore data in your MySQL database.
|
|
|
|
01.14.05
Using Profiler To Identify Poorly Performing Queries
By Brad M. McGehee
Identifying Long Running Queries is First Step
At this step in the SQL Server performance audit, you should have identified all the "easy" performance fixes.
Now it is time to get your hands a little dirtier and identify queries (including stored procedures) than run longer than they should, and use up more than their fare share of SQL Server resources.
Slow running queries are ones that take too long to run. So how long is too long? That is a decision you have to make. Generally speaking, I use a cutoff of 5 seconds. In other words, any query running 5 seconds or less is generally fast enough, while queries that take longer than 5 seconds to run are long running. This is an arbitrary decision you have to make. In the company where I work, the report writers, who are the ones who write most of the queries that are run against our databases have a different standard than I have. They only consider a query to be long running if it takes more than 30 seconds to run. So, one of your first steps is to determine what you think a long running query is, and then use this as your standard during this portion of the performance audit.
We don't have unlimited time to tune queries. All we can do is to identify those queries that need the most work, and then work on them. And if we do have time, then we can focus on those queries that are less critical (but still troublesome) to the overall performance of our SQL Servers. Also keep in mind that sometimes, no matter how hard you try to tune a particular query, that there may be little or nothing you can do to improve the performance of a particular query.
Before You Begin
For this part of the performance audit, you will be using the SQL Profiler tool that comes with SQL Server. As this article focuses on how to perform a performance audit, and not on how to use tools, it is assumed that you know how to use SQL Profiler. If you have not used it before, check out the SQL Server Books Online to get you started on the basics of how to use it.
Before you begin using Profiler to capture the query activity in your SQL Servers, keep the following in mind:
Don't run the Profiler on the same server you are monitoring, this can noticeably, negatively affect the server's performance. Instead, run it on another server or workstation, and collect the data there.
When running the Profiler, do not select more data than you need to collect. The more you collect, the more resources are used to collect them, slowing down performance. Only select those events and data columns you really need. I will make recommendation on exactly what to collect shortly.
Collect data over a "typical" production time, say over a typical 3-4 hour production period. This may vary, depending on how busy your server is. If you don't have a "typical" production time, you may have to collect data over several different periods of a typical production day to get all the data you need.
When you use Profiler, you have two options of how to "set it up." You can choose to use the GUI Profiler interface, or if you like, you can use the built-in Profiler system stored procedures. While using the GUI is somewhat easier, using the stored procedures to collect the data incurs slightly less overhead. In this article, we will be using the GUI interface.
What Data to Collect
Profiler allows you to specify which events you want to capture and which data columns from those event to capture. In addition, you can use filters to reduce the incoming data to only what you need for this specific analysis. Here's what I recommend:
Events to Capture
Stored Procedures--RPC:Completed
TSQL--SQL:BatchCompleted
You may be surprised that only two different events need to be captured: one for capturing stored procedures and one for capturing all other Transact-SQL queries.
Data Columns to Capture
Duration (data needs to be grouped by duration)
Event Class
DatabaseID (If you have more than one database on the server)
TextData
CPU
 Writes
Reads
StartTime (optional)
EndTime (optional)
ApplicationName (optional)
NTUserName (optional)
LoginName (optional)
SPID
The data you want to actually capture and view includes some that are very important to you, especially duration and TextData; and some that are not so important, but can be useful, such as ApplicationName or NTUserName.
Read the Rest of the Article.
*Originally published at SQL-Server-Performance.com
About the Author: Brad M. McGehee is a full-time DBA with a large manufacturing company, and the publisher of http://www.SQL-Server-Performance.Com, a website specializing in SQL Server performance tuning and clustering.
He is an MVP, MCSE+I, MCSD, and MCT (former). |