I have had a hosting account with a company (with good reputaion) which I have been very happy with for several years when using simple php and static html based sites.
However, recently I set up a database (wordpress) site and the performance of database queries seem poor to me (using MySQL).
Since I have no previous experience with databases, I want to check if this really is all that can be expected or if there is likely to be a problem somewhere.
The first access to my site, which according to wordpress means 64 queries to the database, often takes about 10 seconds. Subsequent accesses are then very fast (typically 0.2 seconds or so which include php etc), also to other pages which does different database queries than the first page. So it seems to me there is something slow with the initial connection.
According to my webhost this is because at the first access to the page the database needs to read from disk etc, but in subsequent accesses table-caching provides fast response from the database.
This makes sense, BUT is it really possible that it should take 10 seconds for the database access, even if tables are not in cache?
Some more info:
The load on the the database and the webserver (different machines) is very low, so CPU resources should not be a problem. The database is very little so far. The wordpress site has 9 posts and 9 comments…