Caching external data sources for SQL processing
First Claim
1. A method for optimizing query processing, the method comprising:
- storing, at a database system, metadata for an external table;
wherein the metadata for the external table defines one or more columns for the external table and how data from an external data source maps to the one or more columns of the external table;
receiving, at the database system, a query that requires foreign data from the external data source;
in response to receiving the query, determining whether the foreign data currently resides in a cache of the database system;
in response to determining that the foreign data does not currently reside in the cache;
retrieving the foreign data from the external data source;
wherein the external data source has a different structure and format than the database system and the foreign data is stored in a particular format and structure associated with the external data source;
mapping, based on the metadata for the external table, the foreign data from the particular format and structure associated with the external data source to a column granule of the external table; and
storing the column granule in the cache.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are provided for caching external data sources for SQL processing. According to an embodiment, a database system receives a query that requires foreign data from an external data source. In response to receiving the query, the database system determines whether the foreign data currently resides in a cache of the database system. In response to determining that the foreign does not currently reside in the cache, the database system retrieves the foreign data from the external data source, maps the foreign data to a column granule of a table, and stores the column granule in the cache. In another embodiment, the database system receives a second query that requires the foreign data. In response to determining that the foreign data is cached with the stored column granule, the database system retrieves the column granule from the cache.
-
Citations
20 Claims
-
1. A method for optimizing query processing, the method comprising:
-
storing, at a database system, metadata for an external table; wherein the metadata for the external table defines one or more columns for the external table and how data from an external data source maps to the one or more columns of the external table; receiving, at the database system, a query that requires foreign data from the external data source; in response to receiving the query, determining whether the foreign data currently resides in a cache of the database system; in response to determining that the foreign data does not currently reside in the cache;
retrieving the foreign data from the external data source;
wherein the external data source has a different structure and format than the database system and the foreign data is stored in a particular format and structure associated with the external data source;mapping, based on the metadata for the external table, the foreign data from the particular format and structure associated with the external data source to a column granule of the external table; and storing the column granule in the cache. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. One or more non-transitory computer-readable media storing sequences of instructions, that when executed by one or more processors, cause:
-
storing, at a database system, metadata for an external table; wherein the metadata for the external table defines one or more columns for the external table and how data from an external data source maps to the one or more columns of the external table; receiving, at the database system, a query that requires foreign data from the external data source; in response to receiving the query, determining whether the foreign data currently resides in a cache of the database system; in response to determining that the foreign data does not currently reside in the cache;
retrieving the foreign data from the external data source;
wherein the external data source has a different structure and format than the database system and the foreign data is stored in a particular format and structure associated with the external data source;mapping, based on the metadata for the external table, the foreign data from the particular format and structure associated with the external data source to a column granule of the external table; and storing the column granule in the cache. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification