IP Library Granted Patent US 12688177
Granted Patent B2
US 12688177 · App. 18/449,128 · Granted Jul 21, 2026

Configuring a distributed database

Inventors: Lyubov Nakryyko (Heidelberg, DE); Susanne Janssen (Waldbronn, DE)
Assignee: SAP SE
G06F16/2282G06F16/278
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12688177
App. No.
18/449,128
Granted
Jul 21, 2026
Kind
B2
Abstract

A system of configuring a database which is distributed across multiple nodes according to a table distribution, e.g., by storing respective tables of the database at respective nodes. A graph partitioning procedure is applied to a graph of the distributed database, with vertices representing tables and edges representing cross-table operations. A distribution of the tables across the nodes is determined based on the partitioning. The storage of the tables is configured according to the determined distribution.

Claims (39)

1 . A computer-implemented method of configuring a distributed database, wherein the database is distributed across multiple nodes according to a table distribution by storing respective tables of the database at respective nodes, wherein the method comprises:

obtaining log data indicating previously performed operations on the distributed database;

determining a graph of the distributed database from the log data, wherein respective vertices of the graph represent the respective tables, and wherein respective edges of the graph represent cross-table operations involving adjacent vertices of the respective edges;

wherein the graph is weighted, wherein a weight of an edge indicates a computational cost of cross-table operations involving adjacent vertices of the edge;

applying a graph partitioning procedure to the graph to obtain a partitioning of the graph into multiple subgraphs, each of the multiple subgraphs being associated with at least one vertex of the respective vertices, the graph partitioning procedure being applied to minimize at least one of the number or weight of edges between vertices that belong to different subgraphs, each of the multiple subgraphs being uniquely associated with a particular node of the respective nodes;

determining a distribution of the tables of the distributed database across the multiple nodes based on the partitioning of the graph and on expected costs to replicate information in each of the tables;

obtaining an indication that a table is too expensive to replicate, and merging the subgraph containing the indicated table with one or more subgraphs involved in cross-table operations with the indicated table;

and configuring the storage of the tables according to the determined distribution of the tables across the multiple nodes.

2 . The method of claim 1 , wherein the graph partitioning procedure is configured to perform a heuristic optimization of a modularity of the partitioning.

3 . The method of claim 2 , wherein the graph partitioning procedure is hierarchical, returning partitionings of the graph at multiple levels; and wherein the distribution of the tables is determined based on the multiple partitionings.

4 . The method of claim 1 , wherein the distribution is determined by assigning the respective subgraphs of the partitioning to respective nodes.

5 . The method of claim 4 , wherein the distribution is determined based on respective storage sizes and/or computational loads of the tables of the respective subgraphs.

6 . The method of claim 1 , wherein the distributed database comprises at least 100000 tables.

7 . The method of claim 1 , further comprising determining that an operation is a cross-table operation based on determining that the operation calls a database view or stored procedure and based on determining a set of tables called by the database view or stored procedure.

8 . The method of claim 1 , further comprising obtaining an indication that a table is expensive to replicate, and merging the subgraph containing the indicated table with one or more further subgraphs involved in cross-table operations with the indicated table.

9 . The method of claim 1 , comprising obtaining a user request to move a first subgraph from a first node to a second node to co-locate the first subgraph with a second subgraph on the second node; and automatically determining one or more subgraphs to be moved from the second node to the first node to accommodate the moving of the first subgraph.

10 . The method of claim 1 , comprising reconfiguring the distributed database by moving the tables across the nodes according to the determined distribution.

11 . The method of claim 1 , further comprising obtaining a request for a cross-node operation on the database, the database having been distributed according to the determined distribution; and performing an automated replication to accommodate the request, wherein a further node obtains a slave copy of a table of the cross-node operation from the node that stores the table.

12 . A configuration system for configuring a distributed database, wherein the database is distributed across multiple nodes according to a table distribution by storing respective tables of the database at respective nodes, wherein the system comprises:

a data interface for accessing data representing a graph of the distributed database, wherein respective vertices of the graph represent the respective tables, and wherein respective edges of the graph represent cross-table operations involving adjacent vertices of the respective edges;

wherein the graph is weighted, wherein a weight of an edge indicates a computational cost of cross-table operations involving adjacent vertices of the edge;

a processor subsystem configured to: apply a graph partitioning procedure to the graph to obtain a partitioning of the graph into multiple subgraphs, each of the multiple subgraphs being associated with at least one vertex of the respective vertices, the graph partitioning procedure being applied to minimize at least one of the number or weight of edges between vertices that belong to different subgraphs, each of the multiple subgraphs being uniquely associated with a particular node of the respective nodes;

determine a distribution of the tables of the distributed database across the multiple nodes based on the partitioning of the graph and on expected costs to replicate information in each of the tables;

obtain an indication that a table is too expensive to replicate, and merge the subgraph containing the indicated table with one or more subgraphs involved in cross-table operations with the indicated table; and

configure the storage of the tables according to the determined distribution of the tables across the multiple nodes.

13 . The configuration system of claim 12 , wherein the graph partitioning procedure is configured to perform a heuristic optimization of a modularity of the partitioning.

14 . The configuration system of claim 13 , wherein the graph partitioning procedure is hierarchical, returning partitionings of the graph at multiple levels; and wherein the distribution of the tables is determined based on the multiple partitionings.

15 . The configuration system of claim 12 , wherein the distribution is determined by assigning the respective subgraphs of the partitioning to respective nodes.

16 . The configuration system of claim 15 , wherein the distribution is determined based on respective storage sizes and/or computational loads of the tables of the respective subgraphs.

17 . A non-transitory computer-readable medium storing data representing instructions which, when executed by a processor system, cause the processor system to:

obtain log data indicating previously performed operations on the distributed database;

determine a graph of a database from the log data, wherein the database is distributed across multiple nodes according to a table distribution by storing respective tables of the database at respective nodes, wherein respective vertices of the graph represent the respective tables, and wherein respective edges of the graph represent cross-table operations involving adjacent vertices of the respective edges;

wherein the graph is weighted, wherein a weight of an edge indicates a computational cost of cross-table operations involving adjacent vertices of the edge;

apply a graph partitioning procedure to the graph to obtain a partitioning of the graph into multiple subgraphs, each of the multiple subgraphs being associated with at least one vertex of the respective vertices, the graph partitioning procedure being applied to minimize at least one of the number or weight of edges between vertices that belong to different subgraphs, each of the multiple subgraphs being uniquely associated with a particular node of the respective nodes;

determine a distribution of the tables of the database across the multiple nodes based on the partitioning of the graph and on expected costs to replicate information in each of the tables;

obtain an indication that a table is too expensive to replicate, and merge the subgraph containing the indicated table with one or more subgraphs involved in cross-table operations with the indicated table; and

configure the storage of the tables according to the determined distribution of the tables across the multiple nodes.

18 . The medium of claim 17 , wherein the graph partitioning procedure is configured to perform a heuristic optimization of a modularity of the partitioning.

19 . The medium of claim 18 , wherein the graph partitioning procedure is hierarchical, returning partitionings of the graph at multiple levels; and wherein the distribution of the tables is determined based on the multiple partitionings.