INDEX TABLE BASED ROUTING FOR QUERY RESOURCE OPTIMIZATION
First Claim
1. A method for optimizing resources of distributed database replicas, the method comprising:
- receiving, by one or more processors, resource information associated with a plurality of database replicas hosted on a plurality of servers, the resource information including identification of indexes of database tables and a state of each index of the indexes of the database tables for each database replica of the plurality of database replicas;
determining, by one or more processors, whether at least one instance of the indexes of the database tables reside in memory of the plurality of servers, based on the state of each index of the indexes of the database tables, wherein the state of an index indicates whether the index resides in memory;
responsive to determining at least one instance of the indexes of the database tables resides in memory, determining, by one or more processors, whether the at least one instance of the indexes of the database tables that reside in memory are redundant among the plurality of database replicas; and
in response to receiving a query that is directed to at least one database replica of the plurality of database replicas, determining, by one or more processors, whether the query is directed to data for which an index resides in memory, and if so, routing the query to the at least one database replica of the plurality of database replicas, on which the index resides in memory.
2 Assignments
0 Petitions
Accused Products
Abstract
Embodiments of the present invention disclose optimizing resources of distributed database replicas in which one or more processors receive resource information associated with a plurality of database replicas hosted on a plurality of servers, the resource information includes identification of indexes of database tables of each database replica. The instances of indexes residing in memory of the plurality of servers is determined, based on the state of each index, which indicates whether the index resides in memory. The instances of indexes that reside in memory and are redundant among the plurality of database replicas are determined, and in response to receiving a query directed to a database replica, if an index of a database table having the query-requested data resides in memory, the query is routed to the database replica on which the index resides in memory.
3 Citations
20 Claims
-
1. A method for optimizing resources of distributed database replicas, the method comprising:
-
receiving, by one or more processors, resource information associated with a plurality of database replicas hosted on a plurality of servers, the resource information including identification of indexes of database tables and a state of each index of the indexes of the database tables for each database replica of the plurality of database replicas; determining, by one or more processors, whether at least one instance of the indexes of the database tables reside in memory of the plurality of servers, based on the state of each index of the indexes of the database tables, wherein the state of an index indicates whether the index resides in memory; responsive to determining at least one instance of the indexes of the database tables resides in memory, determining, by one or more processors, whether the at least one instance of the indexes of the database tables that reside in memory are redundant among the plurality of database replicas; and in response to receiving a query that is directed to at least one database replica of the plurality of database replicas, determining, by one or more processors, whether the query is directed to data for which an index resides in memory, and if so, routing the query to the at least one database replica of the plurality of database replicas, on which the index resides in memory. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer program product for optimizing resources of distributed database replicas, the computer program product comprising:
one or more computer readable storage media wherein the computer readable storage medium is not a transitory signal per se, and program instructions stored on the one or more computer readable storage media, the program instructions comprising; program instructions to receive resource information associated with a plurality of database replicas hosted on a plurality of servers, the resource information including identification of indexes of database tables and a state of each index of the indexes of the database tables for each database replica of the plurality of database replicas; program instructions to determine whether at least one instance of the indexes of the database tables reside in memory of the plurality of servers, based on a state of each index of the indexes of the database tables, wherein the state of an index indicates whether the index resides in memory; responsive to determining at least one instance of the indexes of the database tables resides in memory, program instructions to determine whether the at least one instance of the indexes that reside in memory are redundant among the plurality of database replicas; and in response to receiving a query that is directed to at least one database replica of the plurality of database replicas, program instructions to determine whether the query is directed to data for which an index resides in memory, and if so, routing the query to the at least one database replica of the plurality of database replicas, on which the index resides in memory. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
15. A computer system for optimizing resources of distributed database replicas, the computer system comprising:
one or more computer processors, one or more computer readable storage media, program instructions stored on the computer readable storage media for execution by at least one of the one or more processors, the program instructions comprising; program instructions to receive resource information associated with a plurality of database replicas hosted on a plurality of servers, the resource information including identification of indexes of database tables and a state of each index of the indexes of the database tables for each database replica of the plurality of database replicas; program instructions to determine whether at least one instance of the indexes of the database tables reside in memory of the plurality of servers, based on the state of each index of the indexes of the database tables, wherein the state of an index indicates whether the index resides in memory; responsive to determining at least one instance of the indexes of the database tables resides in memory, program instructions to determine whether the at least one instance of the indexes of the database tables that reside in memory are redundant among the plurality of database replicas; and in response to receiving a query that is directed to at least one database replica of the plurality of database replicas, program instructions to determine whether the query is directed to data for which an index resides in memory, and if so, routing the query to the at least one database replica on which the index resides in memory. - View Dependent Claims (16, 17, 18, 19, 20)
Specification