May 14, 2003 at 12:30 pm
What are two ways you can take a look at the performance and determine what could be done to improve it?
May 14, 2003 at 12:37 pm
Okay, here's where I hit you up with a shameless plug for my eBook.
Other good sources are:
http://www.sql-server-performance.com/
Windows 2000 Resource Kit
SQL Server 2000 Resource Kit
K. Brian Kelley
http://www.truthsolutions.com/
Author: Start to Finish Guide to SQL Server Performance Monitoring
http://www.netimpress.com/shop/product.asp?ProductID=NI-SQL1
K. Brian Kelley
@kbriankelley
May 15, 2003 at 7:26 am
Follow the execution plan for your queries and check to see if they are using indexes or table scans. This can also give you a clear idea if you have the right columns indexed.
Patrick
Quand on parle du loup, on en voit la queue
May 15, 2003 at 9:43 am
In addition to the execution plan, there are a number of things you can do that will never be shown via tools...
* Use CONVERT() instead of CAST
* Use INT OR TINYINT for boolean values instead of CHAR Y/N
* Use VARCHAR instead of CHAR
to name a few. These mostly come as a result of curious minds taking the time to test something or other.
Other items are not so easily described...
* Proper level of normalization.
* Stored procedures called by the client instead of create SQL statements.
* Middle tier caching and intelligence when applicable.
* Appropriate granularity in transaction handling.
etc. The more you read and experience, the better you get.
Good luck - I find it a constantly "eye-opening" experience to see what else is available. There is so much to learn.
Guarddata-
May 15, 2003 at 7:51 pm
SQL Profiler and the Index Tuning Wizard.
With SQL Profiler, you can capture long running queries to concentrate on first, or you could do a general capture for feeding the Index Tuning Wizard.
David R Buckingham, MCDBA,MCSA,MCP
May 16, 2003 at 5:26 am
quote:
* Use CONVERT() instead of CAST* Use INT OR TINYINT for boolean values instead of CHAR Y/N
* Use VARCHAR instead of CHAR
Actually use bit for Y/N values. Less need to worry about data options not being in range.
With regards to CHAR vs VARCHAR I have not seen much difference except when it comes to storage.
And note tht CONVERT is going to go away eventually to be replaced fully by CAST and there should be no differences between them except that CONVERT does have formating ptions. However, if at all possible avoid either and remain in the datatype you are using for least impact.
May 16, 2003 at 5:29 am
quote:
Actually use bit for Y/N values. Less need to worry about data options not being in range.
And don't forget to set a default value either 0 or 1. Saves a lot of unnecessary trouble
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
May 16, 2003 at 9:20 am
Hmmm - I was taught to use varchar when I assumed a variation in the size of the data.
Whenever possible define the column as char. It's not that big of a deal these days - but I did mention it to one of co-workers when they absentmindedly created a varchar(1) column.
Patrick
Quand on parle du loup, on en voit la queue
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply