摘要:
A query generator for generating a query which retrieves a desired set of data from a relational database and performs one or more aggregation functions on the set of data is disclosed. The query generator is adapted to: a) receive user input indicating the desired set of data and the aggregation functions to be performed; b) identify each join subgraph for the desired set of data; c) for each join subgraph identified in step (b), generate an inline view which, on execution, performs all of the aggregation functions that refer only to data within that join subgraph; and d) generate an output query comprising the inline views generated in step (c) as arguments of a join.
摘要:
A query generator for generating a query which retrieves a desired set of data from a relational database and performs one or more aggregation functions on the set of data is disclosed. The query generator is adapted to: a) receive user input indicating the desired set of data and the aggregation functions to be performed; b) identify each join subgraph for the desired set of data; c) for each join subgraph identified in step (b), generate an inline view which, on execution, performs all of the aggregation functions that refer only to data within that join subgraph; and d) generate an output query comprising the inline views generated in step (c) as arguments of a join.
摘要:
A query generator for generating a query that returns a result set comprising data retrieved from a database and data returned by an analytic function that operates on at least a portion of the retrieved data is disclosed. The result set is arranged as a table having a plurality of rows, and the query generator is adapted to: a) receive an input query indicating the data to be retrieved from the database, which of these data are to be operated on by the analytic function and the identity of the analytic function; b) analyse the input query to ascertain whether it retrieves a data item or calculates an aggregation result from a plurality of data items that will be repeated across one or more rows of the result set and that is to be operated on by the analytic function; and c) if it does, modify the input query to cause the database to split the retrieved data into a number of partitions such that the data value or aggregation result is present only once in each partition; before operating on the retrieved data with the analytic function.
摘要:
A query generator for generating a query that returns a result set comprising data retrieved from a database and data returned by an analytic function that operates on at least a portion of the retrieved data is disclosed. The result set is arranged as a table having a plurality of rows, and the query generator is adapted to: a) receive an input query indicating the data to be retrieved from the database, which of these data are to be operated on by the analytic function and the identity of the analytic function; b) analyse the input query to ascertain whether it retrieves a data item or calculates an aggregation result from a plurality of data items that will be repeated across one or more rows of the result set and that is to be operated on by the analytic function; and c) if it does, modify the input query to cause the database to split the retrieved data into a number of partitions such that the data value or aggregation result is present only once in each partition; before operating on the retrieved data with the analytic function.
摘要:
Embodiments of the present invention provide an ad-hoc query engine. The ad-hoc query engine comprises a query management module, a metadata module, a data cache module and a viewer module. The query management module receives a query request from a client device. The query request is specified in terms of a plurality of business objects. The query management module utilizes the metadata module to translate the business objects into a structured query language statement as a function of the content of the data cache module. The SQL statement comprises a plurality of aggregation. The query management module dynamically causes each aggregation to be re-directed to execute against the content of the data cache module, when the aggregation is locally or linearly computable from said content of said data cache module. The query management utilizes the viewer module to generate a report as a function of the results of the executed SQL statement.