摘要 |
A query profiling system and associated operating methods implement a database query profiler. The illustrative database system comprises a parser, a query model, a catalog manager, a binder and view rewriter, and a query analyzer. The parser parses statements by checking syntax of a statement according to a structured query language (SQL) grammar and representing the statements in a syntax-oriented internal format. The catalog manager processes data definition SQL statements (DDL) that are transformed to the internal representation; transform the representations of the DDL to database objects abstractions; groups the database objects into a Catalog. The binder and view rewriter take the internal representations obtained by parsing workload queries (data manipulation SQL statements or DML) and rewrite table references by their corresponding View definitions; bind database object references to their actual database objects contained in the catalog. The query analyzer analyzes the queries for relevant attributes and stores the attributes in a profile repository. |