Determining data structures for spatial data based on spatial data statistics
AssigneeSap SE
InventorsKai-Niklas Bastian, Michael Jung
Life of this patent
Estimating the term…
Abstract
Some embodiments provide a non-transitory machine-readable medium that stores a program. The program identifies a first data structure having a first type. The first data structure is configured to store a set of geometries. The program further identifies a second data structure associated with the first data structure. The second data structure is configured to store modifications to the set of geometries. The program also perform a merge operation on the first data structure and the second data structure to form a third data structure.
Claims15
A non-transitory machine-readable medium storing a program executable by at least one processing unit of a device, the program comprising sets of instructions for:
- identifying a first data structure having a first type, the first data structure configured to store a set of geometries;
- identifying a second data structure associated with the first data structure, the second data structure configured to store modifications to the set of geometries;
- and
- performing a merge operation on the first data structure and the second data structure to form a third data structure by:
- determining a first set of statistics data associated with the modifications to the set of geometries stored in the second data structure;
- retrieving a second set of statistics data associated with the set of geometries stored in the first data structure;
- determining a second type of data structure from a set of candidate types of data structures based on the first and second sets of statistics data, each of the candidate types of data structures supporting the set of geometries and the modifications to the set of geometries;
- applying the modifications stored in the second data structure to the set of geometries stored in the first data structure to form a modified set of geometries;
- generating the third data structure having the second type, the third data structure configured to store the modified set of geometries;
- and
- storing the modified set of geometries in the third data structure,
- wherein determining the second type of data structure based on the first and second sets of statistics data comprises:
- identifying a subset of a plurality of types of data structures based on the first and second sets of statistics data;
- determining cost values for each type of data structure in the subset of the plurality of types of data structures based on the first and second sets of statistics data;
- and
- determining a type of data structure from the subset of the plurality of types of data structures as the second type of data structure based on the determined cost values,
- wherein the cost values for each type of data structure in the subset of the plurality of types of data structures comprises a storage cost value and a set of query performance cost values,
- wherein determining the type of data structure from the subset of the plurality of types of data structures as the second type of data structure based on the determined cost values comprises applying a defined weight value to each query performance cost value in the set of query performance cost values.
A method comprising:
- identifying a first data structure having a first type, the first data structure configured to store a set of geometries;
- identifying a second data structure associated with the first data structure, the second data structure configured to store modifications to the set of geometries;
- and
- performing a merge operation on the first data structure and the second data structure to form a third data structure by:
- determining a first set of statistics data associated with the modifications to the set of geometries stored in the second data structure;
- retrieving a second set of statistics data associated with the set of geometries stored in the first data structure;
- determining a second type of data structure from a set of candidate types of data structures based on the first and second sets of statistics data, each of the candidate types of data structures supporting the set of geometries and the modifications to the set of geometries
- applying the modifications stored in the second data structure to the set of geometries stored in the first data structure to form a modified set of geometries;
- generating the third data structure having the second type, the third data structure configured to store the modified set of geometries;
- and
- storing the modified set of geometries in the third data structure,
- wherein determining the second type of data structure based on the first and second sets of statistics data comprises:
- identifying a subset of a plurality of types of data structures based on the first and second sets of statistics data;
- determining cost values for each type of data structure in the subset of the plurality of types of data structures based on the first and second sets of statistics data;
- and
- determining a type of data structure from the subset of the plurality of types of data structures as the second type of data structure based on the determined cost values,
- wherein the cost values for each type of data structure in the subset of the plurality of types of data structures comprises a storage cost value and a set of query performance cost values,
- wherein determining the type of data structure from the subset of the plurality of types of data structures as the second type of data structure based on the determined cost values comprises applying a defined weight value to each query performance cost value in the set of query performance cost values.
A system comprising:
- a set of processing units;
- and
- a non-transitory machine-readable medium storing instructions that when executed by at least one processing unit in the set of processing units cause the at least one processing unit to:
- identify a first data structure having a first type, the first data structure configured to store a set of geometries;
- identify a second data structure associated with the first data structure, the second data structure configured to store modifications to the set of geometries;
- and
- perform a merge operation on the first data structure and the second data structure to form a third data structure by:
- determining a first set of statistics data associated with the modifications to the set of geometries stored in the second data structure;
- retrieving a second set of statistics data associated with the set of geometries stored in the first data structure;
- determining a second type of data structure from a set of candidate types of data structures based on the first and second sets of statistics data, each of the candidate types of data structures supporting the set of geometries and the modifications to the set of geometries;
- applying the modifications stored in the second data structure to the set of geometries stored in the first data structure to form a modified set of geometries;
- generating the third data structure having the second type, the third data structure configured to store the modified set of geometries;
- and
- storing the modified set of geometries in the third data structure,
- wherein determining the second type of data structure based on the first and second sets of statistics data comprises:
- identifying a subset of a plurality of types of data structures based on the first and second sets of statistics data;
- determining cost values for each type of data structure in the subset of the plurality of types of data structures based on the first and second sets of statistics data;
- and
- determining a type of data structure from the subset of the plurality of types of data structures as the second type of data structure based on the determined cost values,
- wherein the cost values for each type of data structure in the subset of the plurality of types of data structures comprises a storage cost value and a set of query performance cost values, and
- wherein determining the type of data structure from the subset of the plurality of types of data structures as the second type of data structure based on the determined cost values comprises applying a defined weight value to each query performance cost value in the set of query performance cost values.
Dependencies are inferred from the claim text.