Skip to content

Commit

Permalink
server: use system stats view for stats overview queries
Browse files Browse the repository at this point in the history
This commit changes the table used for the combined
stats endpoint from the view combining persisted and
in-memory stats to the view that is just a wrapper
around the system table. Thus, we are now reading
only persisted stats from the system table for the
combined stats endpoint.

Epic: None
Release note: None
  • Loading branch information
xinhaoz authored and maryliag committed Mar 18, 2023
1 parent 4d4ea75 commit 1d64c18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/server/combined_statement_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ SELECT
max(aggregated_ts) as aggregated_ts,
metadata,
crdb_internal.merge_statement_stats(array_agg(statistics)) AS statistics
FROM crdb_internal.statement_statistics %s
FROM crdb_internal.statement_statistics_persisted %s
GROUP BY
fingerprint_id,
transaction_fingerprint_id,
Expand Down Expand Up @@ -329,7 +329,7 @@ SELECT
fingerprint_id,
metadata,
crdb_internal.merge_transaction_stats(array_agg(statistics)) AS statistics
FROM crdb_internal.transaction_statistics %s
FROM crdb_internal.transaction_statistics_persisted %s
GROUP BY
app_name,
fingerprint_id,
Expand Down

0 comments on commit 1d64c18

Please sign in to comment.