November 12, 2009 at 11:00 pm
Hi SQL Gurus,
I'm new to write storeprocedures and Queris.What are the jobs consider While writing stored procedures and queries,which gives good performance results?
How can I find the query performance?Example I have table,which is having lacks of records and every week add 50thousads records.I wrote small query like select * from tbl_entity it takes more than 10minits time,how can I impove the performance?
Thank you in advance.
Regards
Suresh Mediboyina
November 13, 2009 at 2:28 am
The time for that select * is probably a combination of time to get the data off disk and time to get it across the network. Why are you querying the entire of a very large table? Do you really need all of it?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2009 at 4:37 am
Thats right...do you really need to do a SELECT * FROM
? Only include the columns you actually need, and if possible add a WHERE clause to limit the result set. Once you know which columns you want to return and which columns can filtered (WHERE clause) you can create some indexes which will help performance.
If you're not sure about indexing start here:
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply