Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sql Advice Needed (Optimize Questions)

Status
Not open for further replies.

SQLEC

Programmer
Apr 3, 2006
3
US
Hey All,
I started a new job a while back and one of the requests from management was to speed up the public search.
Initial research showed that some of the larger queries where taking as much as 30 seconds to run(including page load times), while only returning 2500 results, Not very impressive if you ask me considering that the main db server is a quad xeon with 4 gigs of ram.
Not to mention that the CPU usage was at a minimum of 85% for at least 15 hours a day with 100% spikes lasting for 2-4 seconds at times.

I have done all that I can think of to improve performance.
Reindex tables using profiler and the index tuning wizard.

The CPU usage is now down to an average of 45% for the same duration of time and minimal spikes.
Load page times are way down, nothing that I have found to be in excess of 10 seconds at peak times with more than 1000 active users on.
Average page load times are now under 5 seconds.
I have also optimized as best that I can think of the asp side of things as well.

My question is, what else can I do to speed performance. I know I can squeak more performance out of this and I am hoping to get some of the smaller page loads down to under 2 seconds.

Could it just be that we need more/better hardware? I have proposed this but didnt get the favorable attention that I think it deserved.

Keep in mind that most of the queries are inline/embedded, the reason for this, firstly is that, this is how I came into it, and most of the other developers are totally against stored procedures for some reason, another reason why is that most of the larger queries *MIGHT* require up to 15 params and I have yet to find a way to create a stored procedure that is quicker than the inline/embedded sql that I rewrote. Dont get me wrong I prefer stored procedures and have attempted to rewrite it using SP's but just couldnt match the speed for some reason.......

I am considering proposing some type of caching system to management. Any ideas? Thoughts?

Any advise would be appreciated.
 
Good description of your issues ... however, this is the ANSI SQL forum and performance optimization is a product-specific issue. I suggest that you re-post in one of the forums that's specific to the RDBMS that you're running.

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Sorry about that, can one of the mods move it to the most appropriate one?
 
They probably can but I suspect that they won't because TT has thousands of posts per day and that's an unnecessary burden on Doug and Dave who run this site. Besides, with the number of different technologies represented on TT, they could not be expected to know which is the "best forum" for your question.

I suggest that you click on "Subscribe to Forums" at the top left of the screen. Select "Programmers", then "DBMS Systems" and select the forums that look most promising. They will appear in your threadminder list. When you have found the one that seems to fit, copy and paste your post above into a new post on the appropriate forum.

Good Luck.

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top