0

When the DB is on a remote server, is there any tool to cache frequent queries on the main server in order to reduce database connections?

If there are any available, what features should I consider before choosing one?

In my case I am using PHP and mysql with Litespeed as the web server.

0

If the remote database is on the same local area network as the main server there is no need to cache queries.

If the remote database is somewhere else, consider creating a replication slave so the available data is local.

If your frequency queries are slow, post details of them and the dba stack overflow community will assist you in making the better or faster which usually won't involve a cache at all.

  • what should I do when there are multiple databases? my project has separate databases for different users. – Ali Sh Dec 18 '18 at 5:39
  • one database server can handle multiple databases. Recommend you create a different user per database. Not sure what this has to do with caching. This is sounding like an XY problem. – danblack Dec 18 '18 at 7:19
  • A slave DB server is not a caching tool, it also use alot of resources. I only want to cache the result of frequent queries. Will any of these can solve my problem? – Ali Sh Dec 19 '18 at 5:22
  • You haven't described a problem, only a solution. If the queries are slow, describe those (in a different question). If they aren't solvable usually a summary table is a solution before a non-database cache mechanism. Describe the problem first. – danblack Dec 19 '18 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.