SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Query Timed Out


SQL Query Timed Out

Author
Message
martin 81121
martin 81121
SSC Rookie
SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)

Group: General Forum Members
Points: 45 Visits: 16
Hi

We are looking to upgrade our current SQL and Server, at the minute a lot of our larger tables (2-3 million rows) are timing out when I attempt to do simply queries such as selecting the transactions from the current year. We currently have a 6 year old server, could the timing out be due to the number of the rows? I have just looked and the server only has 4 GB of RAM would increasing this allow for more Memory to process the query as well as the whole running of the server? Or would it be simpier and more effective to get a new Server and keep the old as a backup or File Server?

Thanks for any advice offered.
Sean Lange
Sean Lange
SSC Guru
SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)

Group: General Forum Members
Points: 62033 Visits: 17954
martin 81121 (9/24/2012)
Hi

We are looking to upgrade our current SQL and Server, at the minute a lot of our larger tables (2-3 million rows) are timing out when I attempt to do simply queries such as selecting the transactions from the current year. We currently have a 6 year old server, could the timing out be due to the number of the rows? I have just looked and the server only has 4 GB of RAM would increasing this allow for more Memory to process the query as well as the whole running of the server? Or would it be simpier and more effective to get a new Server and keep the old as a backup or File Server?

Thanks for any advice offered.


The hardware MAY be some of the issue but there are a lot of other things involved here. You say "selecting the transactions from the current year", this indicates your query has a where clause. Now we have a whole new realm of possible reasons for performance degradation. We have indexes, SARGability, statistics etc etc etc to think about. Throwing hardware at performance issues will possibly get you some short term gains but it is a long term loss. You need to fix the underlying issues.

See Gail's post here about how to post performance problems. http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)

Group: General Forum Members
Points: 97683 Visits: 33014
It's hard to make real substantive suggestions based on general information. Bigger, faster hardware always helps some. Depending on how much you upgrade the hardware, you can mask really bad problems with T-SQL or database design. But usually, tuning the code and structures are the easiest way to maximize throughput of the system. If you're just getting started with query tuning, I'd suggest getting a copy of my book linked below.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search