You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Mostly a placeholder issue for now.
We want to provide visibility into query performance
I think the overall plan here is to use
pg_stat_statements
(https://www.postgresql.org/docs/current/pgstatstatements.html) to collect information.I think the core questions are:
How do we connect our EdgeQL queries with information from pg_stat_statments?
We forked pg_stat_statements to record custom information like EdgeQL query string, compilation settings, etc.
How do we expose the information to our users?
sys::QueryStats
is added as a view of thepg_stat_statements
backend view.tag
to identify the source of queries (Add "tag" annotation for queries #8036)The text was updated successfully, but these errors were encountered: