views:

75

answers:

3

I am getting a sqlserver Timeout in my aspx page. It comes when i click one of the link in the website. Will indexing will help with this problem? Thanks

A: 

If it's a query gone too slow problem - yes, if it's from something else (and it certainly might be other issue - that index will not help).

(other problems - networking, deadlocks, ect...)

Dani
A: 

As your page brings some images from the database, and index will only help if the database engine is having to check the whole table to find those images.

Putting an index on whatever you search for could well help, but it could also be an issue related to SQL having to get the image off the disk into RAM and them sending it out across the network. Is it quicker if you store the images on the webserver and return the Filename back from the database?

Rob Farley
so u mean i shld only save name of the image in database and image should be uploaded in webserver?
Nipun
Even for storing image on webserver i have to take more space?
Nipun
Storing images on the webserver means that you won't have to transfer as much data from the SQL box, and the SQL box won't have to put as much data into its RAM, the table listing the images can be small, and so on. It's not necessarily _better_, but it can end up being a useful mechanism if security allows.
Rob Farley
+1  A: 

If you're using an ADO Command object, try to increase the number of seconds to wait while attempting to execute a command. That's set up thru ADO CommandTimeout. The default is 30 seconds.

http://www.w3schools.com/ado/prop%5Fcommandtimeout.asp

Each connection also has a timeout property in ADO, called ConnectionTimeout The default is 15 seconds.

http://www.w3schools.com/ADO/prop%5Fconn%5Fconnectiontimeout.asp

Try and see which one hangs.

Dan S