Generate a performance report (AWR / ASH and equivalents)
Oracle
-- AWR report (SQL*Plus):
@?/rdbms/admin/awrrpt.sql
-- ASH report: @?/rdbms/admin/ashrpt.sql
-- Live: SELECT * FROM v$active_session_history WHERE sample_time > SYSDATE-1/24;AWR/ASH require the Diagnostics Pack license. Statspack is the unlicensed equivalent.
PostgreSQL
-- pg_stat_statements summary + pg_profile/pgBadger:
SELECT queryid, calls, total_exec_time, mean_exec_time, query
FROM pg_stat_statements ORDER BY total_exec_time DESC LIMIT 20;For an AWR equivalent, use the pg_profile extension (periodic snapshots) or pgBadger log analysis.
MySQL
-- sys schema summaries:
SELECT * FROM sys.statement_analysis LIMIT 20;
SELECT * FROM sys.io_global_by_file_by_bytes LIMIT 10;The sys schema turns performance_schema into readable reports; Enterprise Monitor is more comprehensive.
SQL Server
-- Query Store reports (SSMS) or:
SELECT TOP 20 * FROM sys.query_store_runtime_stats ORDER BY avg_duration DESC;Query Store keeps plans/performance over time; sp_BlitzFirst (community) gives quick diagnostics.
MongoDB
# Live from the shell: mongostat --rowcount 10 ; mongotop
// or Atlas Performance Advisor / profiler:
db.system.profile.find().sort({millis:-1}).limit(20)mongostat/mongotop show instantaneous load; the profiler records slow operations.
Redis
INFO stats
redis-cli --latency-history
SLOWLOG GET 20--latency and --latency-history give the latency profile; INFO gives all counters.
Elasticsearch
GET _nodes/stats
GET _cat/thread_pool?v&h=node_name,name,active,queue,rejected
GET _nodes/hot_threadshot_threads shows the most expensive threads; _nodes/stats gives holistic metrics. Monitoring (Kibana) is historical.