I have a simple query that checks for an id and typically returns no results.
On phpmyadmin this query executes roughly at: 0.0004 seconds. On the php server and as mysqli command it takes on average.1 seconds. This is significant for what I'm doing and I would like to close the gap.
It's not a cache issue...as nocaching the query in phpmyadmin still runs fast.
Is this the fault of Mysqli?
Now...phpmyadmin is on the database server, while the webserver is a separate machine. The webserver does connect to an IP and not a domain name though (no need for resolution).
Could persistent connections help?
Ideas for what could be the problem?
--
Example Query:
select kitchen_id from kitchen_options where kitchen_appliance = 3.
So very small...18 row table. kitchen_id
is an int. Typically no results.
Still slow :( But phpMyAdmin is fast...