# US 10,120,900 B1 · Processing a database query using a shared metadata store

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,120,900 B1
- Document ID: US10120900B1
- Status: Granted
- Kind: B1
- Application number: 13/838,955
- Filed: 2013-03-15
- Granted: 2018-11-06
- Earliest claimed: 2013-02-25
- Assignees: EMC IP Holding Company LLC
- Applicants: EMC IP Holding Company LLC
- Inventors: Caleb Welton; Hitoshi Harada; Jeffrey Cohen; Lei Chang; Radhika Reddy; Tao Ma; Zhanwei Wang
- Web page: https://patentgrep.com/patent/US10120900B1

## CPC

- G06F 16/24542: {Plan optimisation}
- G06F 16/10: File systems; File servers
- G06F 16/11: File system administration, e.g. details of archiving or snapshots (error detection or correction of the data by redundancy in operations G06F11/14)
- G06F 16/148: {File search processing}
- G06F 16/182: Distributed file systems
- G06F 16/1858: {Parallel file systems, i.e. file systems supporting multiple processors}
- G06F 16/24524: {Access plan code generation and invalidation; Reuse of access plans}
- G06F 16/2453: Query optimisation
- G06F 16/24532: {of parallel queries}
- G06F 16/2455: Query execution
- G06F 16/2471: {Distributed queries}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/907: Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- H04L 65/60: Network streaming of media packets
- H04L 67/1097: for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
- G06F 16/113: {Details of archiving (lifecycle management in storage systems G06F3/0649; point-in-time backing up or restoration of persistent data G06F11/1446)}
- G06F 16/217: {Database tuning (G06F16/2282 takes precedence; database performance monitoring G06F11/3409)}
- G06F 16/245: Query processing
- G06F 16/43: Querying
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method and system for executing a query in parallel is disclosed. A master node may receive a query from a client and develop query plans from that query. The query plans may be forwarded to worker nodes for execution, and each query plan may be accompanied by query metadata. The metadata may be stored in a catalog on the master node.

## Claims

### Claim 1

A method for executing queries in a parallel processing database system, comprising:
receiving a query at a master node, the master node comprising a database catalog including metadata defining database objects;
in response to receiving the query at the master node, initiating a catalog server session, taking a snapshot of the metadata, and associating the snapshot of the metadata with the catalog server session, wherein a separate catalog server session is initiated and a separate snapshot of the metadata is taken for each query;
transmitting a query plan and query metadata to a worker node, wherein the query plan is based on the query, wherein the query metadata includes metadata for executing the query plan, wherein the query metadata includes database table definitions that define database objects, and wherein the query metadata is retrieved from the snapshot of the metadata associated with the catalog server session;
receiving, by the master node, a request for additional metadata that is required for the worker node to execute the query plan, wherein in response to a determination that the worker node requires the additional metadata for the worker node to execute the query plan, the worker node queries a parent in a tree structure of a plurality of worker nodes in the parallel processing database system for the additional metadata, wherein the parent node is a node between the master node and the worker node in relation to the tree structure;
communicating, to the worker node, the additional metadata that is required for the worker node to execute the query plan, wherein the additional metadata is retrieved from a same session as the catalog server session corresponding to the query;
executing the query plan on the worker node; and
returning, to the master node, a result associated with the execution of the query plan on the worker node.

### Claim 2 (depends on 1)

The method of claim 1, further comprising generating a plurality of query plans based on the query.

### Claim 3 (depends on 2)

The method of claim 2, further comprising transmitting the plurality query plans to a plurality of worker nodes.

### Claim 4 (depends on 3)

The method of claim 3, further comprising executing the plurality of query plans in parallel.

### Claim 5 (depends on 1)

The method of claim 1, further comprising storing the query metadata in a cache on the worker node.

### Claim 6 (depends on 5)

The method of claim 5, further comprising clearing the cache after executing the query plan.

### Claim 7 (depends on 5)

The method of claim 5, further comprising retrieving the query metadata from the cache while executing the query plan.

### Claim 8 (depends on 1)

The method of claim 1, further comprising transmitting a request for the additional metadata from the worker node to the master node.

### Claim 9 (depends on 8)

The method of claim 8, further comprising transmitting the additional metadata to the worker node.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
compiling the result associated with the execution of the query plan on the worker node with another result associated with the query; and
returning the compiled result and other result as a final query result to a client.

### Claim 11 (depends on 1)

The method of claim 1, wherein the query metadata includes one or more of a user defined database function, a system defined database function, a database view, and a database index.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
receiving another query at the master node;
in response to receiving the other query, initiating another catalog server session, taking, another snapshot of the metadata as the metadata existed when the other catalog server session is initiated, and associating the other snapshot of the metadata with the other catalog server session; and
transmitting another query plan and other query metadata to the worker node, wherein the other query metadata is retrieved from the snapshot of the metadata associated with the other catalog server session.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
in response to receiving the query plan and the query metadata, determining, by the worker node, that additional metadata is required for the worker node to execute the query plan;
in response to determining that additional metadata is required, requesting, by the worker node, the additional metadata; and
receiving the additional metadata, wherein the additional metadata is retrieved from the snapshot of the metadata associated with the catalog server session.

