kreut — 2013-08-22T10:39:01-04:00 — #1
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?
force — 2013-08-23T20:42:26-04:00 — #2
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.
kreut — 2013-08-24T04:27:17-04:00 — #3
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...
solidcodes — 2013-08-25T03:28:58-04:00 — #4
Did you talk to your web hosting server administrator?
Better talk to them first and ask them to fix the problem.
kreut — 2013-08-25T13:00:37-04:00 — #5
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.