General discussion


reducing data fetching time...

By prasad.patole87 ·
I am working on classic asp with sql server 2005 as a backend. There is too much data in table, and i am using dial up connection. When i query for a perticular data it comes on one pc but sometimes the same query is not working with another. So what could be the problem?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Too many variables, to say from here, you

by Tony Hopkinson In reply to reducing data fetching ti ...

need to look at it piece by piece. If I get your description

Browser -> dialup -> IIS -> ASP Script -> SQL2005

And back is your route, and I'm assuming you are getting a web time out.

So your only real points of attack are the script(s) and the database.

Too much data in the table is a clue.
Too much as in slow query or you are dragging too much out of it?

Slow query, you need to look at what it is doing (ShowPlan), add an index may be, perhaps normalise the table, engineer out subqueries, use stored procedures.

If you are dragging a lot of data into the script Select * from Table for instance, then you've got to stop doing that. Add where clauses, use a summary and then drill into to it to get more detail about less data. Get a page at a time.

One of the classic, novice mistakes is not to use the database server. ie get all the data and then process it with code.The more you can do with SQL on the DBMS itself the better off you'll be.

Another is running too many queries. as in SElect MyID from MyTable
Loop through them doing
select * from MyTable Where MyID = ?

It's actually faster to do that in one go, with straight SQL as something like 40% of the server time is parsing the sql....

Intermittently working, could be a problem with the client, whatever they re using their bandwidth for. A shocking number of people complain about poor loading speed on the web, and you look and they've got a P2P client rattling away in the back....

Other than that sort of thing, you've got little chance of affecting network performance on an external network, so all you can do is cut down/ break up your dependence on it.


Related Discussions

Related Forums