### Claim 14 (depends on 1)

The method of claim 1, wherein in the event that additional metadata is required in connection with the query, the additional metadata is obtained from the snapshot of the metadata corresponding to the query.

### Claim 15 (depends on 1)

The method of claim 1, wherein the querying a parent in the tree structure of a plurality of worker nodes comprises successively querying one or more parent nodes for the additional metadata before querying the master node for the additional metadata.

### Claim 16 (depends on 15)

The method of claim 15, wherein the successively querying one or more parent nodes for the additional metadata before querying the master node for the additional metadata comprises at least one of the one or more parent nodes forwarding a request for the additional metadata to another of the one or more parent nodes.

### Claim 17 (depends on 1)

The method of claim 1, wherein the request for additional metadata is communicated to the master node in response to the worker node determining that the worker node requires the additional metadata to execute the query plan.

### Claim 18

A computer program product for executing queries in a parallel processing database system, comprising a non-transitory computer readable medium having program instructions embodied therein for:
receiving a query at a master node, the master node comprising a database catalog including metadata defining database objects;
in response to receiving the query at the master node, initiating a catalog server session, taking a snapshot of the metadata, and associating the snapshot of the metadata with the catalog server session, wherein a separate catalog server session is initiated and a separate snapshot of the metadata is taken for each query;
transmitting a query plan and query metadata to a worker node, wherein the query plan is based on the query, wherein the query metadata includes metadata for executing the query plan, wherein the query metadata includes database table definitions that define database objects, and wherein the query metadata is retrieved from the snapshot of the metadata associated with the catalog server session;
receiving, by the master node, a request for additional metadata that is required for the worker node to execute the query plan, wherein in response to a determination that the worker node requires the additional metadata for the worker node to execute the query plan, the worker node queries a parent in a tree structure of a plurality of worker nodes in the parallel processing database system for the additional metadata, wherein the parent node is a node between the master node and the worker node in relation to the tree structure;
communicating, to the worker node, the additional metadata that is required for the worker node to execute the query plan, wherein the additional metadata is retrieved from a same session as the catalog server session corresponding to the query;
executing the query plan on the worker node; and
returning, to the master node, a result associated with the execution of the query plan on the worker node.

### Claim 19 (depends on 18)

The computer program of claim 18, further comprising instructions for storing the query metadata in a cache on the worker node.

### Claim 20 (depends on 19)

The computer program of claim 19, further comprising instructions for clearing the cache after executing the query plan.

### Claim 21 (depends on 19)

The computer program of claim 19, further comprising instructions for retrieving the query metadata from the cache while executing the query plan.

### Claim 22 (depends on 18)

The computer program of claim 18, further comprising instructions for transmitting a request for the additional metadata from the worker node to the master node.

### Claim 23 (depends on 22)

The computer program of claim 22, further comprising instructions for transmitting the additional metadata to the worker node.

### Claim 24

A system for executing queries in a parallel processing database, comprising a non-transitory computer readable medium and a processor configured to:
receive a query at a master node, the master node comprising a database catalog including metadata defining database objects;
in response to receiving the query at the master node, initiating a catalog server session, taking a snapshot of the metadata, and associating the snapshot of the metadata with the catalog server session, wherein a separate catalog server session is initiated and a separate snapshot of the metadata is taken for each query;
transmit a query plan and query metadata to a worker node, wherein the query plan is based on the query, wherein the query metadata includes metadata for executing the query plan, wherein the query metadata includes database table definitions that define database objects, and wherein the query metadata is retrieved from the snapshot of the metadata associated with the catalog server session;
receive, by the master node, a request for additional metadata that is required for the worker node to execute the query plan, wherein in response to a determination that the worker node requires the additional metadata for the worker node to execute the query plan, the worker node queries a parent in a tree structure of a plurality of worker nodes in the parallel processing database system for the additional metadata, wherein the parent node is a node between the master node and the worker node in relation to the tree structure;
communicate, to the worker node, the additional metadata that is required for the worker node to execute the query plan, wherein the additional metadata is retrieved from a same session as the catalog server session corresponding to the query;
execute the query plan on the worker node; and
return, to the master node, a result associated with the execution of the query plan on the worker node.

### Claim 25 (depends on 24)

The system of claim 24, wherein the processor is further configured to generate a plurality of query plans based on the query.

### Claim 26 (depends on 25)

The system of claim 25, wherein the processor is further configured to transmit the plurality query plans to a plurality of worker nodes.

### Claim 27 (depends on 26)

The system of claim 26, wherein the processor is further configured to execute the plurality of query plans in parallel.

### Claim 28 (depends on 24)

The system of claim 24, wherein the processor is further configured to store the query metadata in a cache on the worker node.
