locked
Slow Database Queries on Production Server RRS feed

  • Question

  • User1428043550 posted

    Hi All,

    I'm looking for some help/guidance relating to an issue with the deployment of my website to a shared hosting service.  I've been testing my website on my local machine using visual web developer and the SQL express server that ships with it.  My website involves several (approx 15 - 20) queries of the database on any given page to display various statistics, table data, graphs etc to the end user.  Now all of this works nicely on my development machine in terms of speed of queries but the moment I upload it to the production server, those queries can take up to 4 or 5 seconds before the page is updated.  This is not exactly what I had in mind for the user.

    I'm struggling to understand where the problem might lie.  Could it be through bad coding/queries on my part, the shared hosting environment (although they tell me its not that) or is it the sheer volume of server side queries I'm executing from the database (and the data behind it which is several thousand rows of data)?  I appreciate that I'm working with a localised database as well so that's probably part of it but surely this is not a unique position I'm in, I've been on other websites where the data is updated within a second or so.

    Am I missing something, anyone have any ideas of the sorts of things I should be looking at?

    Regards

    Steven

    Monday, July 8, 2013 5:09 PM

Answers

  • User-801004448 posted

    5 seconds to load a web page is slow. It could be your hosting server is overloaded.

    Ask your host for support. If loading is not improved, you should try a different host.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 19, 2013 2:04 AM

All replies

  • User-183374066 posted

    those queries can take up to 4 or 5 seconds before the page is updated

    (and the data behind it which is several thousand rows of data

    This time really good. Request goes to server, server process and return response to user .. I think this very good time. 

    If you want changes reflect instantly than do change on client side and send request to server from javascript otherwise 4, 5 seconds for complete request / response is really good.

    Monday, July 8, 2013 6:48 PM
  • User13850534 posted

    May be because of your server location? Have you tried other service?

    Tuesday, July 9, 2013 3:26 AM
  • User1428043550 posted
    Nasser, Thanks for the response. I must admit I'm not really sure how to do this in JavaScript or follow how that works, doesn't the website still need to go to the server for the data regardless? Do you know of any articles that would explain this to me? Top spy, Thanks also for the response. I've checked the location of the servers and they are at least in the same country is me. Looks like JavaScript is the way to go so if anyone does know of any articles that will explain this for me. Cheers Steven
    Tuesday, July 9, 2013 3:48 AM
  • User1428043550 posted
    Nasser, Thanks for the response. I must admit I'm not really sure how to do this in JavaScript or follow how that works, doesn't the website still need to go to the server for the data regardless? Do you know of any articles that would explain this to me? Top spy, Thanks also for the response. I've checked the location of the servers and they are at least in the same country is me. Looks like JavaScript is the way to go so if anyone does know of any articles that will explain this for me. Cheers Steven
    Tuesday, July 9, 2013 3:49 AM
  • User-801004448 posted

    5 seconds to load a web page is slow. It could be your hosting server is overloaded.

    Ask your host for support. If loading is not improved, you should try a different host.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 19, 2013 2:04 AM