Patent attributes
Systems and methods are provided to implement a database request router that routes queries to database servers storing database replicas. In embodiments, the request router maintains caching state metadata that indicates respective caching states of the database servers. For an incoming query, the request router selects a database server to receive the query based on the caching states of the database servers to improve cache utilization. In embodiments, the caching state metadata indicates whether different database objects used by observed queries are cached at individual servers. The database objects used may be determined from execution plans for the queries, obtained from the database servers. In embodiments, the request router may determine a querying pattern of the database and use it to predict an expected time for certain queries. The request router may generate a priming query ahead of the expected time to prepare database server cache for the expected queries.