-
Global information
- Generated on Thu Apr 30 06:06:32 2026
- Log file: /var/log/postgresql/postgresql-2026-03-25_000000.csv, ..., /var/log/postgresql/postgresql-2026-04-30_000000.csv
- Parsed 262,635 log entries in 6m31s
- Log start from 2026-04-19 00:00:01 to 2026-04-19 23:59:43
-
Overview
Global Stats
- 34 Number of unique normalized queries
- 25,635 Number of queries
- 1d17h50m26s Total query duration
- 2026-04-19 00:00:01 First query
- 2026-04-19 23:59:02 Last query
- 18 queries/s at 2026-04-19 13:57:01 Query peak
- 1d17h50m26s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 1d17h50m26s Execute total duration
- 20 Number of events
- 1 Number of unique normalized events
- 20 Max number of times the same event was reported
- 0 Number of cancellation
- 9 Total number of automatic vacuums
- 9 Total number of automatic analyzes
- 1,913 Number temporary file
- 986.59 MiB Max size of temporary file
- 125.92 MiB Average size of temporary file
- 22,583 Total number of sessions
- 9 sessions at 2026-04-19 12:57:44 Session peak
- 2h7m45s Total duration of sessions
- 339ms Average duration of sessions
- 1 Average queries per session
- 6s669ms Average queries duration per session
- 0ms Average idle time per session
- 22,583 Total number of connections
- 39 connections/s at 2026-04-19 18:35:14 Connection peak
- 2 Total number of databases
SQL Traffic
Key values
- 18 queries/s Query Peak
- 2026-04-19 13:57:01 Date
SELECT Traffic
Key values
- 4 queries/s Query Peak
- 2026-04-19 23:00:24 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 18 queries/s Query Peak
- 2026-04-19 13:57:01 Date
Queries duration
Key values
- 1d17h50m26s Total query duration
Prepared queries ratio
Key values
- 0.00 Ratio of bind vs prepare
- 0.00 % Ratio between prepared and "usual" statements
General Activity
↑ Back to the top of the General Activity tableDay Hour Count Min duration Max duration Avg duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Apr 19 00 1,020 0ms 0ms 0ms 0ms 0ms 0ms 01 1,021 0ms 1s91ms 527ms 18s550ms 18s550ms 18s550ms 02 1,020 1s91ms 1s91ms 1s91ms 18s550ms 18s550ms 18s550ms 03 1,020 1s91ms 1s91ms 1s91ms 18s550ms 18s550ms 18s550ms 04 1,020 1s91ms 1s91ms 1s91ms 18s550ms 18s550ms 18s550ms 05 1,020 1s91ms 1s91ms 1s91ms 18s550ms 18s550ms 18s550ms 06 1,020 1s91ms 1s91ms 1s91ms 18s550ms 18s550ms 18s550ms 07 1,022 1s91ms 3s914ms 1s972ms 1m6s 1m6s 1m10s 08 1,022 3s803ms 3s858ms 3s851ms 1m5s 1m5s 1m8s 09 1,036 500ms 5s785ms 3s736ms 1m6s 1m9s 1m45s 10 1,026 3s618ms 3s774ms 3s715ms 1m5s 1m7s 1m7s 11 1,026 3s650ms 3s735ms 3s691ms 1m5s 1m6s 1m7s 12 1,050 507ms 23s262ms 3s942ms 1m2s 1m37s 6m35s 13 1,177 550ms 55s825ms 9s630ms 4m2s 6m42s 16m5s 14 1,164 515ms 13s732ms 7s912ms 3m41s 3m45s 4m3s 15 1,117 535ms 13s717ms 8s929ms 3m53s 3m54s 4m 16 1,114 574ms 13s435ms 9s17ms 3m43s 3m48s 3m50s 17 1,076 549ms 13s561ms 10s730ms 3m50s 3m50s 3m55s 18 1,091 540ms 13s748ms 11s303ms 3m53s 3m53s 4m12s 19 1,115 508ms 13s459ms 10s563ms 3m38s 3m48s 4m7s 20 1,114 551ms 13s253ms 10s408ms 3m30s 3m45s 4m4s 21 1,113 544ms 11s781ms 10s463ms 3m28s 3m32s 3m38s 22 1,114 550ms 13s210ms 10s578ms 3m44s 3m44s 4m2s 23 1,117 542ms 13s110ms 10s487ms 3m30s 3m42s 4m1s Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Apr 19 00 0 0 0ms 0ms 0ms 0ms 01 0 0 0ms 0ms 0ms 0ms 02 0 0 0ms 0ms 0ms 0ms 03 0 0 0ms 0ms 0ms 0ms 04 0 0 0ms 0ms 0ms 0ms 05 0 0 0ms 0ms 0ms 0ms 06 0 0 0ms 0ms 0ms 0ms 07 0 0 0ms 0ms 0ms 0ms 08 0 0 0ms 0ms 0ms 0ms 09 4 0 1s140ms 0ms 0ms 0ms 10 0 0 0ms 0ms 0ms 0ms 11 0 0 0ms 0ms 0ms 0ms 12 11 0 1s84ms 0ms 0ms 4s350ms 13 70 0 862ms 3s228ms 3s427ms 3s638ms 14 72 0 854ms 3s379ms 3s490ms 3s729ms 15 49 0 837ms 2s212ms 3s385ms 3s489ms 16 46 0 815ms 2s209ms 3s301ms 3s347ms 17 28 0 840ms 0ms 3s280ms 3s382ms 18 35 0 836ms 0ms 3s282ms 3s507ms 19 47 0 835ms 2s124ms 3s380ms 3s498ms 20 46 0 830ms 2s236ms 3s400ms 3s455ms 21 45 0 815ms 2s190ms 3s176ms 3s511ms 22 46 0 821ms 2s373ms 3s350ms 3s453ms 23 44 5 861ms 2s241ms 3s284ms 3s400ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Apr 19 00 0 0 0 0 0ms 0ms 0ms 0ms 01 0 1 0 0 1s91ms 0ms 0ms 0ms 02 0 0 0 0 0ms 0ms 0ms 0ms 03 0 0 0 0 0ms 0ms 0ms 0ms 04 0 0 0 0 0ms 0ms 0ms 0ms 05 0 0 0 0 0ms 0ms 0ms 0ms 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 0 0 0 0ms 0ms 0ms 0ms 08 0 0 0 0 0ms 0ms 0ms 0ms 09 0 0 0 0 0ms 0ms 0ms 0ms 10 0 0 0 0 0ms 0ms 0ms 0ms 11 0 0 0 0 0ms 0ms 0ms 0ms 12 0 0 0 0 0ms 0ms 0ms 0ms 13 0 0 0 0 0ms 0ms 0ms 0ms 14 0 0 0 0 0ms 0ms 0ms 0ms 15 0 0 0 0 0ms 0ms 0ms 0ms 16 0 0 0 0 0ms 0ms 0ms 0ms 17 0 0 0 0 0ms 0ms 0ms 0ms 18 0 0 0 0 0ms 0ms 0ms 0ms 19 0 0 0 0 0ms 0ms 0ms 0ms 20 0 0 0 0 0ms 0ms 0ms 0ms 21 0 0 0 0 0ms 0ms 0ms 0ms 22 0 0 0 0 0ms 0ms 0ms 0ms 23 0 0 0 0 0ms 0ms 0ms 0ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Apr 19 00 0 0 0.00 0.00% 01 0 0 0.00 0.00% 02 0 0 0.00 0.00% 03 0 0 0.00 0.00% 04 0 0 0.00 0.00% 05 0 0 0.00 0.00% 06 0 0 0.00 0.00% 07 0 2 2.00 0.00% 08 0 2 2.00 0.00% 09 0 16 16.00 0.00% 10 0 6 6.00 0.00% 11 0 6 6.00 0.00% 12 0 29 29.00 0.00% 13 0 157 157.00 0.00% 14 0 144 144.00 0.00% 15 0 93 93.00 0.00% 16 0 94 94.00 0.00% 17 0 56 56.00 0.00% 18 0 71 71.00 0.00% 19 0 95 95.00 0.00% 20 0 94 94.00 0.00% 21 0 93 93.00 0.00% 22 0 94 94.00 0.00% 23 0 92 92.00 0.00% Day Hour Count Average / Second Apr 19 00 547 0.15/s 01 547 0.15/s 02 643 0.18/s 03 612 0.17/s 04 580 0.16/s 05 547 0.15/s 06 546 0.15/s 07 600 0.17/s 08 604 0.17/s 09 813 0.23/s 10 814 0.23/s 11 735 0.20/s 12 887 0.25/s 13 1,985 0.55/s 14 1,560 0.43/s 15 1,249 0.35/s 16 1,211 0.34/s 17 939 0.26/s 18 1,039 0.29/s 19 1,204 0.33/s 20 1,207 0.34/s 21 1,240 0.34/s 22 1,267 0.35/s 23 1,207 0.34/s Day Hour Count Average Duration Average idle time Apr 19 00 547 232ms 232ms 01 547 233ms 0ms 02 643 201ms 0ms 03 612 208ms 0ms 04 580 216ms 0ms 05 547 227ms 0ms 06 546 229ms 0ms 07 600 230ms 0ms 08 604 229ms 0ms 09 813 246ms 0ms 10 814 239ms 0ms 11 735 278ms 0ms 12 887 318ms 0ms 13 1,985 518ms 0ms 14 1,560 504ms 0ms 15 1,249 366ms 0ms 16 1,211 377ms 0ms 17 939 338ms 0ms 18 1,039 348ms 0ms 19 1,204 363ms 0ms 20 1,207 361ms 0ms 21 1,240 355ms 0ms 22 1,267 351ms 0ms 23 1,207 369ms 0ms -
Connections
Established Connections
Key values
- 39 connections Connection Peak
- 2026-04-19 18:35:14 Date
Connections per database
Key values
- zemm_monitoring Main Database
- 22,583 connections Total
Connections per user
Key values
- labanimal Main User
- 22,583 connections Total
-
Sessions
Simultaneous sessions
Key values
- 9 sessions Session Peak
- 2026-04-19 12:57:44 Date
Histogram of session times
Key values
- 19,532 0-500ms duration
Sessions per database
Key values
- zemm_monitoring Main Database
- 22,583 sessions Total
Sessions per user
Key values
- labanimal Main User
- 22,583 sessions Total
Sessions per host
Key values
- ::1 Main Host
- 22,583 sessions Total
Sessions per application
Key values
- Main Application
- 22,583 sessions Total
Application Count Total Duration Average Duration 20,923 2h5m57s 361ms _backend_wean_api.php_litter_id_10132229_zemm_produktiv_8_local 1 145ms 145ms _desktop_index.php_command_animals_edit_subcommand_init_id_1026 1 119ms 119ms _desktop_index.php_command_animals_edit_subcommand_init_id_1030 1 102ms 102ms _desktop_index.php_command_facility_subcommand_init_zemm_produk 2 101ms 50ms _desktop_index.php_command_login_subcommand_init_zemm_produktiv 1,546 47s841ms 30ms _desktop_index.php_zemm_produktiv_7_localhost_5432 3 1s259ms 419ms _desktop_index.php_zemm_produktiv_8_localhost_5432 56 41s536ms 741ms expire_tasks:zemm_produktiv_8@h2940066.stratoserver.net:5432 1 1s108ms 1s108ms pg_dump 1 13s498ms 13s498ms taskscron:zemm_produktiv_7@zemm.fbiscience.eu 24 650ms 27ms taskscron:zemm_produktiv_8@h2940066.stratoserver.net:5432 24 1s945ms 81ms -
Checkpoints / Restartpoints
Checkpoints Buffers
Key values
- 18,805 buffers Checkpoint Peak
- 2026-04-19 01:38:21 Date
- 269.607 seconds Highest write time
- 0.884 seconds Sync time
Checkpoints Wal files
Key values
- 6 files Wal files usage Peak
- 2026-04-19 01:38:21 Date
Checkpoints distance
Key values
- 191.04 Mo Distance Peak
- 2026-04-19 01:38:21 Date
Checkpoints Activity
↑ Back to the top of the Checkpoint Activity tableDay Hour Written buffers Write time Sync time Total time Apr 19 00 2,519 252.679s 0.109s 252.846s 01 21,010 490.578s 0.105s 490.741s 02 2,525 253.272s 0.107s 253.437s 03 2,652 266.031s 0.114s 266.197s 04 2,638 264.455s 0.093s 264.597s 05 3,622 363.054s 0.102s 363.214s 06 2,530 253.79s 0.099s 253.946s 07 16,403 527.419s 0.081s 527.553s 08 2,961 296.726s 0.093s 296.872s 09 4,765 477.327s 0.092s 477.467s 10 6,426 643.621s 0.102s 643.777s 11 4,413 441.86s 0.09s 442.007s 12 4,588 459.535s 0.09s 459.681s 13 3,553 360.63s 1.118s 362.061s 14 3,932 400.36s 0.966s 401.468s 15 4,398 440.489s 0.09s 440.637s 16 4,126 413.12s 0.084s 413.26s 17 3,612 362.546s 0.088s 362.69s 18 4,719 472.934s 0.083s 473.07s 19 4,562 456.79s 0.084s 456.925s 20 4,289 429.889s 0.085s 430.028s 21 3,526 353.43s 0.085s 353.573s 22 3,508 351.623s 0.091s 351.767s 23 3,494 350.238s 0.089s 350.383s Day Hour Added Removed Recycled Synced files Longest sync Average sync Apr 19 00 0 0 0 424 0.002s 0.012s 01 0 0 7 423 0.002s 0.011s 02 0 0 1 459 0.004s 0.012s 03 0 0 1 466 0.002s 0.012s 04 0 0 1 402 0.002s 0.011s 05 0 0 1 469 0.002s 0.013s 06 0 0 1 433 0.002s 0.012s 07 0 0 3 398 0.001s 0.011s 08 0 0 1 430 0.002s 0.012s 09 0 0 1 449 0.002s 0.012s 10 0 0 3 531 0.001s 0.012s 11 0 0 2 470 0.002s 0.012s 12 0 0 1 446 0.002s 0.012s 13 0 0 1 468 0.237s 0.04s 14 0 0 1 446 0.151s 0.032s 15 0 0 1 482 0.001s 0.012s 16 0 0 1 441 0.001s 0.012s 17 0 0 1 457 0.002s 0.012s 18 0 0 2 434 0.001s 0.012s 19 0 0 1 434 0.001s 0.012s 20 0 0 1 442 0.001s 0.012s 21 0 0 1 441 0.002s 0.012s 22 0 0 1 447 0.002s 0.012s 23 0 0 1 435 0.002s 0.012s Day Hour Count Avg time (sec) Apr 19 00 0 0s 01 0 0s 02 0 0s 03 0 0s 04 0 0s 05 0 0s 06 0 0s 07 0 0s 08 0 0s 09 0 0s 10 0 0s 11 0 0s 12 0 0s 13 0 0s 14 0 0s 15 0 0s 16 0 0s 17 0 0s 18 0 0s 19 0 0s 20 0 0s 21 0 0s 22 0 0s 23 0 0s Day Hour Mean distance Mean estimate Apr 19 00 1,145.17 kB 1,274.58 kB 01 10,014.91 kB 37,187.82 kB 02 1,140.75 kB 35,317.17 kB 03 1,186.25 kB 10,812.67 kB 04 1,220.64 kB 4,050.09 kB 05 1,329.31 kB 2,448.23 kB 06 1,160.75 kB 1,495.42 kB 07 5,316.00 kB 12,219.82 kB 08 1,262.92 kB 20,480.50 kB 09 1,703.08 kB 6,940.08 kB 10 4,162.42 kB 10,683.00 kB 11 1,671.58 kB 11,988.42 kB 12 1,592.92 kB 4,719.83 kB 13 1,406.50 kB 2,873.92 kB 14 1,501.67 kB 1,879.00 kB 15 1,611.17 kB 1,699.33 kB 16 1,539.08 kB 1,678.50 kB 17 1,411.92 kB 1,605.67 kB 18 1,698.17 kB 3,013.33 kB 19 1,638.08 kB 2,278.33 kB 20 1,611.42 kB 1,836.17 kB 21 1,407.00 kB 1,586.50 kB 22 1,397.58 kB 1,499.42 kB 23 1,425.25 kB 1,463.33 kB -
Temporary Files
Size of temporary files
Key values
- 1.79 GiB Temp Files size Peak
- 2026-04-19 14:54:39 Date
Number of temporary files
Key values
- 10 per second Temp Files Peak
- 2026-04-19 13:54:39 Date
Temporary Files Activity
↑ Back to the top of the Temporary Files Activity tableDay Hour Count Total size Average size Apr 19 00 0 0 0 01 0 0 0 02 0 0 0 03 0 0 0 04 0 0 0 05 0 0 0 06 0 0 0 07 10 543.36 MiB 54.34 MiB 08 10 543.51 MiB 54.35 MiB 09 50 3.10 GiB 63.56 MiB 10 30 1.60 GiB 54.45 MiB 11 30 1.60 GiB 54.49 MiB 12 50 4.92 GiB 100.72 MiB 13 270 36.33 GiB 137.79 MiB 14 219 31.31 GiB 146.38 MiB 15 148 18.62 GiB 128.85 MiB 16 146 18.63 GiB 130.64 MiB 17 87 10.87 GiB 127.91 MiB 18 113 13.98 GiB 126.65 MiB 19 150 18.64 GiB 127.25 MiB 20 146 18.64 GiB 130.76 MiB 21 152 18.65 GiB 125.63 MiB 22 152 18.65 GiB 125.67 MiB 23 150 18.66 GiB 127.37 MiB Queries generating the most temporary files (N)
Rank Count Total size Min size Max size Avg size Query 1 1,229 123.36 GiB 45.50 MiB 422.62 MiB 102.78 MiB with start_snap as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at <= ? order by tenant_key, fingerprint, collected_at desc ), fallback_start as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at between ? and ? order by tenant_key, fingerprint, collected_at asc ), end_snap as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at between ? and ? order by tenant_key, fingerprint, collected_at desc ), deltas as ( select e.tenant_key, e.fingerprint, e.query, e.collected_at as last_seen, greatest (coalesce(e.total_time_ms, ?) - coalesce(s.total_time_ms, fs.total_time_ms, ?), ?) as total_time_ms, greatest (coalesce(e.calls, ?) - coalesce(s.calls, fs.calls, ?), ?) as calls, greatest (coalesce(e.rows_returned, ?) - coalesce(s.rows_returned, fs.rows_returned, ?), ?) as rows_returned from end_snap e left join start_snap s on s.tenant_key = e.tenant_key and s.fingerprint = e.fingerprint left join fallback_start fs on fs.tenant_key = e.tenant_key and fs.fingerprint = e.fingerprint and s.tenant_key is null ) select fingerprint, max(query) as query, max(last_seen) as last_seen, sum(total_time_ms) as total_time_ms, sum(calls) as calls, sum(rows_returned) as rows_returned, case when sum(calls) > ? then sum(total_time_ms) / sum(calls) else ? end as mean_time_ms, array_agg(distinct tenant_key order by tenant_key) as tenant_keys from deltas where total_time_ms > ? or calls > ? group by fingerprint order by total_time_ms desc, calls desc limit ? offset ?;-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-18 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:05:03 Duration: 55s825ms Database: zemm_monitoring User: labanimal Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-12 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:04:57 Duration: 31s142ms Database: zemm_monitoring User: labanimal Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at <= '2026-04-18 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at BETWEEN '2026-04-18 13:04:05+02' AND '2026-04-19 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at BETWEEN '2026-04-18 13:04:05+02' AND '2026-04-19 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:04:34 Duration: 29s544ms Database: zemm_monitoring User: labanimal Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
2 232 25.93 GiB 91.66 MiB 172.66 MiB 114.44 MiB with normalised as ( select id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, ?, ?, ?), ?, ?, ?) as fingerprint from observability.app_events where tenant_key in (...) and occurred_at between ? and ? and severity in (...) and not (event_type = ? and (lower(coalesce(message, ?)) = ? or (lower(coalesce(payload ->> ?, ?)) = ? and lower(coalesce(payload ->> ?, ?)) = ?)))) select fingerprint, count(*) as occurrence_count, count(distinct coalesce(payload ->> ?, payload ->> ?, ?)) as affected_users, max(severity) as max_severity, min(occurred_at) as first_seen, max(occurred_at) as last_seen, (array_agg(message order by occurred_at desc))[?] as sample_message, (array_agg(distinct event_type))[?] as event_type, (array_agg(payload ->> ? order by occurred_at desc))[?] as source_file, (array_agg(payload ->> ? order by occurred_at desc))[?] as source_line, (array_agg(payload ->> ? order by occurred_at desc))[?] as sample_request, (array_agg(id order by occurred_at desc))[?] as latest_event_id from normalised group by fingerprint order by occurrence_count desc, last_seen desc limit ?;-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod', 'test') AND occurred_at BETWEEN '2026-04-12 13:46:49+02' AND '2026-04-19 13:46:49+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 13:46:52 Duration: 2s711ms Database: zemm_monitoring User: labanimal Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod') AND occurred_at BETWEEN '2026-04-12 12:56:07+02' AND '2026-04-19 12:56:07+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 12:56:10 Duration: 2s629ms Database: zemm_monitoring User: labanimal Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod') AND occurred_at BETWEEN '2026-04-12 12:57:41+02' AND '2026-04-19 12:57:41+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 12:57:44 Duration: 2s501ms Database: zemm_monitoring User: labanimal Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
Queries generating the largest temporary files
Rank Size Query 1 422.62 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2, $3) AND collected_at <= $4 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($5, $6, $7) AND collected_at BETWEEN $8 AND $9 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($10, $11, $12) AND collected_at BETWEEN $13 AND $14 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $15 OFFSET $16;[ Date: 2026-04-19 13:04:57 - Queryid: 2151067 ]
2 417.82 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2, $3) AND collected_at <= $4 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($5, $6, $7) AND collected_at BETWEEN $8 AND $9 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($10, $11, $12) AND collected_at BETWEEN $13 AND $14 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $15 OFFSET $16;[ Date: 2026-04-19 13:04:57 - Queryid: 2151067 ]
3 401.24 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 12:58:07 - Queryid: 2147981 ]
4 400.50 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 15:02:03 - Queryid: 2192248 ]
5 400.48 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 13:52:00 - Queryid: 2167563 ]
6 400.28 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 13:57:01 - Queryid: 2169171 ]
7 400.21 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 23:45:36 - Queryid: 2375835 ]
8 400.19 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 16:32:03 - Queryid: 2222871 ]
9 400.16 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 20:50:29 - Queryid: 2315370 ]
10 400.10 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 21:15:31 - Queryid: 2323575 ]
11 400.08 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 23:25:35 - Queryid: 2368952 ]
12 400.01 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 19:20:26 - Queryid: 2281607 ]
13 399.91 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 21:55:34 - Queryid: 2337645 ]
14 399.80 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2) AND collected_at <= $3 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($4, $5) AND collected_at BETWEEN $6 AND $7 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($8, $9) AND collected_at BETWEEN $10 AND $11 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $12 OFFSET $13;[ Date: 2026-04-19 23:55:36 - Queryid: 2379249 ]
15 267.09 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2, $3) AND collected_at <= $4 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($5, $6, $7) AND collected_at BETWEEN $8 AND $9 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($10, $11, $12) AND collected_at BETWEEN $13 AND $14 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $15 OFFSET $16;[ Date: 2026-04-19 14:44:39 - Queryid: 2185929 ]
16 260.52 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2, $3) AND collected_at <= $4 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($5, $6, $7) AND collected_at BETWEEN $8 AND $9 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($10, $11, $12) AND collected_at BETWEEN $13 AND $14 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $15 OFFSET $16;[ Date: 2026-04-19 13:44:38 - Queryid: 2165056 ]
17 260.52 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2, $3) AND collected_at <= $4 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($5, $6, $7) AND collected_at BETWEEN $8 AND $9 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($10, $11, $12) AND collected_at BETWEEN $13 AND $14 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $15 OFFSET $16;[ Date: 2026-04-19 13:34:39 - Queryid: 2161450 ]
18 260.45 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2, $3) AND collected_at <= $4 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($5, $6, $7) AND collected_at BETWEEN $8 AND $9 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($10, $11, $12) AND collected_at BETWEEN $13 AND $14 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $15 OFFSET $16;[ Date: 2026-04-19 14:24:38 - Queryid: 2178785 ]
19 260.43 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2, $3) AND collected_at <= $4 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($5, $6, $7) AND collected_at BETWEEN $8 AND $9 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($10, $11, $12) AND collected_at BETWEEN $13 AND $14 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $15 OFFSET $16;[ Date: 2026-04-19 13:54:39 - Queryid: 2168350 ]
20 257.59 MiB WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($1, $2, $3) AND collected_at <= $4 ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($5, $6, $7) AND collected_at BETWEEN $8 AND $9 ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ($10, $11, $12) AND collected_at BETWEEN $13 AND $14 ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT $15 OFFSET $16;[ Date: 2026-04-19 14:44:39 - Queryid: 2185929 ]
-
Vacuums
Vacuums / Analyzes Distribution
Key values
- 0.60 sec Highest CPU-cost vacuum
Table public.tasks
Database zemm_produktiv_8 - 2026-04-19 01:30:26 Date
- 0 sec Highest CPU-cost analyze
Table
Database zemm_produktiv_8 - Date
Average Autovacuum Duration
Key values
- 0.60 sec Highest CPU-cost vacuum
Table public.tasks
Database zemm_produktiv_8 - 2026-04-19 01:30:26 Date
Analyzes per table
Key values
- observability.metrics_timeseries (2) Main table analyzed (database zemm_monitoring)
- 9 analyzes Total
Table Number of analyzes zemm_monitoring.observability.metrics_timeseries 2 zemm_produktiv_8.public.tasks 1 zemm_produktiv_8.public.cages_search_mview 1 zemm_monitoring.observability.system_metrics 1 zemm_monitoring.observability.uptime_checks 1 zemm_produktiv_8.pg_catalog.pg_class 1 zemm_produktiv_8.public.cost_history 1 zemm_produktiv_8.pg_catalog.pg_depend 1 Total 9 Vacuums per table
Key values
- pg_toast.pg_toast_67431 (4) Main table vacuumed on database zemm_monitoring
- 9 vacuums Total
Index Buffer usage Skipped WAL usage Frozen Table Vacuums scans hits misses dirtied pins frozen records full page bytes pages tuples zemm_monitoring.pg_toast.pg_toast_67431 4 0 0 0 0 0 0 3,621 1,214 2,758,817 1,198 7,188 zemm_produktiv_8.pg_toast.pg_toast_2619 1 1 0 0 0 0 0 168 32 171,729 3 5 zemm_monitoring.pg_toast.pg_toast_2619 1 1 0 0 0 0 0 108 25 151,990 12 34 zemm_produktiv_8.public.tasks 1 1 0 0 0 0 0 46,484 17 3,360,228 0 0 zemm_monitoring.observability.uptime_checks 1 0 0 0 0 0 0 732 715 1,110,537 8 160 zemm_produktiv_8.public.cages_search_mview 1 1 0 0 0 0 0 622 344 1,142,378 39 284 Total 9 4 0 0 0 0 0 51,735 2,347 8,695,679 1,260 7,671 Vacuum throughput per table
Key values
- public.tasks (0.6) Max CPU elapsed for vacuum on database zemm_produktiv_8
- pg_toast.pg_toast_67431 (4.027 ms) Max I/O read time for vacuum on database zemm_produktiv_8
- public.cages_search_mview (0.759 ms) Max I/O write time for vacuum on database zemm_produktiv_8
I/O timing (ms) CPU (s) Table read write elapsed zemm_monitoring.pg_toast.pg_toast_67431 4.027 0.266 0.3 zemm_produktiv_8.pg_toast.pg_toast_2619 1.668 0 0.01 zemm_monitoring.pg_toast.pg_toast_2619 0.114 0 0 zemm_produktiv_8.public.tasks 0.771 0 0.6 zemm_monitoring.observability.uptime_checks 0.049 0 0.17 zemm_produktiv_8.public.cages_search_mview 1.411 0.759 0.11 Total 8.04 1.025 1.19 Tuples removed per table
Key values
- public.tasks (53912) Main table with removed tuples on database zemm_produktiv_8
- 54394 tuples Total removed
Index Tuples Pages Table Vacuums scans removed remain not yet removable removed remain zemm_produktiv_8.public.tasks 1 1 53,912 56,952 0 0 16,787 zemm_produktiv_8.public.cages_search_mview 1 1 306 13,885 0 0 234 zemm_produktiv_8.pg_toast.pg_toast_2619 1 1 115 292 0 0 106 zemm_monitoring.pg_toast.pg_toast_2619 1 1 61 80 0 0 36 zemm_monitoring.observability.uptime_checks 1 0 0 82,193 0 0 4,128 zemm_monitoring.pg_toast.pg_toast_67431 4 0 0 1,676,122 0 0 282,443 Total 9 4 54,394 1,829,524 0 0 303,734 Pages removed per table
Key values
- unknown (0) Main table with removed pages on database unknown
- 0 pages Total removed
Pages removed per tables
NO DATASET
Table Number of vacuums Index scans Tuples removed Pages removed zemm_produktiv_8.pg_toast.pg_toast_2619 1 1 115 0 zemm_monitoring.pg_toast.pg_toast_2619 1 1 61 0 zemm_produktiv_8.public.tasks 1 1 53912 0 zemm_monitoring.observability.uptime_checks 1 0 0 0 zemm_produktiv_8.public.cages_search_mview 1 1 306 0 zemm_monitoring.pg_toast.pg_toast_67431 4 0 0 0 Total 9 4 54,394 0 Autovacuum Activity
↑ Back to the top of the Autovacuum Activity tableDay Hour VACUUMs ANALYZEs Apr 19 00 0 0 01 2 1 02 0 0 03 0 0 04 1 1 05 0 0 06 0 0 07 0 1 08 0 0 09 1 0 10 0 1 11 1 1 12 1 0 13 0 0 14 1 0 15 0 2 16 0 0 17 0 0 18 0 0 19 1 0 20 0 1 21 1 1 22 0 0 23 0 0 - 0.60 sec Highest CPU-cost vacuum
-
Locks
Locks by types
Key values
- unknown Main Lock Type
- 0 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query NO DATASET
Queries that waited the most
Rank Wait time Query NO DATASET
-
Queries
Queries by type
Key values
- 543 Total read queries
- 25,092 Total write queries
Queries by database
Key values
- zemm_monitoring Main database
- 25,509 Requests
- 1d17h49m4s (zemm_monitoring)
- Main time consuming database
Queries by user
Key values
- labanimal Main user
- 599,068 Requests
User Request type Count Duration deploy Total 58 14m47s cte 4 1m18s ddl 30 4m31s others 9 22s849ms select 9 6m3s labanimal Total 599,068 16d1h52m17s copy from 8 18s286ms copy to 96 4m30s cte 3,120 3h25m13s ddl 593,165 15d21h34m45s others 179 2m6s select 2,454 44m35s tcl 4 2s749ms update 28 29s739ms postgres Total 151 3m22s copy to 151 3m22s Duration by user
Key values
- 16d1h52m17s (labanimal) Main time consuming user
User Request type Count Duration deploy Total 58 14m47s cte 4 1m18s ddl 30 4m31s others 9 22s849ms select 9 6m3s labanimal Total 599,068 16d1h52m17s copy from 8 18s286ms copy to 96 4m30s cte 3,120 3h25m13s ddl 593,165 15d21h34m45s others 179 2m6s select 2,454 44m35s tcl 4 2s749ms update 28 29s739ms postgres Total 151 3m22s copy to 151 3m22s Queries by host
Key values
- unknown Main host
- 599,037 Requests
- 16d1h48m45s (unknown)
- Main time consuming host
Host Request type Count Duration 127.0.0.1 Total 2 6s311ms ddl 2 6s311ms 81.169.238.237 Total 29 3m26s select 1 2m56s update 28 29s739ms [local] Total 209 18m9s copy to 151 3m22s cte 4 1m18s ddl 30 4m31s others 9 22s849ms select 9 6m3s unknown Total 599,037 16d1h48m45s copy from 8 18s286ms copy to 96 4m30s cte 3,120 3h25m13s ddl 593,163 15d21h34m38s others 179 2m6s select 2,453 41m38s tcl 4 2s749ms Queries by application
Key values
- unknown Main application
- 25,625 Requests
- 1d17h50m15s (unknown)
- Main time consuming application
Application Request type Count Duration _desktop_index.php_zemm_produktiv_8_localhost_5432 Total 4 3s46ms select 4 3s46ms expire_tasks:zemm_produktiv_8@h2940066.stratoserver.net:5432 Total 1 1s91ms update 1 1s91ms pg_dump Total 5 6s786ms copy to 5 6s786ms unknown Total 25,625 1d17h50m15s cte 605 40m53s ddl 24,480 1d17h1m46s select 539 7m34s tcl 1 1s16ms Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2026-04-19 15:51:54 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 589 500-1000ms duration
Slowest individual queries
Rank Duration Query 1 55s825ms WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-18 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';[ Date: 2026-04-19 13:05:03 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
2 55s825ms CREATE SCHEMA IF NOT EXISTS observability;[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
3 55s825ms CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
4 55s825ms CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
5 55s825ms CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
6 55s825ms CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
7 55s825ms CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
8 55s825ms CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
9 55s825ms CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
10 55s825ms CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
11 55s825ms CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
12 55s825ms CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
13 55s825ms CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
14 55s825ms CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
15 55s825ms ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
16 55s825ms ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
17 55s825ms CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
18 55s825ms CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);[ Date: 2026-04-19 13:06:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
19 31s142ms WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-12 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';[ Date: 2026-04-19 13:04:57 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
20 31s142ms CREATE SCHEMA IF NOT EXISTS observability;[ Date: 2026-04-19 13:05:01 - Database: zemm_monitoring - User: labanimal - Bind query: yes ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 2h24m48s 1,440 618ms 55s825ms 6s33ms create table if not exists observability.phpfpm_counters ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
2 2h24m48s 1,440 618ms 55s825ms 6s33ms create table if not exists observability.db_top_queries ( id bigserial primary key, tenant_key text not null, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz not null default now() );Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
3 2h24m48s 1,440 618ms 55s825ms 6s33ms create index if not exists idx_uptime_checks_key on observability.uptime_checks (check_key, checked_at desc);Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
4 2h24m48s 1,440 618ms 55s825ms 6s33ms alter table observability.uptime_checks add column if not exists label text;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
5 2h24m48s 1,440 618ms 55s825ms 6s33ms create index if not exists idx_db_top_queries_tenant on observability.db_top_queries (tenant_key, collected_at desc);Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
6 2h24m48s 1,440 618ms 55s825ms 6s33ms create table if not exists observability.uptime_checks ( id bigserial primary key, endpoint text not null, status text not null, latency_ms double precision, checked_at timestamptz not null default now() );Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
7 2h24m48s 1,440 618ms 55s825ms 6s33ms create index if not exists idx_metrics_timeseries_bucket on observability.metrics_timeseries (bucket_start);Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
8 2h24m48s 1,440 618ms 55s825ms 6s33ms create index if not exists idx_metrics_timeseries_metric on observability.metrics_timeseries (metric_name);Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
9 2h24m48s 1,440 618ms 55s825ms 6s33ms alter table observability.uptime_checks add column if not exists payload jsonb;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
10 2h24m48s 1,440 618ms 55s825ms 6s33ms create index if not exists idx_app_events_tenant on observability.app_events (tenant_key, occurred_at desc);Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
11 2h24m48s 1,440 618ms 55s825ms 6s33ms create index if not exists idx_app_events_type on observability.app_events (event_type);Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
12 2h24m48s 1,440 618ms 55s825ms 6s33ms create table if not exists observability.metrics_timeseries ( id bigserial primary key, tenant_key text not null, metric_name text not null, bucket_start timestamptz not null, bucket_width_seconds integer not null default ?, sum_value double precision not null default ?, count_value bigint not null default ?, histogram jsonb, created_at timestamptz not null default now(), updated_at timestamptz not null default now(), unique (tenant_key, metric_name, bucket_start, bucket_width_seconds) );Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
13 2h24m48s 1,440 618ms 55s825ms 6s33ms create table if not exists observability.app_events ( id bigserial primary key, tenant_key text not null, event_type text not null, severity text not null, message text not null, payload jsonb, occurred_at timestamptz not null default now(), created_at timestamptz not null default now() );Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
14 2h24m48s 1,440 618ms 55s825ms 6s33ms create table if not exists observability.nginx_counters ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
15 2h24m48s 1,440 618ms 55s825ms 6s33ms create table if not exists observability.system_metrics ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
16 2h24m48s 1,440 618ms 55s825ms 6s33ms create index if not exists idx_uptime_checks_endpoint on observability.uptime_checks (endpoint, checked_at desc);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
17 2h24m48s 1,440 618ms 55s825ms 6s33ms create schema if not exists observability;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
18 32m8s 182 3s147ms 55s825ms 10s597ms with start_snap as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at <= ? order by tenant_key, fingerprint, collected_at desc ), fallback_start as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at between ? and ? order by tenant_key, fingerprint, collected_at asc ), end_snap as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at between ? and ? order by tenant_key, fingerprint, collected_at desc ), deltas as ( select e.tenant_key, e.fingerprint, e.query, e.collected_at as last_seen, greatest (coalesce(e.total_time_ms, ?) - coalesce(s.total_time_ms, fs.total_time_ms, ?), ?) as total_time_ms, greatest (coalesce(e.calls, ?) - coalesce(s.calls, fs.calls, ?), ?) as calls, greatest (coalesce(e.rows_returned, ?) - coalesce(s.rows_returned, fs.rows_returned, ?), ?) as rows_returned from end_snap e left join start_snap s on s.tenant_key = e.tenant_key and s.fingerprint = e.fingerprint left join fallback_start fs on fs.tenant_key = e.tenant_key and fs.fingerprint = e.fingerprint and s.tenant_key is null ) select fingerprint, max(query) as query, max(last_seen) as last_seen, sum(total_time_ms) as total_time_ms, sum(calls) as calls, sum(rows_returned) as rows_returned, case when sum(calls) > ? then sum(total_time_ms) / sum(calls) else ? end as mean_time_ms, array_agg(distinct tenant_key order by tenant_key) as tenant_keys from deltas where total_time_ms > ? or calls > ? group by fingerprint order by total_time_ms desc, calls desc limit ? offset ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Apr 19 08 2 7s718ms 3s859ms 09 2 7s678ms 3s839ms 10 9 35s614ms 3s957ms 11 6 22s311ms 3s718ms 12 6 22s137ms 3s689ms 13 9 59s38ms 6s559ms 14 30 6m53s 13s774ms 15 18 3m39s 12s213ms 16 12 2m21s 11s823ms 17 12 2m21s 11s772ms 18 7 1m20s 11s467ms 19 9 1m41s 11s326ms 20 12 2m16s 11s339ms 21 12 2m13s 11s145ms 22 12 2m14s 11s208ms 23 12 2m16s 11s348ms 00 12 2m15s 11s268ms [ User: labanimal - Total duration: 32m8s - Times executed: 182 ]
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-18 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:05:03 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-12 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:04:57 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at <= '2026-04-18 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at BETWEEN '2026-04-18 13:04:05+02' AND '2026-04-19 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at BETWEEN '2026-04-18 13:04:05+02' AND '2026-04-19 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:04:34 Duration: 29s544ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
19 3m58s 141 1s267ms 2s711ms 1s692ms with normalised as ( select id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, ?, ?, ?), ?, ?, ?) as fingerprint from observability.app_events where tenant_key in (...) and occurred_at between ? and ? and severity in (...) and not (event_type = ? and (lower(coalesce(message, ?)) = ? or (lower(coalesce(payload ->> ?, ?)) = ? and lower(coalesce(payload ->> ?, ?)) = ?)))) select fingerprint, count(*) as occurrence_count, count(distinct coalesce(payload ->> ?, payload ->> ?, ?)) as affected_users, max(severity) as max_severity, min(occurred_at) as first_seen, max(occurred_at) as last_seen, (array_agg(message order by occurred_at desc))[?] as sample_message, (array_agg(distinct event_type))[?] as event_type, (array_agg(payload ->> ? order by occurred_at desc))[?] as source_file, (array_agg(payload ->> ? order by occurred_at desc))[?] as source_line, (array_agg(payload ->> ? order by occurred_at desc))[?] as sample_request, (array_agg(id order by occurred_at desc))[?] as latest_event_id from normalised group by fingerprint order by occurrence_count desc, last_seen desc limit ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Apr 19 10 1 2s288ms 2s288ms 13 3 6s534ms 2s178ms 14 19 33s611ms 1s769ms 15 18 31s576ms 1s754ms 16 12 18s567ms 1s547ms 17 12 19s51ms 1s587ms 18 7 11s667ms 1s666ms 19 9 14s927ms 1s658ms 20 12 19s922ms 1s660ms 21 12 21s450ms 1s787ms 22 12 20s123ms 1s676ms 23 12 19s16ms 1s584ms 00 12 19s935ms 1s661ms [ User: labanimal - Total duration: 3m58s - Times executed: 141 ]
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod', 'test') AND occurred_at BETWEEN '2026-04-12 13:46:49+02' AND '2026-04-19 13:46:49+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 13:46:52 Duration: 2s711ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod') AND occurred_at BETWEEN '2026-04-12 12:56:07+02' AND '2026-04-19 12:56:07+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 12:56:10 Duration: 2s629ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod') AND occurred_at BETWEEN '2026-04-12 12:57:41+02' AND '2026-04-19 12:57:41+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 12:57:44 Duration: 2s501ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
20 2m25s 141 750ms 1s324ms 1s28ms select lower(trim(nullif (payload ->> ?, ?))) as username_key, nullif (coalesce( case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, ?), ?) as user_id_key, count(*) filter (where severity = ?) as total_user_errors, count(*) filter (where severity = ?) as total_user_warnings, min(occurred_at) filter (where severity = ?) as first_error_date, min(occurred_at) filter (where severity = ?) as first_warning_date from observability.app_events where tenant_key in (...) and occurred_at between ? and ? and severity in (...) and (nullif (payload ->> ?, ?) is not null or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ? or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ? or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ?) group by username_key, user_id_key;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Apr 19 10 1 989ms 989ms 13 3 2s827ms 942ms 14 19 18s881ms 993ms 15 18 19s335ms 1s74ms 16 12 12s263ms 1s21ms 17 12 12s117ms 1s9ms 18 7 7s591ms 1s84ms 19 9 9s800ms 1s88ms 20 12 12s809ms 1s67ms 21 12 12s278ms 1s23ms 22 12 11s735ms 977ms 23 12 12s243ms 1s20ms 00 12 12s197ms 1s16ms [ User: labanimal - Total duration: 2m25s - Times executed: 141 ]
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 14:01:49+02' AND '2026-04-19 14:01:49+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 14:01:51 Duration: 1s324ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 18:40:14+02' AND '2026-04-19 18:40:14+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 18:40:15 Duration: 1s300ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 19:05:14+02' AND '2026-04-19 19:05:14+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 19:05:15 Duration: 1s260ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 1,440 2h24m48s 618ms 55s825ms 6s33ms create table if not exists observability.phpfpm_counters ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
2 1,440 2h24m48s 618ms 55s825ms 6s33ms create table if not exists observability.db_top_queries ( id bigserial primary key, tenant_key text not null, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz not null default now() );Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
3 1,440 2h24m48s 618ms 55s825ms 6s33ms create index if not exists idx_uptime_checks_key on observability.uptime_checks (check_key, checked_at desc);Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
4 1,440 2h24m48s 618ms 55s825ms 6s33ms alter table observability.uptime_checks add column if not exists label text;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
5 1,440 2h24m48s 618ms 55s825ms 6s33ms create index if not exists idx_db_top_queries_tenant on observability.db_top_queries (tenant_key, collected_at desc);Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
6 1,440 2h24m48s 618ms 55s825ms 6s33ms create table if not exists observability.uptime_checks ( id bigserial primary key, endpoint text not null, status text not null, latency_ms double precision, checked_at timestamptz not null default now() );Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
7 1,440 2h24m48s 618ms 55s825ms 6s33ms create index if not exists idx_metrics_timeseries_bucket on observability.metrics_timeseries (bucket_start);Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
8 1,440 2h24m48s 618ms 55s825ms 6s33ms create index if not exists idx_metrics_timeseries_metric on observability.metrics_timeseries (metric_name);Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
9 1,440 2h24m48s 618ms 55s825ms 6s33ms alter table observability.uptime_checks add column if not exists payload jsonb;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
10 1,440 2h24m48s 618ms 55s825ms 6s33ms create index if not exists idx_app_events_tenant on observability.app_events (tenant_key, occurred_at desc);Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
11 1,440 2h24m48s 618ms 55s825ms 6s33ms create index if not exists idx_app_events_type on observability.app_events (event_type);Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
12 1,440 2h24m48s 618ms 55s825ms 6s33ms create table if not exists observability.metrics_timeseries ( id bigserial primary key, tenant_key text not null, metric_name text not null, bucket_start timestamptz not null, bucket_width_seconds integer not null default ?, sum_value double precision not null default ?, count_value bigint not null default ?, histogram jsonb, created_at timestamptz not null default now(), updated_at timestamptz not null default now(), unique (tenant_key, metric_name, bucket_start, bucket_width_seconds) );Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
13 1,440 2h24m48s 618ms 55s825ms 6s33ms create table if not exists observability.app_events ( id bigserial primary key, tenant_key text not null, event_type text not null, severity text not null, message text not null, payload jsonb, occurred_at timestamptz not null default now(), created_at timestamptz not null default now() );Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
14 1,440 2h24m48s 618ms 55s825ms 6s33ms create table if not exists observability.nginx_counters ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
15 1,440 2h24m48s 618ms 55s825ms 6s33ms create table if not exists observability.system_metrics ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
16 1,440 2h24m48s 618ms 55s825ms 6s33ms create index if not exists idx_uptime_checks_endpoint on observability.uptime_checks (endpoint, checked_at desc);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
17 1,440 2h24m48s 618ms 55s825ms 6s33ms create schema if not exists observability;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
18 182 32m8s 3s147ms 55s825ms 10s597ms with start_snap as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at <= ? order by tenant_key, fingerprint, collected_at desc ), fallback_start as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at between ? and ? order by tenant_key, fingerprint, collected_at asc ), end_snap as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at between ? and ? order by tenant_key, fingerprint, collected_at desc ), deltas as ( select e.tenant_key, e.fingerprint, e.query, e.collected_at as last_seen, greatest (coalesce(e.total_time_ms, ?) - coalesce(s.total_time_ms, fs.total_time_ms, ?), ?) as total_time_ms, greatest (coalesce(e.calls, ?) - coalesce(s.calls, fs.calls, ?), ?) as calls, greatest (coalesce(e.rows_returned, ?) - coalesce(s.rows_returned, fs.rows_returned, ?), ?) as rows_returned from end_snap e left join start_snap s on s.tenant_key = e.tenant_key and s.fingerprint = e.fingerprint left join fallback_start fs on fs.tenant_key = e.tenant_key and fs.fingerprint = e.fingerprint and s.tenant_key is null ) select fingerprint, max(query) as query, max(last_seen) as last_seen, sum(total_time_ms) as total_time_ms, sum(calls) as calls, sum(rows_returned) as rows_returned, case when sum(calls) > ? then sum(total_time_ms) / sum(calls) else ? end as mean_time_ms, array_agg(distinct tenant_key order by tenant_key) as tenant_keys from deltas where total_time_ms > ? or calls > ? group by fingerprint order by total_time_ms desc, calls desc limit ? offset ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Apr 19 08 2 7s718ms 3s859ms 09 2 7s678ms 3s839ms 10 9 35s614ms 3s957ms 11 6 22s311ms 3s718ms 12 6 22s137ms 3s689ms 13 9 59s38ms 6s559ms 14 30 6m53s 13s774ms 15 18 3m39s 12s213ms 16 12 2m21s 11s823ms 17 12 2m21s 11s772ms 18 7 1m20s 11s467ms 19 9 1m41s 11s326ms 20 12 2m16s 11s339ms 21 12 2m13s 11s145ms 22 12 2m14s 11s208ms 23 12 2m16s 11s348ms 00 12 2m15s 11s268ms [ User: labanimal - Total duration: 32m8s - Times executed: 182 ]
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-18 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:05:03 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-12 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:04:57 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at <= '2026-04-18 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at BETWEEN '2026-04-18 13:04:05+02' AND '2026-04-19 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at BETWEEN '2026-04-18 13:04:05+02' AND '2026-04-19 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:04:34 Duration: 29s544ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
19 141 3m58s 1s267ms 2s711ms 1s692ms with normalised as ( select id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, ?, ?, ?), ?, ?, ?) as fingerprint from observability.app_events where tenant_key in (...) and occurred_at between ? and ? and severity in (...) and not (event_type = ? and (lower(coalesce(message, ?)) = ? or (lower(coalesce(payload ->> ?, ?)) = ? and lower(coalesce(payload ->> ?, ?)) = ?)))) select fingerprint, count(*) as occurrence_count, count(distinct coalesce(payload ->> ?, payload ->> ?, ?)) as affected_users, max(severity) as max_severity, min(occurred_at) as first_seen, max(occurred_at) as last_seen, (array_agg(message order by occurred_at desc))[?] as sample_message, (array_agg(distinct event_type))[?] as event_type, (array_agg(payload ->> ? order by occurred_at desc))[?] as source_file, (array_agg(payload ->> ? order by occurred_at desc))[?] as source_line, (array_agg(payload ->> ? order by occurred_at desc))[?] as sample_request, (array_agg(id order by occurred_at desc))[?] as latest_event_id from normalised group by fingerprint order by occurrence_count desc, last_seen desc limit ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Apr 19 10 1 2s288ms 2s288ms 13 3 6s534ms 2s178ms 14 19 33s611ms 1s769ms 15 18 31s576ms 1s754ms 16 12 18s567ms 1s547ms 17 12 19s51ms 1s587ms 18 7 11s667ms 1s666ms 19 9 14s927ms 1s658ms 20 12 19s922ms 1s660ms 21 12 21s450ms 1s787ms 22 12 20s123ms 1s676ms 23 12 19s16ms 1s584ms 00 12 19s935ms 1s661ms [ User: labanimal - Total duration: 3m58s - Times executed: 141 ]
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod', 'test') AND occurred_at BETWEEN '2026-04-12 13:46:49+02' AND '2026-04-19 13:46:49+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 13:46:52 Duration: 2s711ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod') AND occurred_at BETWEEN '2026-04-12 12:56:07+02' AND '2026-04-19 12:56:07+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 12:56:10 Duration: 2s629ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod') AND occurred_at BETWEEN '2026-04-12 12:57:41+02' AND '2026-04-19 12:57:41+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 12:57:44 Duration: 2s501ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
20 141 2m25s 750ms 1s324ms 1s28ms select lower(trim(nullif (payload ->> ?, ?))) as username_key, nullif (coalesce( case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, ?), ?) as user_id_key, count(*) filter (where severity = ?) as total_user_errors, count(*) filter (where severity = ?) as total_user_warnings, min(occurred_at) filter (where severity = ?) as first_error_date, min(occurred_at) filter (where severity = ?) as first_warning_date from observability.app_events where tenant_key in (...) and occurred_at between ? and ? and severity in (...) and (nullif (payload ->> ?, ?) is not null or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ? or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ? or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ?) group by username_key, user_id_key;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Apr 19 10 1 989ms 989ms 13 3 2s827ms 942ms 14 19 18s881ms 993ms 15 18 19s335ms 1s74ms 16 12 12s263ms 1s21ms 17 12 12s117ms 1s9ms 18 7 7s591ms 1s84ms 19 9 9s800ms 1s88ms 20 12 12s809ms 1s67ms 21 12 12s278ms 1s23ms 22 12 11s735ms 977ms 23 12 12s243ms 1s20ms 00 12 12s197ms 1s16ms [ User: labanimal - Total duration: 2m25s - Times executed: 141 ]
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 14:01:49+02' AND '2026-04-19 14:01:49+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 14:01:51 Duration: 1s324ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 18:40:14+02' AND '2026-04-19 18:40:14+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 18:40:15 Duration: 1s300ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 19:05:14+02' AND '2026-04-19 19:05:14+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 19:05:15 Duration: 1s260ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 3s147ms 55s825ms 10s597ms 182 32m8s with start_snap as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at <= ? order by tenant_key, fingerprint, collected_at desc ), fallback_start as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at between ? and ? order by tenant_key, fingerprint, collected_at asc ), end_snap as ( select distinct on (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at from observability.db_top_queries where tenant_key in (...) and collected_at between ? and ? order by tenant_key, fingerprint, collected_at desc ), deltas as ( select e.tenant_key, e.fingerprint, e.query, e.collected_at as last_seen, greatest (coalesce(e.total_time_ms, ?) - coalesce(s.total_time_ms, fs.total_time_ms, ?), ?) as total_time_ms, greatest (coalesce(e.calls, ?) - coalesce(s.calls, fs.calls, ?), ?) as calls, greatest (coalesce(e.rows_returned, ?) - coalesce(s.rows_returned, fs.rows_returned, ?), ?) as rows_returned from end_snap e left join start_snap s on s.tenant_key = e.tenant_key and s.fingerprint = e.fingerprint left join fallback_start fs on fs.tenant_key = e.tenant_key and fs.fingerprint = e.fingerprint and s.tenant_key is null ) select fingerprint, max(query) as query, max(last_seen) as last_seen, sum(total_time_ms) as total_time_ms, sum(calls) as calls, sum(rows_returned) as rows_returned, case when sum(calls) > ? then sum(total_time_ms) / sum(calls) else ? end as mean_time_ms, array_agg(distinct tenant_key order by tenant_key) as tenant_keys from deltas where total_time_ms > ? or calls > ? group by fingerprint order by total_time_ms desc, calls desc limit ? offset ?;Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Apr 19 08 2 7s718ms 3s859ms 09 2 7s678ms 3s839ms 10 9 35s614ms 3s957ms 11 6 22s311ms 3s718ms 12 6 22s137ms 3s689ms 13 9 59s38ms 6s559ms 14 30 6m53s 13s774ms 15 18 3m39s 12s213ms 16 12 2m21s 11s823ms 17 12 2m21s 11s772ms 18 7 1m20s 11s467ms 19 9 1m41s 11s326ms 20 12 2m16s 11s339ms 21 12 2m13s 11s145ms 22 12 2m14s 11s208ms 23 12 2m16s 11s348ms 00 12 2m15s 11s268ms [ User: labanimal - Total duration: 32m8s - Times executed: 182 ]
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-18 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-18 13:04:07+02' AND '2026-04-19 13:04:07+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:05:03 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at <= '2026-04-12 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test', 'dev') AND collected_at BETWEEN '2026-04-12 13:04:26+02' AND '2026-04-19 13:04:26+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:04:57 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH start_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at <= '2026-04-18 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), fallback_start AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at BETWEEN '2026-04-18 13:04:05+02' AND '2026-04-19 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at ASC ), end_snap AS ( SELECT DISTINCT ON (tenant_key, fingerprint) tenant_key, fingerprint, query, total_time_ms, calls, rows_returned, collected_at FROM observability.db_top_queries WHERE tenant_key IN ('prod', 'test') AND collected_at BETWEEN '2026-04-18 13:04:05+02' AND '2026-04-19 13:04:05+02' ORDER BY tenant_key, fingerprint, collected_at DESC ), deltas AS ( SELECT e.tenant_key, e.fingerprint, e.query, e.collected_at AS last_seen, GREATEST (COALESCE(e.total_time_ms, 0) - COALESCE(s.total_time_ms, fs.total_time_ms, 0), 0) AS total_time_ms, GREATEST (COALESCE(e.calls, 0) - COALESCE(s.calls, fs.calls, 0), 0) AS calls, GREATEST (COALESCE(e.rows_returned, 0) - COALESCE(s.rows_returned, fs.rows_returned, 0), 0) AS rows_returned FROM end_snap e LEFT JOIN start_snap s ON s.tenant_key = e.tenant_key AND s.fingerprint = e.fingerprint LEFT JOIN fallback_start fs ON fs.tenant_key = e.tenant_key AND fs.fingerprint = e.fingerprint AND s.tenant_key IS NULL ) SELECT fingerprint, MAX(query) AS query, MAX(last_seen) AS last_seen, SUM(total_time_ms) AS total_time_ms, SUM(calls) AS calls, SUM(rows_returned) AS rows_returned, CASE WHEN SUM(calls) > 0 THEN SUM(total_time_ms) / SUM(calls) ELSE 0 END AS mean_time_ms, array_agg(DISTINCT tenant_key ORDER BY tenant_key) AS tenant_keys FROM deltas WHERE total_time_ms > 0 OR calls > 0 GROUP BY fingerprint ORDER BY total_time_ms DESC, calls DESC LIMIT '20' OFFSET '0';
Date: 2026-04-19 13:04:34 Duration: 29s544ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
2 618ms 55s825ms 6s33ms 1,440 2h24m48s create table if not exists observability.phpfpm_counters ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.phpfpm_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
3 618ms 55s825ms 6s33ms 1,440 2h24m48s create table if not exists observability.db_top_queries ( id bigserial primary key, tenant_key text not null, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz not null default now() );Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.db_top_queries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, fingerprint text, query text, mean_time_ms double precision, total_time_ms double precision, calls bigint, rows_returned bigint, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
4 618ms 55s825ms 6s33ms 1,440 2h24m48s create index if not exists idx_uptime_checks_key on observability.uptime_checks (check_key, checked_at desc);Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_key ON observability.uptime_checks (check_key, checked_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
5 618ms 55s825ms 6s33ms 1,440 2h24m48s alter table observability.uptime_checks add column if not exists label text;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS label text;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
6 618ms 55s825ms 6s33ms 1,440 2h24m48s create index if not exists idx_db_top_queries_tenant on observability.db_top_queries (tenant_key, collected_at desc);Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_db_top_queries_tenant ON observability.db_top_queries (tenant_key, collected_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
7 618ms 55s825ms 6s33ms 1,440 2h24m48s create table if not exists observability.uptime_checks ( id bigserial primary key, endpoint text not null, status text not null, latency_ms double precision, checked_at timestamptz not null default now() );Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.uptime_checks ( id bigserial PRIMARY KEY, endpoint text NOT NULL, status text NOT NULL, latency_ms double precision, checked_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
8 618ms 55s825ms 6s33ms 1,440 2h24m48s create index if not exists idx_metrics_timeseries_bucket on observability.metrics_timeseries (bucket_start);Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_bucket ON observability.metrics_timeseries (bucket_start);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
9 618ms 55s825ms 6s33ms 1,440 2h24m48s create index if not exists idx_metrics_timeseries_metric on observability.metrics_timeseries (metric_name);Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_metrics_timeseries_metric ON observability.metrics_timeseries (metric_name);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
10 618ms 55s825ms 6s33ms 1,440 2h24m48s alter table observability.uptime_checks add column if not exists payload jsonb;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
ALTER TABLE observability.uptime_checks ADD COLUMN IF NOT EXISTS payload jsonb;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
11 618ms 55s825ms 6s33ms 1,440 2h24m48s create index if not exists idx_app_events_tenant on observability.app_events (tenant_key, occurred_at desc);Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_tenant ON observability.app_events (tenant_key, occurred_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
12 618ms 55s825ms 6s33ms 1,440 2h24m48s create index if not exists idx_app_events_type on observability.app_events (event_type);Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_app_events_type ON observability.app_events (event_type);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
13 618ms 55s825ms 6s33ms 1,440 2h24m48s create table if not exists observability.metrics_timeseries ( id bigserial primary key, tenant_key text not null, metric_name text not null, bucket_start timestamptz not null, bucket_width_seconds integer not null default ?, sum_value double precision not null default ?, count_value bigint not null default ?, histogram jsonb, created_at timestamptz not null default now(), updated_at timestamptz not null default now(), unique (tenant_key, metric_name, bucket_start, bucket_width_seconds) );Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.metrics_timeseries ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, metric_name text NOT NULL, bucket_start timestamptz NOT NULL, bucket_width_seconds integer NOT NULL DEFAULT 60, sum_value double precision NOT NULL DEFAULT 0, count_value bigint NOT NULL DEFAULT 0, histogram jsonb, created_at timestamptz NOT NULL DEFAULT NOW(), updated_at timestamptz NOT NULL DEFAULT NOW(), UNIQUE (tenant_key, metric_name, bucket_start, bucket_width_seconds) );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
14 618ms 55s825ms 6s33ms 1,440 2h24m48s create table if not exists observability.app_events ( id bigserial primary key, tenant_key text not null, event_type text not null, severity text not null, message text not null, payload jsonb, occurred_at timestamptz not null default now(), created_at timestamptz not null default now() );Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.app_events ( id bigserial PRIMARY KEY, tenant_key text NOT NULL, event_type text NOT NULL, severity text NOT NULL, message text NOT NULL, payload jsonb, occurred_at timestamptz NOT NULL DEFAULT NOW(), created_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
15 618ms 55s825ms 6s33ms 1,440 2h24m48s create table if not exists observability.nginx_counters ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.nginx_counters ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
16 618ms 55s825ms 6s33ms 1,440 2h24m48s create table if not exists observability.system_metrics ( id bigserial primary key, payload jsonb not null, collected_at timestamptz not null default now() );Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE TABLE IF NOT EXISTS observability.system_metrics ( id bigserial PRIMARY KEY, payload jsonb NOT NULL, collected_at timestamptz NOT NULL DEFAULT NOW() );
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
17 618ms 55s825ms 6s33ms 1,440 2h24m48s create index if not exists idx_uptime_checks_endpoint on observability.uptime_checks (endpoint, checked_at desc);Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE INDEX IF NOT EXISTS idx_uptime_checks_endpoint ON observability.uptime_checks (endpoint, checked_at DESC);
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
18 618ms 55s825ms 6s33ms 1,440 2h24m48s create schema if not exists observability;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Apr 19 01 60 0ms 0ms 02 60 31s645ms 527ms 03 60 1m5s 1s91ms 04 60 1m5s 1s91ms 05 60 1m5s 1s91ms 06 60 1m5s 1s91ms 07 60 1m5s 1s91ms 08 60 1m58s 1s968ms 09 60 3m51s 3s851ms 10 60 3m45s 3s751ms 11 60 3m42s 3s715ms 12 60 3m41s 3s691ms 13 60 3m58s 3s975ms 14 60 10m34s 10s571ms 15 60 8m40s 8s679ms 16 60 9m33s 9s559ms 17 60 9m37s 9s633ms 18 60 11m11s 11s192ms 19 60 11m55s 11s930ms 20 60 11m19s 11s333ms 21 60 11m9s 11s155ms 22 60 11m12s 11s207ms 23 60 11m20s 11s341ms 00 60 11m16s 11s269ms [ User: labanimal - Total duration: 2h24m48s - Times executed: 1349 ]
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:06:01 Duration: 55s825ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:05:01 Duration: 31s142ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
CREATE SCHEMA IF NOT EXISTS observability;
Date: 2026-04-19 13:01:01 Duration: 23s262ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
19 1s267ms 2s711ms 1s692ms 141 3m58s with normalised as ( select id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, ?, ?, ?), ?, ?, ?) as fingerprint from observability.app_events where tenant_key in (...) and occurred_at between ? and ? and severity in (...) and not (event_type = ? and (lower(coalesce(message, ?)) = ? or (lower(coalesce(payload ->> ?, ?)) = ? and lower(coalesce(payload ->> ?, ?)) = ?)))) select fingerprint, count(*) as occurrence_count, count(distinct coalesce(payload ->> ?, payload ->> ?, ?)) as affected_users, max(severity) as max_severity, min(occurred_at) as first_seen, max(occurred_at) as last_seen, (array_agg(message order by occurred_at desc))[?] as sample_message, (array_agg(distinct event_type))[?] as event_type, (array_agg(payload ->> ? order by occurred_at desc))[?] as source_file, (array_agg(payload ->> ? order by occurred_at desc))[?] as source_line, (array_agg(payload ->> ? order by occurred_at desc))[?] as sample_request, (array_agg(id order by occurred_at desc))[?] as latest_event_id from normalised group by fingerprint order by occurrence_count desc, last_seen desc limit ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Apr 19 10 1 2s288ms 2s288ms 13 3 6s534ms 2s178ms 14 19 33s611ms 1s769ms 15 18 31s576ms 1s754ms 16 12 18s567ms 1s547ms 17 12 19s51ms 1s587ms 18 7 11s667ms 1s666ms 19 9 14s927ms 1s658ms 20 12 19s922ms 1s660ms 21 12 21s450ms 1s787ms 22 12 20s123ms 1s676ms 23 12 19s16ms 1s584ms 00 12 19s935ms 1s661ms [ User: labanimal - Total duration: 3m58s - Times executed: 141 ]
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod', 'test') AND occurred_at BETWEEN '2026-04-12 13:46:49+02' AND '2026-04-19 13:46:49+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 13:46:52 Duration: 2s711ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod') AND occurred_at BETWEEN '2026-04-12 12:56:07+02' AND '2026-04-19 12:56:07+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 12:56:10 Duration: 2s629ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
WITH normalised AS ( SELECT id, tenant_key, event_type, severity, message, payload, occurred_at, regexp_replace(regexp_replace(message, '\d+', '#', 'g'), '/[^ :]+/', '.../', 'g') AS fingerprint FROM observability.app_events WHERE tenant_key IN ('prod') AND occurred_at BETWEEN '2026-04-12 12:57:41+02' AND '2026-04-19 12:57:41+02' AND severity IN ('error', 'warning') AND NOT (event_type = 'db_error' AND (lower(COALESCE(message, '')) = 'lock wait: client / clientread' OR ( lower(COALESCE(payload->>'wait_event_type', '')) = 'client' AND lower(COALESCE(payload ->> 'wait_event', '')) = 'clientread')))) SELECT fingerprint, COUNT(*) AS occurrence_count, COUNT(DISTINCT COALESCE(payload ->> 'user', payload ->> 'username', 'unbekannt')) AS affected_users, MAX(severity) AS max_severity, MIN(occurred_at) AS first_seen, MAX(occurred_at) AS last_seen, (array_agg(message ORDER BY occurred_at DESC))[1] AS sample_message, (array_agg(DISTINCT event_type))[1] AS event_type, (array_agg(payload ->> 'file' ORDER BY occurred_at DESC))[1] AS source_file, (array_agg(payload ->> 'line' ORDER BY occurred_at DESC))[1] AS source_line, (array_agg(payload ->> 'request' ORDER BY occurred_at DESC))[1] AS sample_request, (array_agg(id ORDER BY occurred_at DESC))[1] AS latest_event_id FROM normalised GROUP BY fingerprint ORDER BY occurrence_count DESC, last_seen DESC LIMIT '30';
Date: 2026-04-19 12:57:44 Duration: 2s501ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
20 750ms 1s324ms 1s28ms 141 2m25s select lower(trim(nullif (payload ->> ?, ?))) as username_key, nullif (coalesce( case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end, ?), ?) as user_id_key, count(*) filter (where severity = ?) as total_user_errors, count(*) filter (where severity = ?) as total_user_warnings, min(occurred_at) filter (where severity = ?) as first_error_date, min(occurred_at) filter (where severity = ?) as first_warning_date from observability.app_events where tenant_key in (...) and occurred_at between ? and ? and severity in (...) and (nullif (payload ->> ?, ?) is not null or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ? or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ? or case when coalesce(payload ->> ?, ?) ~ ? then payload ->> ? else ? end <> ?) group by username_key, user_id_key;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Apr 19 10 1 989ms 989ms 13 3 2s827ms 942ms 14 19 18s881ms 993ms 15 18 19s335ms 1s74ms 16 12 12s263ms 1s21ms 17 12 12s117ms 1s9ms 18 7 7s591ms 1s84ms 19 9 9s800ms 1s88ms 20 12 12s809ms 1s67ms 21 12 12s278ms 1s23ms 22 12 11s735ms 977ms 23 12 12s243ms 1s20ms 00 12 12s197ms 1s16ms [ User: labanimal - Total duration: 2m25s - Times executed: 141 ]
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 14:01:49+02' AND '2026-04-19 14:01:49+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 14:01:51 Duration: 1s324ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 18:40:14+02' AND '2026-04-19 18:40:14+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 18:40:15 Duration: 1s300ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
-
SELECT LOWER(TRIM(NULLIF (payload ->> 'username', ''))) AS username_key, NULLIF( COALESCE( CASE WHEN COALESCE(payload->>'user_id', '') ~ '^\d+$' THEN payload ->> 'user_id' ELSE '' END, CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END, CASE WHEN COALESCE(payload->>'userid', '') ~ '^\d+$' THEN payload ->> 'userid' ELSE '' END, ''), '' ) AS user_id_key, COUNT(*) FILTER (WHERE severity = 'error') AS total_user_errors, COUNT(*) FILTER (WHERE severity = 'warning') AS total_user_warnings, MIN(occurred_at) FILTER (WHERE severity = 'error') AS first_error_date, MIN(occurred_at) FILTER (WHERE severity = 'warning') AS first_warning_date FROM observability.app_events WHERE tenant_key IN ('prod','test') AND occurred_at BETWEEN '2026-04-12 19:05:14+02' AND '2026-04-19 19:05:14+02' AND severity IN ('error', 'warning') AND ( NULLIF(payload->>'username', '') IS NOT NULL OR CASE WHEN COALESCE(payload ->> 'user_id', '') ~ '^\d+$' THEN payload->>'user_id' ELSE '' END <> '' OR CASE WHEN COALESCE(payload->>'user', '') ~ '^\d+$' THEN payload ->> 'user' ELSE '' END <> '' OR CASE WHEN COALESCE(payload ->> 'userid', '') ~ '^\d+$' THEN payload->>'userid' ELSE '' END <> '') GROUP BY username_key, user_id_key;
Date: 2026-04-19 19:05:15 Duration: 1s260ms Database: zemm_monitoring User: labanimal Bind query: yes Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
Time consuming prepare
Rank Total duration Times executed Min duration Max duration Avg duration Query NO DATASET
Time consuming bind
Rank Total duration Times executed Min duration Max duration Avg duration Query NO DATASET
-
Events
Log levels
Key values
- 118,490 Event entries
- (EVENTLOG entries are formaly LOG level entries that are not queries)
Events distribution (except queries)
Key values
- 0 PANIC entries
- 0 FATAL entries
- 20 ERROR entries
- 0 WARNING entries
- 0 EVENTLOG entries
Most Frequent Errors/Events
Key values
- 20 Max number of times the same event was reported
- 20 Total events found
Rank Times reported Error 1 20 ERROR: duplicate key value violates unique constraint "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Apr 19 04 1 13 1 14 3 15 2 16 1 17 2 18 1 19 1 20 1 21 2 22 1 23 3 00 1 - ERROR: duplicate key value violates unique constraint "metrics_timeseries_tenant_key_metric_name_bucket_start_buck_key"
- ERROR: duplicate key value violates unique constraint "metrics_timeseries_tenant_key_metric_name_bucket_start_buck_key"
- ERROR: duplicate key value violates unique constraint "metrics_timeseries_tenant_key_metric_name_bucket_start_buck_key"
Detail: Key (tenant_key, metric_name, bucket_start, bucket_width_seconds)=(test, http_requests_total, 2026-04-19 03:25:00+02, 60) already exists.
Statement: INSERT INTO observability.metrics_timeseries (tenant_key, metric_name, bucket_start, bucket_width_seconds, sum_value, count_value, histogram) VALUES ($1, $2, $3, $4, $5, $6, $7)Date: 2026-04-19 03:25:13 Database: zemm_monitoring Application: User: labanimal Remote: Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
Detail: Key (tenant_key, metric_name, bucket_start, bucket_width_seconds)=(test, http_requests_total, 2026-04-19 12:57:00+02, 60) already exists.
Statement: INSERT INTO observability.metrics_timeseries (tenant_key, metric_name, bucket_start, bucket_width_seconds, sum_value, count_value, histogram) VALUES ($1, $2, $3, $4, $5, $6, $7)Date: 2026-04-19 12:57:44 Database: zemm_monitoring Application: User: labanimal Remote: Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv
Detail: Key (tenant_key, metric_name, bucket_start, bucket_width_seconds)=(test, http_requests_total, 2026-04-19 13:01:00+02, 60) already exists.
Statement: INSERT INTO observability.metrics_timeseries (tenant_key, metric_name, bucket_start, bucket_width_seconds, sum_value, count_value, histogram) VALUES ($1, $2, $3, $4, $5, $6, $7)Date: 2026-04-19 13:01:47 Database: zemm_monitoring Application: User: labanimal Remote: Log file: /var/log/postgresql/postgresql-2026-04-19_000000.csv