Discussion Locked

database times out

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an sql2000 table with 2.8million records in it. Along with that I have set up an asp page to retrieve data from this table and show it on the screen. The problem is this; the page times out every time. Is there some line of code I can put on my asp page to lengthen the time? I don't want to do it in the global asa file. Or, is there something I should be doing with the table itself. I've set it up with a primary key and indexed it. Thanks in Advance. Dave

7 replies

by ukothari

It is clear that you are mostly having problem with large amount of data that query moght be returning. Amount of time it takes depends on what you are querying rather than whether it has primary key or not. Please give query you are trying and I can help you. I don't think you can set the Session timeout for single page however you can set the timeout value during Session_onStart event in global.asa

Hope it helps.

Uday

by andrew

You can increase the ASP timeout like this:

Server.ScriptTimeout=600

this increases it to 10 mins (default is 90 secs).

by ranarc

even with a script time out, with almost 3 mil records, your end user is going to complain about response times.
Couple of things you could try ... the easiest is to create a stored procedure for your query ... this is faster than having the sql inyour asp page. The second method requires a lot more work ... create html files for each record with meta tags, index the html files using get Index Server and query Index server .. that will give you real quick results ... cheers, have fun!

This discussion is closed to new replies.