-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add query performance statistics (#7869)
Add edb_stat_statements Postgres extension (forked from the master branch of the upstream pg_stat_statement extension) to handle custom query performance statistics. `sys::QueryStats` is added as a view of the statistics. This is done in a way that, for each stats-significant SQL we send to the backend, one or more comment lines of "query stats info" JSONs are prepended for the Postgres extension to ingest and record in the modified statistics hash table. Among the stats info fields, `id: uuid` is especially important to identify different queries and accumulate stats of the same query onto the same hash table entry, which reflects some settings that affected the compilation (excluding the user schema version for common grouping of stats). Particularly, the first-8-bytes of `id` is also used by the Postgres extension to replace the underlying `queryId` of the SQL statement, so that the same frontend query can be recognized across all PARSE/EXECUTE operations in Postgres for stats recording. System queries, DDLs, and unrecognized queries are not recorded. Refs #7725
- Loading branch information
Showing
55 changed files
with
9,388 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.