|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
sql queries taking longer
I have a survey site that allows people to sign up for an account and create their own surveys and collect data on my server.
Before I had any customers, the speed of retrieving survey data was very fast. But, it is becoming progressively slower to retrieve data the more customer accounts there are. Many accounts have surveys with 20 or 30 questions and with 100+ responses. I even did a parallel test with the same survey and retrieved survey data from one database that had just one customer account and then one from my current database with 1000+ customer accounts. In some cases it took 3 minutes on the larger database to pull survey data that could be pulled in just a few seconds with the smaller database. First of all, why is this happening? Second of all, I want to determine how to optimize my site (which is written in .net (.aspx) and uses sql 2000 so it will run just as fast with a thousand accounts as it would with one account. Any thoughts on what could be going on and what I could do to fix this? Thanks. Andrew |
|
#2
|
||||
|
||||
|
U probably need a few indexes added to the tables. Do you have access to Query Analyzer? If so, do the following:
(a) Enter the query that you want to profile. (b) Type Ctrl-L to display the Estimated Execution Plan (or hit the speed button for this -- should be to the right of the database selection combo box). (c) In the Estimated Execution Plan diagram, determine which parts of the query take the most time and add indexes as needed.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > sql queries taking longer |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|