Methods and systems for performing database operations
AssigneeXero Limited
InventorsCassandra Mcfaull, Geoff Thornburrow
Life of this patent
Estimating the term…
Abstract
Methods for performing a query operation on a database comprise selecting a connection to the database from a plurality of connections to the database, the connections being arranged within a data structure and each having a predetermined number of query slots; waiting for a query slot to be available on the selected connection; in response to determining that the predetermined number of query slots include at least one available query slot, accessing one of the at least one available query slots; reordering the plurality of connections within the data structure; causing the query operation to execute at least partially using the accessed query slot; and releasing the accessed query slot.
Claims20
A method for adaptively queuing connections to a database, the method comprising:
- accessing a data structure comprising a plurality of nodes, wherein each node corresponds to a connection to the database and has an associated number of empty query slots;
- selecting a first node and a second node from within the data structure, wherein the first node and the second node are adjacent nodes;
- determining whether a precedence value of the first node is equal, higher or lower than a precedence value of the second node, wherein the precedence value of a node corresponds to a number of empty query slots associated with that node;
- based on the determination, determining an action to perform on the first node and the second node;
- performing the determined action;
- and
- selecting a new pair of nodes to process.
A device for adaptively queuing connections to a database, the device comprising:
- a processor;
- and
- a memory, the memory storing instructions executable by the processor;
- wherein, when the processor executes the instructions stored in the memory, the processor is caused to:
- access a data structure comprising a plurality of nodes, wherein each node corresponds to a connection to the database and has an associated number of empty query slots;
- select a first node and a second node from within the data structure, wherein the first node and the second node are adjacent nodes;
- determine whether a precedence value of the first node is equal, higher or lower than a precedence value of the second node, wherein the precedence value of a node corresponds to the number of empty query slots associated with that node;
- based on a comparison, determine an action to perform on the first node and the second node;
- perform the determined action;
- and
- select a new pair of nodes to process.
A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform a method for adaptively queuing connections to a database, the method comprising:
- accessing a data structure comprising a plurality of nodes, wherein each node corresponds to a connection to the database and has an associated number of empty query slots;
- selecting a first node and a second node from within the data structure, wherein the first node and the second node are adjacent nodes;
- determining whether a precedence value of the first node is equal, higher or lower than a precedence value of the second node, wherein the precedence value of a node corresponds to the number of empty query slots associated with that node;
- based on a comparison, determining an action to perform on the first node and the second node;
- performing the determined action;
- and
- selecting a new pair of nodes to process.
Dependencies are inferred from the claim text.