Hacker News new | ask | show | jobs
by m2mdas2 2303 days ago
Semi related, SQL Server have query store feature which records query insights on production db and in SSMS you can see the query statistics on various metrics like resource uses, execution counts etc along with query plan applied.

I haven't dug deep into SQL server yet, but query store suggestions are good enough for now.

1 comments

We call it macro-analysis -- the analysis of SQL workload as a whole, with call counts, timing, memory-related metrics, etc.

Currently, Joe helps with micro analysis: you take just one SQL query, don't think about others and solve the task of optimizing this particular query.

For "macro", Postgres ecosystem has pg_stat_statements (and our tool postgres-checkup https://gitlab.com/postgres-ai/postgres-checkup for automated health checks builds reports on top of it), pgBadger to analyze logs, auto_explain to capture execution plans.

Building the "bridge" between macro- and macro-analyses is a very interesting topic. I'm going to give a talk about this particular topic at the next PGCon.