主权项 |
1. A computer-implemented method comprising:
receiving a data request that is associated with a query that requires data from each of multiple, different data sources; identifying data required from each of the multiple, different data sources to satisfy the query; determining, for each of the multiple, different data sources, a cost characteristic related to moving, to a corresponding data source, the identified data required from the multiple, different data sources other than the corresponding data source and executing the query at the corresponding data source; comparing the determined cost characteristics with each other; based on comparison results, selecting, from among the multiple, different data sources, a primary data source that is associated with the determined cost characteristic that indicates lowest cost of moving, to the primary data source, the identified data required from the multiple, different data sources other than the primary data source and executing the query at the primary data source; based on the selection of the primary data source, moving, into a table included in the primary data source, the identified data required from the multiple, different data sources other than the primary data source; subsequent to moving, into the table included in the primary data source, the identified data required from the multiple, different data sources other than the primary data source, executing the query against data included in the primary data source; and providing a response to the data request based on the execution of the query against data included in the primary data source; wherein the determining, for each of the multiple, different data sources, a cost characteristic related to moving, to the corresponding data source, the identified data required from the multiple, different data sources other than the corresponding data source and executing the query at the corresponding data source comprises:
determining a first volume measurement of data required from a first data source to satisfy the query, anddetermining a second volume measurement of data required from a second data source to satisfy the query, the second data source being different than the first data source; wherein the comparing the determined cost characteristics with each other comprises comparing the first volume measurement with the second volume measurement; and wherein the selecting, from among the multiple, different data sources, the primary data source that is associated with the determined cost characteristic that indicates lowest cost of moving, to the primary data source, the identified data required from the multiple, different data sources other than the primary data source and executing the query at the primary data source comprises:
when the comparison reveals that the first volume measurement is greater than the second volume measurement, selecting the first data source as the primary source to receive data from the second data source; andwhen the comparison reveals that the second volume measurement is greater than the first volume measurement, selecting the second data source as the primary source to receive data from the first data source. |