I've got a table (info) with 19 rows and 11 columns with object_id as the primary key. I've begun saving query times to begin to get a sense as to how long queries take, and this one:
SELECT language FROM info WHERE object_id = '2'
just took .46 seconds. Could there be any reason for such a slow query aside from the fact that I'm on shared hosting and resources may be being used by others?
Are you sure that is seconds and not milliseconds?
How are you measuring execution time for the query? Sometimes the method used has an effect on how the time is calculated.
It's definitely seconds and I'm using http://framework.zend.com/manual/1.12/en/zend.db.profiler.html. Also, when I run it locally, it's lightening fast...
Did you talk to your web hosting server administrator?
Better talk to them first and ask them to fix the problem.
Thanks for the suggestion. My hosting service has been fantastic so far and I haven't talked to them yet, as I have to wonder if it's just the "risk" associated with a super cheap plan on any shared hosting plan. Further, my queries are running fast today both locally as well as on my site so I have to wonder again, if it might be just because I'm on a shared hosting plan. And, if I'm truly worried about a faster time (perhaps it's not such a big deal with my current traffic level?), then maybe the solution would be to move to semi-dedicated hosting.
Any parting thoughts with those with more experience would be appreciated.
This topic is now closed. New replies are no longer allowed.