Open joshua-spacetime opened 3 weeks ago
The schema of the slow query log | Name | Type | Description |
---|---|---|---|
query | string | text of the slow query | |
workload | enum | subscription, incremental update, ad hoc | |
duration | u64 | duration of the query in milliseconds | |
identity | Identity | calling identity for this query |
https://github.com/clockworklabs/SpacetimeDB/issues/1071 captures slow queries through the SpacetimeDB server logs. Now we should give users the same insight with a slow query system table. They should be able to configure the 3 thresholds (subscriptions, ad hoc, incremental update) in the same way we can do now.
Something worth noting is that queries are executed in read-only transactions, but writing to a table requires a mutable transaction. This may require making read-only transactions upgradable. Basically the opposite direction of #1157.