Patent attributes
A computerized query optimization methodology, computer program product, and electronic device for intelligently optimizing the lookup of graphed data in a data store or distributed across a plurality of databases is disclosed. The method defines an initial metafuture including a plurality of attributes starting with initial data references to determine a starting list of data reference dependencies with respect to metafuture construction functions. In response to a query, a processor initiates a recursive graph traversal of nodes in a graph starting with the initial metafuture as a root node. At each step of the graph traversal, if the metafuture contains an answer, then the process traverses the graph laterally. If there are no further siblings, then the processor initiates a vertical traversal. If all of the children of the metafuture contain answers and the metafuture has no dependency tuples, then an answer of the metafuture is populated by running a graphing function with the answers of the children metafutures, and continuing the traversal either laterally, or vertically if there are no further siblings. If the metafuture is unvisited in the current traversal, then the process adds all not in-map data references in the work list to a needed list, and resolves all in-map data references to metafuture children while continuing the traversal down the graph. After the traversal, if the root metafuture contains an answer, the answer to the query is returned.