-
Global information
- Generated on Tue Nov 5 19:50:15 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 816,345 log entries in 13s
- Log start from 2024-11-05 00:00:03 to 2024-11-05 23:59:59
-
Overview
Global Stats
- 1,154 Number of unique normalized queries
- 282,581 Number of queries
- 19h10m55s Total query duration
- 2024-11-05 00:00:03 First query
- 2024-11-05 23:59:59 Last query
- 66 queries/s at 2024-11-05 16:30:43 Query peak
- 19h10m55s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 19h10m55s Execute total duration
- 1,494 Number of events
- 6 Number of unique normalized events
- 1,058 Max number of times the same event was reported
- 0 Number of cancellation
- 0 Total number of automatic vacuums
- 0 Total number of automatic analyzes
- 0 Number temporary file
- 0 Max size of temporary file
- 0.00 B Average size of temporary file
- 0 Total number of sessions
- 0 sessions at Session peak
- 0ms Total duration of sessions
- 0ms Average duration of sessions
- 282,581 Average queries per session
- 19h10m55s Average queries duration per session
- n/a Average idle time per session
- 0 Total number of connections
- 1 Total number of databases
SQL Traffic
Key values
- 66 queries/s Query Peak
- 2024-11-05 16:30:43 Date
SELECT Traffic
Key values
- 65 queries/s Query Peak
- 2024-11-05 16:30:43 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 10 queries/s Query Peak
- 2024-11-05 15:42:29 Date
Queries duration
Key values
- 19h10m55s 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
Day Hour Count Min duration Max duration Avg duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Nov 05 00 4,335 120ms 2s363ms 176ms 16s259ms 24s214ms 1m27s 01 4,118 120ms 1s63ms 151ms 15s932ms 18s178ms 23s767ms 02 3,948 120ms 878ms 158ms 15s911ms 20s623ms 21s416ms 03 3,882 120ms 1s44ms 157ms 14s743ms 20s338ms 26s849ms 04 3,731 120ms 1s498ms 160ms 17s433ms 19s213ms 24s52ms 05 4,062 120ms 4s386ms 148ms 15s7ms 16s371ms 20s738ms 06 4,011 120ms 976ms 151ms 16s589ms 18s909ms 24s333ms 07 3,985 0ms 763ms 152ms 14s656ms 16s953ms 20s177ms 08 12,409 120ms 3s497ms 179ms 1m3s 1m5s 1m27s 09 13,379 120ms 2s753ms 209ms 1m4s 1m7s 1m24s 10 4,553 120ms 3m57s 334ms 1m16s 2m8s 4m8s 11 4,482 120ms 4s905ms 176ms 19s467ms 33s453ms 1m12s 12 11,264 120ms 2m20s 246ms 1m22s 1m33s 2m51s 13 22,720 120ms 23s937ms 288ms 2m44s 3m26s 4m22s 14 30,145 120ms 30s5ms 282ms 3m30s 3m44s 5m30s 15 24,840 120ms 32s701ms 269ms 3m 3m34s 5m5s 16 20,648 120ms 9s122ms 271ms 2m41s 3m13s 5m20s 17 21,886 120ms 32s22ms 265ms 2m41s 3m1s 4m5s 18 23,631 120ms 15s102ms 274ms 3m1s 3m38s 4m2s 19 21,537 120ms 14s336ms 242ms 2m24s 2m57s 3m29s 20 19,707 120ms 49s124ms 247ms 2m55s 3m28s 3m39s 21 10,195 120ms 8s194ms 205ms 57s905ms 1m10s 1m14s 22 5,117 120ms 4s381ms 173ms 33s505ms 1m5s 1m8s 23 3,996 120ms 1m8s 284ms 50s267ms 1m14s 1m22s Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Nov 05 00 4,334 0 176ms 13s631ms 16s259ms 25s425ms 01 4,118 0 151ms 11s74ms 15s932ms 20s884ms 02 3,948 0 158ms 12s580ms 15s911ms 21s195ms 03 3,882 0 157ms 11s583ms 14s743ms 26s556ms 04 3,729 0 160ms 13s481ms 17s433ms 20s174ms 05 4,059 0 148ms 10s858ms 14s636ms 19s295ms 06 4,011 0 151ms 11s522ms 16s589ms 21s863ms 07 3,985 0 152ms 12s808ms 14s656ms 19s882ms 08 6,101 0 176ms 23s454ms 44s1ms 52s984ms 09 8,344 0 227ms 50s651ms 51s653ms 57s740ms 10 4,433 120 334ms 16s808ms 1m6s 2m34s 11 4,482 0 176ms 15s322ms 19s467ms 35s860ms 12 10,087 0 248ms 53s819ms 1m8s 2m8s 13 18,795 0 303ms 2m7s 2m27s 3m19s 14 23,010 0 304ms 2m27s 2m49s 3m50s 15 19,978 0 282ms 2m7s 2m31s 3m29s 16 16,657 0 287ms 1m43s 2m22s 3m43s 17 17,667 0 275ms 1m55s 2m18s 3m15s 18 18,650 0 294ms 2m11s 2m35s 3m17s 19 17,420 0 252ms 1m36s 2m3s 2m48s 20 15,808 0 254ms 1m26s 2m28s 3m7s 21 8,719 0 207ms 42s44ms 48s987ms 1m3s 22 4,394 0 172ms 15s876ms 26s25ms 49s295ms 23 3,928 0 159ms 14s811ms 15s651ms 19s23ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Nov 05 00 0 1 0 0 428ms 0ms 0ms 0ms 01 0 0 0 0 0ms 0ms 0ms 0ms 02 0 0 0 0 0ms 0ms 0ms 0ms 03 0 0 0 0 0ms 0ms 0ms 0ms 04 0 2 0 0 390ms 0ms 0ms 0ms 05 0 2 1 0 510ms 0ms 0ms 0ms 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 0 0 0 0ms 0ms 0ms 0ms 08 1 6,287 0 0 179ms 21s321ms 40s757ms 53s719ms 09 0 5,031 0 0 179ms 10s782ms 30s960ms 52s517ms 10 0 0 0 0 0ms 0ms 0ms 0ms 11 0 0 0 0 0ms 0ms 0ms 0ms 12 0 1,165 10 0 223ms 4s117ms 7s821ms 13s837ms 13 0 3,878 40 0 215ms 14s752ms 21s100ms 27s848ms 14 0 7,073 54 0 212ms 25s644ms 29s863ms 38s117ms 15 0 4,811 49 0 217ms 18s545ms 24s735ms 30s459ms 16 0 3,951 31 0 205ms 14s990ms 21s286ms 29s510ms 17 0 4,161 46 0 221ms 16s34ms 22s985ms 39s639ms 18 0 4,941 32 0 200ms 19s823ms 24s46ms 35s465ms 19 0 4,092 21 0 200ms 14s336ms 23s91ms 37s20ms 20 0 3,873 19 0 220ms 17s262ms 27s142ms 45s176ms 21 0 1,466 9 0 195ms 4s947ms 8s343ms 16s593ms 22 0 723 0 0 178ms 0ms 0ms 17s630ms 23 0 0 68 0 7s490ms 0ms 13s227ms 1m1s Day Hour Prepare Bind Bind/Prepare Percentage of prepare Nov 05 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 0 0.00 0.00% 08 0 0 0.00 0.00% 09 0 0 0.00 0.00% 10 0 0 0.00 0.00% 11 0 0 0.00 0.00% 12 0 0 0.00 0.00% 13 0 0 0.00 0.00% 14 0 0 0.00 0.00% 15 0 0 0.00 0.00% 16 0 0 0.00 0.00% 17 0 0 0.00 0.00% 18 0 0 0.00 0.00% 19 0 0 0.00 0.00% 20 0 0 0.00 0.00% 21 0 0 0.00 0.00% 22 0 0 0.00 0.00% 23 0 0 0.00 0.00% Day Hour Count Average / Second Nov 05 00 0 0.00/s 01 0 0.00/s 02 0 0.00/s 03 0 0.00/s 04 0 0.00/s 05 0 0.00/s 06 0 0.00/s 07 0 0.00/s 08 0 0.00/s 09 0 0.00/s 10 0 0.00/s 11 0 0.00/s 12 0 0.00/s 13 0 0.00/s 14 0 0.00/s 15 0 0.00/s 16 0 0.00/s 17 0 0.00/s 18 0 0.00/s 19 0 0.00/s 20 0 0.00/s 21 0 0.00/s 22 0 0.00/s 23 0 0.00/s Day Hour Count Average Duration Average idle time Nov 05 00 0 0ms 0ms 01 0 0ms 0ms 02 0 0ms 0ms 03 0 0ms 0ms 04 0 0ms 0ms 05 0 0ms 0ms 06 0 0ms 0ms 07 0 0ms 0ms 08 0 0ms 0ms 09 0 0ms 0ms 10 0 0ms 0ms 11 0 0ms 0ms 12 0 0ms 0ms 13 0 0ms 0ms 14 0 0ms 0ms 15 0 0ms 0ms 16 0 0ms 0ms 17 0 0ms 0ms 18 0 0ms 0ms 19 0 0ms 0ms 20 0 0ms 0ms 21 0 0ms 0ms 22 0 0ms 0ms 23 0 0ms 0ms -
Connections
Established Connections
Key values
- 0 connections Connection Peak
- Date
Connections per database
Key values
- unknown Main Database
- 0 connections Total
Connections per user
Key values
- unknown Main User
- 0 connections Total
-
Sessions
Simultaneous sessions
Key values
- 0 sessions Session Peak
- Date
Histogram of session times
Key values
- duration
Sessions per database
Key values
- unknown Main Database
- 0 sessions Total
Sessions per user
Key values
- unknown Main User
- 0 sessions Total
Sessions per host
Key values
- unknown Main Host
- 0 sessions Total
-
Checkpoints / Restartpoints
Checkpoints Buffers
Key values
- 0 buffers Checkpoint Peak
- Date
- seconds Highest write time
- seconds Sync time
Checkpoint write buffers (5 minutes period)
NO DATASET
Checkpoints Wal files
Key values
- 0 files Wal files usage Peak
- Date
Checkpoint Wal files usage (5 minutes period)
NO DATASET
Checkpoints distance
Key values
- 0 Mo Distance Peak
- Date
Checkpoints Activity
Day Hour Written buffers Write time Sync time Total time Nov 05 00 0 0s 0s 0s 01 0 0s 0s 0s 02 0 0s 0s 0s 03 0 0s 0s 0s 04 0 0s 0s 0s 05 0 0s 0s 0s 06 0 0s 0s 0s 07 0 0s 0s 0s 08 0 0s 0s 0s 09 0 0s 0s 0s 10 0 0s 0s 0s 11 0 0s 0s 0s 12 0 0s 0s 0s 13 0 0s 0s 0s 14 0 0s 0s 0s 15 0 0s 0s 0s 16 0 0s 0s 0s 17 0 0s 0s 0s 18 0 0s 0s 0s 19 0 0s 0s 0s 20 0 0s 0s 0s 21 0 0s 0s 0s 22 0 0s 0s 0s 23 0 0s 0s 0s Day Hour Added Removed Recycled Synced files Longest sync Average sync Nov 05 00 0 0 0 0 0s 0s 01 0 0 0 0 0s 0s 02 0 0 0 0 0s 0s 03 0 0 0 0 0s 0s 04 0 0 0 0 0s 0s 05 0 0 0 0 0s 0s 06 0 0 0 0 0s 0s 07 0 0 0 0 0s 0s 08 0 0 0 0 0s 0s 09 0 0 0 0 0s 0s 10 0 0 0 0 0s 0s 11 0 0 0 0 0s 0s 12 0 0 0 0 0s 0s 13 0 0 0 0 0s 0s 14 0 0 0 0 0s 0s 15 0 0 0 0 0s 0s 16 0 0 0 0 0s 0s 17 0 0 0 0 0s 0s 18 0 0 0 0 0s 0s 19 0 0 0 0 0s 0s 20 0 0 0 0 0s 0s 21 0 0 0 0 0s 0s 22 0 0 0 0 0s 0s 23 0 0 0 0 0s 0s Day Hour Count Avg time (sec) Nov 05 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 Nov 05 00 0.00 kB 0.00 kB 01 0.00 kB 0.00 kB 02 0.00 kB 0.00 kB 03 0.00 kB 0.00 kB 04 0.00 kB 0.00 kB 05 0.00 kB 0.00 kB 06 0.00 kB 0.00 kB 07 0.00 kB 0.00 kB 08 0.00 kB 0.00 kB 09 0.00 kB 0.00 kB 10 0.00 kB 0.00 kB 11 0.00 kB 0.00 kB 12 0.00 kB 0.00 kB 13 0.00 kB 0.00 kB 14 0.00 kB 0.00 kB 15 0.00 kB 0.00 kB 16 0.00 kB 0.00 kB 17 0.00 kB 0.00 kB 18 0.00 kB 0.00 kB 19 0.00 kB 0.00 kB 20 0.00 kB 0.00 kB 21 0.00 kB 0.00 kB 22 0.00 kB 0.00 kB 23 0.00 kB 0.00 kB -
Temporary Files
Size of temporary files
Key values
- 0 Temp Files size Peak
- Date
Size of temporary files (5 minutes period)
NO DATASET
Number of temporary files
Key values
- 0 per second Temp Files Peak
- Date
Number of temporary files (5 minutes period)
NO DATASET
Temporary Files Activity
Day Hour Count Total size Average size Nov 05 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 0 0 0 08 0 0 0 09 0 0 0 10 0 0 0 11 0 0 0 12 0 0 0 13 0 0 0 14 0 0 0 15 0 0 0 16 0 0 0 17 0 0 0 18 0 0 0 19 0 0 0 20 0 0 0 21 0 0 0 22 0 0 0 23 0 0 0 -
Vacuums
Vacuums / Analyzes Distribution
Key values
- 0 sec Highest CPU-cost vacuum
Table
Database - Date
- 0 sec Highest CPU-cost analyze
Table
Database - Date
Autovacuum actions (5 minutes period)
NO DATASET
Average Autovacuum Duration
Key values
- 0 sec Highest CPU-cost vacuum
Table
Database - Date
Average Autovacuum Duration (5 minutes average)
NO DATASET
Analyzes per table
Key values
- unknown (0) Main table analyzed (database )
- 0 analyzes Total
Vacuums per table
Key values
- unknown (0) Main table vacuumed on database
- 0 vacuums Total
Tuples removed per table
Key values
- unknown (0) Main table with removed tuples on database
- 0 tuples Total removed
Pages removed per table
Key values
- unknown (0) Main table with removed pages on database unknown
- 0 pages Total removed
Autovacuum Activity
Day Hour VACUUMs ANALYZEs Nov 05 00 0 0 01 0 0 02 0 0 03 0 0 04 0 0 05 0 0 06 0 0 07 0 0 08 0 0 09 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 - 0 sec Highest CPU-cost vacuum
-
Locks
Locks by types
Key values
- ShareLock Main Lock Type
- 22 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query 1 9 45s688ms 2s92ms 22s130ms 5s76ms update account_move set write_date = write_date where id = ( select id from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) and id != ? and sequence_prefix = ( select sequence_prefix from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) and id != ? order by id desc limit ?) order by sequence_number desc limit ?) returning name;-
UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1755320 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1755320 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-11-05 18:49:17
2 7 16s443ms 1s59ms 4s337ms 2s349ms update "account_move" set "message_main_attachment_id" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "account_move" SET "message_main_attachment_id" = 5821067, "write_uid" = 1267, "write_date" = (now() at time zone 'UTC') WHERE id IN (1754036);
Date: 2024-11-05 13:49:04
3 1 10s318ms 10s318ms 10s318ms 10s318ms update account_move set write_date = write_date where id = ( select id from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type in (...) and id != ? and sequence_prefix = ( select sequence_prefix from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type in (...) and id != ? order by id desc limit ?) order by sequence_number desc limit ?) returning name;-
UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type IN ('out_refund', 'in_refund') AND id != 1709555 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type IN ('out_refund', 'in_refund') AND id != 1709555 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-11-05 16:53:01
4 2 4s292ms 1s741ms 2s551ms 2s146ms update "account_move" set "access_token" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "account_move" SET "access_token" = '6c7154be-9577-493b-a298-f81a038533cf', "write_uid" = 964, "write_date" = (now() at time zone 'UTC') WHERE id IN (1755339);
Date: 2024-11-05 18:53:17
5 1 3s746ms 3s746ms 3s746ms 3s746ms update account_move set write_date = write_date where id = ( select id from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) and sequence_prefix = ( select sequence_prefix from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) order by id desc limit ?) order by sequence_number desc limit ?) returning name;-
UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-11-05 14:08:51
6 1 3s609ms 3s609ms 3s609ms 3s609ms delete from mail_message where id in (...);-
DELETE FROM mail_message WHERE id IN (1356658);
Date: 2024-11-05 17:02:45
7 1 2s21ms 2s21ms 2s21ms 2s21ms update "product_warehouse_inventory" set "lead_days" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "product_warehouse_inventory" SET "lead_days" = 15, "write_uid" = 1245, "write_date" = (now() at time zone 'UTC') WHERE id IN (393902);
Date: 2024-11-05 14:18:07
Queries that waited the most
Rank Wait time Query 1 22s130ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1753916 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1753916 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 13:21:05 ]
2 11s663ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1753958 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1753958 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 13:24:25 ]
3 10s318ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type IN ('out_refund', 'in_refund') AND id != 1709555 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type IN ('out_refund', 'in_refund') AND id != 1709555 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 16:53:01 ]
4 4s337ms UPDATE "account_move" SET "message_main_attachment_id" = 5821935, "write_uid" = 1027, "write_date" = (now() at time zone 'UTC') WHERE id IN (1754719);[ Date: 2024-11-05 15:55:46 ]
5 3s746ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 14:08:51 ]
6 3s609ms DELETE FROM mail_message WHERE id IN (1356658);[ Date: 2024-11-05 17:02:45 ]
7 3s380ms UPDATE "account_move" SET "message_main_attachment_id" = 5821184, "write_uid" = 951, "write_date" = (now() at time zone 'UTC') WHERE id IN (1754139);[ Date: 2024-11-05 14:04:01 ]
8 2s731ms UPDATE "account_move" SET "message_main_attachment_id" = 5822198, "write_uid" = 1017, "write_date" = (now() at time zone 'UTC') WHERE id IN (1754885);[ Date: 2024-11-05 16:53:13 ]
9 2s590ms UPDATE "account_move" SET "message_main_attachment_id" = 5821414, "write_uid" = 990, "write_date" = (now() at time zone 'UTC') WHERE id IN (1754334);[ Date: 2024-11-05 14:28:47 ]
10 2s551ms UPDATE "account_move" SET "access_token" = '82c3c9ca-aefd-4a86-9ed3-75e2f15d7eab', "write_uid" = 1307, "write_date" = (now() at time zone 'UTC') WHERE id IN (1754254);[ Date: 2024-11-05 14:15:53 ]
11 2s215ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1754905 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1754905 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 17:01:34 ]
12 2s92ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1755320 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1755320 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 18:49:17 ]
13 2s21ms UPDATE "product_warehouse_inventory" SET "lead_days" = 15, "write_uid" = 1245, "write_date" = (now() at time zone 'UTC') WHERE id IN (393902);[ Date: 2024-11-05 14:18:07 ]
14 1s936ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1754139 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1754139 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 14:04:09 ]
15 1s909ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1754233 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1754233 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 14:13:49 ]
16 1s741ms UPDATE "account_move" SET "access_token" = '6c7154be-9577-493b-a298-f81a038533cf', "write_uid" = 964, "write_date" = (now() at time zone 'UTC') WHERE id IN (1755339);[ Date: 2024-11-05 18:53:17 ]
17 1s573ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1753884 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1753884 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 13:12:17 ]
18 1s302ms UPDATE "account_move" SET "message_main_attachment_id" = 5821543, "write_uid" = 1005, "write_date" = (now() at time zone 'UTC') WHERE id IN (1754452);[ Date: 2024-11-05 14:51:57 ]
19 1s139ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1520125 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1520125 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-11-05 14:57:32 ]
20 1s59ms UPDATE "account_move" SET "message_main_attachment_id" = 5821067, "write_uid" = 1267, "write_date" = (now() at time zone 'UTC') WHERE id IN (1754036);[ Date: 2024-11-05 13:49:04 ]
-
Queries
Queries by type
Key values
- 230,539 Total read queries
- 52,042 Total write queries
Queries by database
Key values
- unknown Main database
- 282,581 Requests
- 19h10m55s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 283,336 Requests
User Request type Count Duration unknown Total 283,336 19h12m45s copy to 120 14m18s cte 83 47s217ms delete 380 22m36s insert 1 220ms select 231,294 15h53m13s tcl 1 147ms update 51,457 2h41m48s Duration by user
Key values
- 19h12m45s (unknown) Main time consuming user
User Request type Count Duration unknown Total 283,336 19h12m45s copy to 120 14m18s cte 83 47s217ms delete 380 22m36s insert 1 220ms select 231,294 15h53m13s tcl 1 147ms update 51,457 2h41m48s Queries by host
Key values
- unknown Main host
- 283,336 Requests
- 19h12m45s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 282,581 Requests
- 19h10m55s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-11-05 19:20:04 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 263,609 100-500ms duration
Slowest individual queries
Rank Duration Query 1 3m57s COPY public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-11-05 10:10:50 ]
2 2m20s SELECT "item_list_line".id FROM "item_list_line" WHERE ("item_list_line"."product_id" in (271541)) ORDER BY "item_list_line"."id";[ Date: 2024-11-05 12:26:42 ]
3 2m18s COPY public.item_list_line (id, item_demand_plan_id, product_id, selling_branch, product_uom_qty, invoice_date, warehouse_id, method, inventory_vendor_id, create_uid, create_date, write_uid, write_date, active, min_product_len_1, min_product_len_2, min_baseline_size, seasonal_period, supercede_product_id, superceded, campaign_id, source_id, medium_id, message_main_attachment_id, access_token, ref_id, ref) TO stdout;[ Date: 2024-11-05 10:04:34 ]
4 2m1s COPY public.mail_message (id, subject, date, body, parent_id, model, res_id, record_name, message_type, subtype_id, mail_activity_type_id, is_internal, email_from, author_id, no_auto_thread, message_id, reply_to, mail_server_id, moderation_status, moderator_id, email_layout_xmlid, add_sign, create_uid, create_date, write_uid, write_date, email_cc, email_bcc, email_to, ks_email_cc_string, ks_email_bcc_string, ks_cc_partners, ks_bcc_partners) TO stdout;[ Date: 2024-11-05 10:06:51 ]
5 1m8s DELETE FROM account_move_line WHERE id IN (6134115, 6134116, 6134117, 6134118, 6134119, 6134120, 6134121, 6134122, 6134123, 6134124, 6134125, 6134126, 6134127, 6134128, 6134129, 6134130, 6134131, 6134132, 6134133, 6134134, 6134135, 6134136, 6134137, 6134138, 6134139, 6134140, 6134141, 6134142, 6134143, 6138768, 6138769);[ Date: 2024-11-05 23:04:53 ]
6 1m5s DELETE FROM account_move_line WHERE id IN (6135859, 6135860, 6010433, 6010434, 6010435, 6010436, 6010437, 6010438, 6010439, 6010440, 6010441, 6010442, 6010443, 6010444, 6010445, 6010446, 6010447, 6010448, 6010449, 6010450, 6010451, 6010452, 6010453, 6010454, 6010455, 6010456, 6010457, 6010458, 6010459, 6010460);[ Date: 2024-11-05 23:38:56 ]
7 49s124ms DELETE FROM sale_order_line WHERE id IN (516102, 516103, 516104, 516154, 516257, 516526, 516527);[ Date: 2024-11-05 20:27:16 ]
8 48s509ms DELETE FROM account_move_line WHERE id IN (6143597, 6143598, 6143599, 6143600, 6112814, 6112815, 6112816, 6112817, 6112818, 6112819, 6112820, 6112821, 6112822, 6112823, 6112824, 6112825, 6112826, 6112827, 6112828, 6112829, 6112830, 6112831);[ Date: 2024-11-05 23:33:01 ]
9 45s176ms DELETE FROM account_move_line WHERE id IN (6145989, 6145990, 6145991, 6145992, 6145993, 6145994, 6145995, 6145996, 6145997, 6145998, 6145999, 6146000, 6146001, 6146002, 6146003, 6146004, 6146005, 6146006, 6146007);[ Date: 2024-11-05 20:11:41 ]
10 44s502ms DELETE FROM account_move_line WHERE id IN (6136529, 6136530, 6136531, 6136532, 6136533, 6136534, 6136535, 6136536, 6136537, 6136538, 6136539, 6136540, 6136541, 6136542, 6136543, 6136544, 6137063, 6137064, 6137065, 6137066);[ Date: 2024-11-05 23:01:19 ]
11 41s680ms COPY public.account_move_line (id, move_id, move_name, date, ref, parent_state, journal_id, company_id, company_currency_id, account_id, account_root_id, sequence, name, quantity, price_unit, discount, debit, credit, balance, amount_currency, price_subtotal, price_total, reconciled, blocked, date_maturity, currency_id, partner_id, product_uom_id, product_id, reconcile_model_id, payment_id, statement_line_id, statement_id, tax_line_id, tax_group_id, tax_base_amount, tax_exigible, tax_repartition_line_id, tax_audit, amount_residual, amount_residual_currency, full_reconcile_id, matching_number, analytic_account_id, display_type, is_rounding_line, exclude_from_invoice_tab, create_uid, create_date, write_uid, write_date, expected_pay_date, internal_note, next_action_date, followup_line_id, followup_date, is_anglo_saxon_line, purchase_line_id, branch_id, branch_name, vehicle_id, move_options, sign_product_qty, sign_price_subtotal, new_product_qty, sale_line_id, child_sale_line_id, main_invoice_line_id, core_bank_transaction, is_rtv_line, core_qty, rebate_amount, cost_price, is_visible_in_report, is_labour, can_be_paid, bal_core_bank_id, repair_line_id, inv_back_order_qty, sale_back_order_qty, product_pricelist_item_id, is_discount, is_sale_tax, auto_reconcile, is_writeoff, is_extra_line, is_carry_forward, reconcile_date_from_add) TO stdout;[ Date: 2024-11-05 10:01:07 ]
12 34s512ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-11-30')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id UNION ALL SELECT account_move_line.account_id AS groupby, 'initial_balance' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-10-31')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in (1334))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;[ Date: 2024-11-05 20:18:43 ]
13 34s51ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-11-30')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id UNION ALL SELECT account_move_line.account_id AS groupby, 'initial_balance' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-10-31')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in (1334))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;[ Date: 2024-11-05 20:17:48 ]
14 33s219ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-11-30')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id UNION ALL SELECT account_move_line.account_id AS groupby, 'initial_balance' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-10-31')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in (1334))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;[ Date: 2024-11-05 20:18:23 ]
15 32s701ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-11-30')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id;[ Date: 2024-11-05 15:06:30 ]
16 32s22ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-11-30')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id;[ Date: 2024-11-05 17:40:55 ]
17 30s614ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-11-30')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id;[ Date: 2024-11-05 17:41:14 ]
18 30s5ms DELETE FROM stock_inventory_line WHERE id IN (3087244, 3087217, 3087293, 3087291, 3087229, 3087234, 3087279, 3087249, 3087228, 3087218, 3087302, 3087259, 3087219, 3087282, 3087251, 3087220, 3087306, 3087270, 3087294, 3087221, 3087222, 3087272, 3087305, 3087267, 3087260, 3087277, 3087278, 3087274, 3087266, 3087240, 3087295, 3087296, 3087297, 3087298, 3087262, 3087241, 3087263, 3087245, 3087284, 3087288, 3087235, 3087303, 3087223, 3087264, 3087227, 3087299, 3087271, 3087286, 3087250, 3087308, 3087224, 3087292, 3087285, 3087231, 3087301, 3087256, 3087226, 3087236, 3087283, 3087246, 3087280, 3087276, 3087257, 3087300, 3087289, 3087304, 3087281, 3087307, 3087237, 3087268, 3087261, 3087248, 3087253, 3087273, 3087232, 3087290, 3087238, 3087254, 3087255, 3087225, 3087309, 3087243, 3087230, 3087287, 3087233, 3087258, 3087275, 3087239, 3087265, 3087269, 3087242, 3087247, 3087252);[ Date: 2024-11-05 14:12:31 ]
19 27s225ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-11-30')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id;[ Date: 2024-11-05 17:41:34 ]
20 26s583ms SELECT "sale_line_report".id FROM "sale_line_report" WHERE (("sale_line_report"."user_id" = 985) AND (("sale_line_report"."id" > '0') AND (((("sale_line_report"."branch_id" in (37)) AND "sale_line_report"."display_type" IS NULL) AND ((("sale_line_report"."open_qty_fil" > 0.0) AND (("sale_line_report"."state" not in ('draft', 'cancel')) OR "sale_line_report"."state" IS NULL)) AND ("sale_line_report"."move_options" = 'new_product'))) AND ("sale_line_report"."so_line_id" IS NULL AND (unaccent ("sale_line_report"."move_options"::text) ilike unaccent ('%new%')))))) ORDER BY "sale_line_report"."date" DESC, "sale_line_report"."id" ASC LIMIT 80;[ Date: 2024-11-05 14:28:50 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 7h10m38s 134,493 120ms 2s964ms 192ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Nov 05 19 3,710 9m5s 147ms 20 3,734 9m6s 146ms 21 3,553 9m2s 152ms 22 3,488 8m51s 152ms 23 3,366 8m47s 156ms 00 3,689 8m44s 142ms 01 3,647 8m54s 146ms 02 3,565 8m39s 145ms 03 3,761 9m48s 156ms 04 3,901 10m1s 154ms 05 4,040 9m35s 142ms 06 4,040 10m2s 149ms 07 6,194 17m31s 169ms 08 9,568 33m57s 212ms 09 9,646 38m10s 237ms 10 9,009 34m22s 228ms 11 8,747 36m33s 250ms 12 8,940 31m51s 213ms 13 8,893 35m54s 242ms 14 8,877 31m52s 215ms 15 7,891 28m43s 218ms 16 5,451 14m29s 159ms 17 3,548 8m39s 146ms 18 3,235 7m53s 146ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19585]', '["pointspring_master","mail.channel",572]', '["pointspring_master","mail.channel",645]', '["pointspring_master","res.partner",19585]', '["pointspring_master","ir.needaction",19585]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s964ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19545]', '["pointspring_master","mail.channel",33]', '["pointspring_master","mail.channel",472]', '["pointspring_master","mail.channel",520]', '["pointspring_master","mail.channel",571]', '["pointspring_master","mail.channel",611]', '["pointspring_master","res.partner",19545]', '["pointspring_master","ir.needaction",19545]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s920ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_984"', '["pointspring_master","calendar.alarm",19522]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",329]', '["pointspring_master","mail.channel",330]', '["pointspring_master","mail.channel",422]', '["pointspring_master","mail.channel",639]', '["pointspring_master","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s916ms
2 57m28s 8,607 369ms 2s805ms 400ms select id, product_id, warehouse_id, loc_check_qty, coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ?;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Nov 05 03 307 1m56s 379ms 04 1,498 9m30s 380ms 07 210 1m22s 390ms 08 669 4m32s 406ms 09 1,142 7m57s 417ms 10 776 5m19s 412ms 11 598 4m 402ms 12 675 4m33s 404ms 13 1,015 6m50s 404ms 14 570 3m50s 404ms 15 775 5m12s 403ms 16 199 1m17s 389ms 17 173 1m6s 384ms -
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 14:42:04 Duration: 2s805ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 18:30:45 Duration: 1s340ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 14:18:52 Duration: 1s227ms
3 54m23s 8,608 320ms 2s895ms 379ms select pwi.id as pwi_id, pwi.loc_check_qty as src_loc_check_qty, pwi.rep_loc_check_qty as ex_rep_loc_check_qty, sw.id as replenish_wh_id, coalesce(rep_pwi.loc_check_qty, ?) as rep_loc_check_qty from product_warehouse_inventory pwi join stock_warehouse sw on sw.branch_id = pwi.replenish_branch_id left join product_warehouse_inventory rep_pwi on rep_pwi.warehouse_id = sw.id and rep_pwi.product_id = pwi.product_id where pwi.replenish_branch_id is not null and pwi.rep_loc_check_qty != (pwi.loc_check_qty + coalesce(rep_pwi.loc_check_qty, ?));Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Nov 05 03 307 1m44s 339ms 04 1,498 8m28s 339ms 07 210 1m15s 361ms 08 669 4m16s 383ms 09 1,143 7m46s 408ms 10 776 5m11s 401ms 11 598 3m49s 384ms 12 675 4m19s 384ms 13 1,015 6m33s 387ms 14 570 3m43s 392ms 15 775 5m1s 389ms 16 199 1m11s 356ms 17 173 1m 348ms -
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 19:20:22 Duration: 2s895ms
-
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 16:30:43 Duration: 2s364ms
-
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 15:09:16 Duration: 2s285ms
4 45m 3,031 725ms 3s616ms 890ms select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where ((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."sale_ok" is not null and "product_product__product_tmpl_id"."sale_ok" != false)) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Nov 05 07 211 2m46s 788ms 08 611 8m45s 859ms 09 491 8m1s 981ms 10 256 3m58s 929ms 11 356 5m31s 931ms 12 328 4m41s 859ms 13 310 4m36s 892ms 14 214 3m4s 864ms 15 118 1m47s 907ms 16 136 1m46s 782ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%489X%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489X%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489X%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:30:45 Duration: 3s616ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%wh3%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%wh3%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%wh3%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:22:50 Duration: 3s383ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%489%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:30:43 Duration: 3s262ms
5 44m58s 14,351 167ms 1s2ms 188ms update product_warehouse_inventory set loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) - coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Nov 05 03 1,118 3m19s 178ms 04 1,524 4m34s 179ms 07 347 1m3s 183ms 08 944 3m 191ms 09 1,442 4m44s 197ms 10 1,141 3m44s 196ms 11 1,143 3m34s 188ms 12 973 3m4s 189ms 13 1,535 4m49s 188ms 14 1,471 4m38s 189ms 15 1,792 5m37s 188ms 16 497 1m31s 183ms 17 424 1m15s 179ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(13.0, 0) + COALESCE(5.0, 0) - COALESCE(4.0, 0) WHERE product_id = 190709 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-11-05 13:33:47 Duration: 1s2ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(117.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 237202 AND warehouse_id = 36 AND company_id = 1;
Date: 2024-11-05 15:59:14 Duration: 892ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(4.0, 0) + COALESCE(4.0, 0) - COALESCE(0.0, 0) WHERE product_id = 187889 AND warehouse_id = 41 AND company_id = 1;
Date: 2024-11-05 17:53:52 Duration: 869ms
6 30m56s 9,853 171ms 1s21ms 188ms update product_warehouse_inventory set qty_shipped_not_invoiced = case when ?.? is not null then greatest ((?.? - ?.?) + (?.? - ?.?), ?) else greatest ((?.? - ?.?), ?) end where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Nov 05 04 1,815 5m25s 179ms 07 231 42s526ms 184ms 08 919 2m55s 190ms 09 2,243 7m11s 192ms 10 1,048 3m22s 192ms 11 708 2m14s 189ms 12 731 2m18s 189ms 13 923 2m54s 189ms 14 613 1m56s 189ms 15 421 1m18s 185ms 16 200 37s106ms 185ms 17 1 178ms 178ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((12.0 - 12.0) + (0.0 - 0.0), 0) ELSE GREATEST ((12.0 - 12.0), 0) END where product_id = 227984 and warehouse_id = 37 and company_id = 1;
Date: 2024-11-05 14:35:38 Duration: 1s21ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((1.0 - 1.0) + (0.0 - 0.0), 0) ELSE GREATEST ((1.0 - 1.0), 0) END where product_id = 268931 and warehouse_id = 43 and company_id = 1;
Date: 2024-11-05 17:16:12 Duration: 900ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 1.0 IS NOT NULL THEN GREATEST ((370.0 - 370.0) + (1.0 - 1.0), 0) ELSE GREATEST ((370.0 - 370.0), 0) END where product_id = 199634 and warehouse_id = 42 and company_id = 1;
Date: 2024-11-05 14:12:26 Duration: 892ms
7 23m13s 2,260 529ms 1s922ms 616ms select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Nov 05 19 18 9s622ms 534ms 02 6 3s210ms 535ms 04 1 545ms 545ms 05 4 2s150ms 537ms 06 6 3s266ms 544ms 07 174 1m38s 568ms 08 271 2m43s 603ms 09 376 4m6s 655ms 10 295 3m12s 651ms 11 212 2m8s 605ms 12 181 1m52s 621ms 13 308 3m13s 628ms 14 205 2m1s 590ms 15 143 1m25s 595ms 16 43 23s649ms 549ms 17 12 6s510ms 542ms 18 5 2s689ms 537ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-904d16a/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 18:50:29 Duration: 1s922ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 14:09:17 Duration: 1s867ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 17:39:51 Duration: 1s663ms
8 16m19s 5,122 171ms 738ms 191ms update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Nov 05 03 1,374 4m8s 180ms 04 5 886ms 177ms 07 93 17s585ms 189ms 08 488 1m39s 203ms 09 796 2m34s 194ms 10 413 1m22s 199ms 11 288 54s986ms 190ms 12 467 1m30s 193ms 13 431 1m23s 192ms 14 443 1m25s 191ms 15 219 43s487ms 198ms 16 104 19s42ms 183ms 17 1 175ms 175ms -
UPDATE product_warehouse_inventory SET qty_available = 34.0 WHERE product_id = 193111 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 15:06:41 Duration: 738ms
-
UPDATE product_warehouse_inventory SET qty_available = 11.0 WHERE product_id = 190212 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 13:08:40 Duration: 731ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 190763 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 13:02:40 Duration: 659ms
9 15m17s 5,761 137ms 1s74ms 159ms select current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages as real_size, (tblpages - est_tblpages_ff) * bs as bloat_size, case when tblpages - est_tblpages_ff > ? then ? * (tblpages - est_tblpages_ff) / tblpages::float else ? end as bloat_ratio from ( select ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / ?) as est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * ?))) + ceil(toasttuples / ?) as est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na from ( select (? + tpl_hdr_size + tpl_data_size + (? * ma) - case when tpl_hdr_size % ma = ? then ma else tpl_hdr_size % ma end - case when ceil(tpl_data_size)::int % ma = ? then ma else ceil(tpl_data_size)::int % ma end) as tpl_size, bs - page_hdr as size_per_block, (heappages + toastpages) as tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na from ( select tbl.oid as tblid, ns.nspname as schemaname, tbl.relname as tblname, tbl.reltuples, tbl.relpages as heappages, coalesce(toast.relpages, ?) as toastpages, coalesce(toast.reltuples, ?) as toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ?) from ?)::smallint, ?) as fillfactor, current_setting(?)::numeric as bs, case when version() ~ ? or version() ~ ? then ? else ? end as ma, ? as page_hdr, case when current_setting(?)::integer < ? then ? else ? end + case when max(coalesce(null_frac, ?)) > ? then (? + count(*)) / ? else ?::int end + ? as tpl_hdr_size, sum((? - coalesce(s.null_frac, ?)) * coalesce(s.avg_width, ?)) as tpl_data_size, bool_or(att.atttypid = ?::regtype) or count(att.attname) <> count(s.attname) as is_na from pg_attribute as att join pg_class as tbl on att.attrelid = tbl.oid join pg_namespace as ns on ns.oid = tbl.relnamespace left join pg_stats as s on s.schemaname = ns.nspname and s.tablename = tbl.relname and s.attname = att.attname left join pg_class as toast on tbl.reltoastrelid = toast.oid where att.attnum > ? and not att.attisdropped and tbl.relkind = ? group by ?, ?, ?, ?, ?, ?, ?, ?, ?, ? order by ?, ?) as s) as s2) as s3 where not is_na and schemaname || ? || tblname in (...);Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Nov 05 19 240 36s468ms 151ms 20 240 36s200ms 150ms 21 240 36s136ms 150ms 22 240 36s490ms 152ms 23 240 36s200ms 150ms 00 240 36s13ms 150ms 01 240 35s897ms 149ms 02 240 35s673ms 148ms 03 240 36s379ms 151ms 04 240 36s496ms 152ms 05 240 35s912ms 149ms 06 240 36s166ms 150ms 07 240 37s934ms 158ms 08 240 42s52ms 175ms 09 241 46s300ms 192ms 10 241 43s499ms 180ms 11 240 40s927ms 170ms 12 240 41s7ms 170ms 13 240 42s119ms 175ms 14 240 40s589ms 169ms 15 240 39s687ms 165ms 16 240 37s455ms 156ms 17 239 36s38ms 150ms 18 240 35s626ms 148ms -
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_indexes', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_namespace', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_settings', 'pg_catalog.pg_trigger', 'pg_catalog.pg_database', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_subscription', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_tables', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_depend', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_attribute', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_extension', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_views', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_type', 'pg_catalog.pg_operator', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_publication', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_proc', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_index', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stats', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_sequences', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_amproc', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_roles', 'pg_catalog.pg_language', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_matviews', 'pg_catalog.pg_constraint', 'pg_catalog.pg_conversion', 'pg_catalog.pg_collation', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_description', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_enum', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_am', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_locks', 'pg_catalog.pg_class', 'pg_catalog.pg_inherits', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_policy', 'pg_catalog.pg_range', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_cast', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_progress_vacuum', 'information_schema.attributes', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.column_options', 'information_schema.domain_udt_usage', 'information_schema.routine_privileges', 'information_schema.foreign_tables', 'information_schema.character_sets', 'information_schema.schemata', 'information_schema.view_table_usage', 'information_schema.foreign_server_options', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.column_udt_usage', 'information_schema.key_column_usage', 'information_schema.table_constraints', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_routine_usage', 'information_schema.tables', 'information_schema.triggered_update_columns', 'information_schema.check_constraints', 'information_schema.sql_features', 'information_schema.foreign_data_wrapper_options', 'information_schema.column_column_usage', 'information_schema.view_routine_usage', 'information_schema.routine_table_usage', 'information_schema.column_domain_usage', 'information_schema.columns', 'information_schema.parameters', 'information_schema.sequences', 'information_schema.sql_implementation_info', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.collations', 'information_schema.referential_constraints', 'information_schema.routine_sequence_usage', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.user_defined_types', 'information_schema.role_routine_grants', 'information_schema.data_type_privileges', 'information_schema.constraint_table_usage', 'information_schema.administrable_role_authorizations', 'information_schema.domain_constraints', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrappers', 'information_schema.element_types', 'information_schema.user_mapping_options', 'information_schema.constraint_column_usage', 'information_schema.sql_sizing', 'information_schema.udt_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_table_options', 'information_schema.foreign_servers', 'information_schema.routines', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.role_usage_grants', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-05 14:40:00 Duration: 1s74ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_range', 'pg_catalog.pg_sequence', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_views', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_inherits', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_operator', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_extension', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_transform', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_rules', 'pg_catalog.pg_locks', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_subscription', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_policies', 'pg_catalog.pg_indexes', 'pg_catalog.pg_sequences', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_enum', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_trigger', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_description', 'pg_catalog.pg_depend', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_constraint', 'pg_catalog.pg_database', 'pg_catalog.pg_publication', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_collation', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_settings', 'pg_catalog.pg_opclass', 'pg_catalog.pg_language', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_group', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_amproc', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_conversion', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_attribute', 'pg_catalog.pg_amop', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_proc', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_tablespace', 'information_schema.enabled_roles', 'information_schema.role_table_grants', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.routine_sequence_usage', 'information_schema.sql_sizing', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.role_routine_grants', 'information_schema.foreign_tables', 'information_schema.columns', 'information_schema.key_column_usage', 'information_schema.role_usage_grants', 'information_schema.foreign_server_options', 'information_schema.referential_constraints', 'information_schema.view_table_usage', 'information_schema.character_sets', 'information_schema.column_column_usage', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.view_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.usage_privileges', 'information_schema.collations', 'information_schema.routine_table_usage', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.applicable_roles', 'information_schema.information_schema_catalog_name', 'information_schema.column_domain_usage', 'information_schema.constraint_table_usage', 'information_schema.element_types', 'information_schema.role_column_grants', 'information_schema.table_privileges', 'information_schema.view_routine_usage', 'information_schema.user_mapping_options', 'information_schema.domains', 'information_schema.routine_routine_usage', 'information_schema.foreign_table_options', 'information_schema.domain_constraints', 'information_schema.parameters', 'information_schema.sql_features', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.routine_column_usage', 'information_schema.routine_privileges', 'information_schema.schemata', 'information_schema.column_options', 'information_schema.constraint_column_usage', 'information_schema.sql_implementation_info', 'information_schema.table_constraints', 'information_schema.tables', 'information_schema.triggered_update_columns', 'information_schema.attributes', 'information_schema.routines', 'information_schema.domain_udt_usage', 'information_schema.user_defined_types');
Date: 2024-11-05 15:59:15 Duration: 691ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_subscription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_extension', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_proc', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_range', 'pg_catalog.pg_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_trigger', 'pg_catalog.pg_sequence', 'pg_catalog.pg_depend', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_roles', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_cursors', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_amproc', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_rules', 'pg_catalog.pg_stats', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_policy', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_conversion', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_inherits', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_enum', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_collation', 'pg_catalog.pg_database', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_type', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_matviews', 'pg_catalog.pg_locks', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_settings', 'pg_catalog.pg_language', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_policies', 'pg_catalog.pg_views', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_amop', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_database', 'information_schema.triggers', 'information_schema.element_types', 'information_schema.role_column_grants', 'information_schema.columns', 'information_schema.schemata', 'information_schema.view_table_usage', 'information_schema.view_routine_usage', 'information_schema.collations', 'information_schema.column_column_usage', 'information_schema.sql_features', 'information_schema.attributes', 'information_schema.table_constraints', 'information_schema.role_udt_grants', 'information_schema.foreign_servers', 'information_schema.domains', 'information_schema.user_mappings', 'information_schema.foreign_table_options', 'information_schema.referential_constraints', 'information_schema.routine_sequence_usage', 'information_schema.view_column_usage', 'information_schema.constraint_table_usage', 'information_schema.role_routine_grants', 'information_schema.parameters', 'information_schema.role_usage_grants', 'information_schema.routine_routine_usage', 'information_schema.role_table_grants', 'information_schema.data_type_privileges', 'information_schema.sql_implementation_info', 'information_schema.user_mapping_options', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.foreign_server_options', 'information_schema.foreign_tables', 'information_schema.column_domain_usage', 'information_schema.constraint_column_usage', 'information_schema.udt_privileges', 'information_schema.applicable_roles', 'information_schema.administrable_role_authorizations', 'information_schema.table_privileges', 'information_schema.tables', 'information_schema.character_sets', 'information_schema.routines', 'information_schema.column_udt_usage', 'information_schema.user_defined_types', 'information_schema.column_options', 'information_schema.key_column_usage', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.usage_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.domain_constraints', 'information_schema.sequences', 'information_schema.sql_sizing', 'information_schema.views', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_table_usage', 'information_schema.check_constraints', 'information_schema.routine_column_usage', 'information_schema.domain_udt_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-05 18:30:45 Duration: 682ms
10 14m55s 1,004 730ms 3s608ms 892ms select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where (("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Nov 05 07 31 24s34ms 775ms 08 76 1m6s 875ms 09 281 4m30s 962ms 10 61 56s194ms 921ms 11 246 3m23s 826ms 12 44 40s596ms 922ms 13 115 1m44s 912ms 14 106 1m32s 869ms 15 27 24s124ms 893ms 16 17 13s67ms 768ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%LT24580%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%LT24580%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%LT24580%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 14:42:04 Duration: 3s608ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%LT24580R%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%LT24580R%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%LT24580R%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 14:42:04 Duration: 2s819ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%303%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%303%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%303%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 19:20:23 Duration: 2s500ms
11 14m40s 3,835 190ms 727ms 229ms select coalesce(sum(pwi.max_product_uom_qty), ?) as tmq from forecasted_data fd inner join item_supply_plan as isp on isp.id = fd.item_supply_plan_id inner join product_warehouse_inventory pwi on fd.product_id = pwi.product_id and isp.branch_id = pwi.replenish_branch_id where isp.id = ? and fd.product_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Nov 05 07 26 5s749ms 221ms 08 75 18s229ms 243ms 09 200 52s109ms 260ms 10 722 2m46s 231ms 11 395 1m29s 226ms 12 714 2m46s 232ms 13 484 1m54s 236ms 14 372 1m25s 231ms 15 216 50s326ms 232ms 16 631 2m10s 207ms -
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 54906 and fd.product_id = 187766;
Date: 2024-11-05 14:25:39 Duration: 727ms
-
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 55098 and fd.product_id = 266013;
Date: 2024-11-05 20:03:11 Duration: 600ms
-
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 54927 and fd.product_id = 247069;
Date: 2024-11-05 17:04:45 Duration: 593ms
12 14m16s 814 918ms 3s161ms 1s52ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."is_core" is null or "product_template"."is_core" = false) and (("product_template"."type" in (...)) and (((((unaccent ("product_template"."default_code"::text) ilike unaccent (?)) or ("product_template"."id" in ( select "product_product"."product_tmpl_id" from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") where (("product_product"."active" = true) and (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null)))) or unaccent (coalesce("product_template__name"."value", "product_template"."name")) ilike unaccent (?)) or false) or (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent (?)))))) and (("product_template"."company_id" in (...)) or "product_template"."company_id" is null) order by coalesce("product_template__name"."value", "product_template"."name") limit ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Nov 05 06 2 1s846ms 923ms 07 40 39s446ms 986ms 08 118 2m4s 1s55ms 09 125 2m19s 1s112ms 10 83 1m29s 1s77ms 11 78 1m19s 1s15ms 12 61 1m2s 1s27ms 13 116 2m 1s34ms 14 99 1m45s 1s61ms 15 76 1m19s 1s46ms 16 16 15s573ms 973ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%340-4009%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%340-4009%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%340-4009%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%340-4009%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-11-05 13:08:41 Duration: 3s161ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%21032--5t-2200p%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%21032--5t-2200p%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%21032--5t-2200p%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%21032--5t-2200p%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-11-05 14:42:05 Duration: 2s687ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%fuel cap seal%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%fuel cap seal%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%fuel cap seal%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%fuel cap seal%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-11-05 19:00:03 Duration: 2s676ms
13 14m5s 5,636 120ms 1s644ms 150ms select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = ? and sol.warehouse_id = ? and sol.company_id = ? and (sol.so_line_id is null and sol.move_options in (...));Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Nov 05 04 648 1m24s 129ms 07 133 18s900ms 142ms 08 595 1m30s 151ms 09 1,424 3m41s 155ms 10 662 1m43s 155ms 11 434 1m6s 154ms 12 435 1m7s 155ms 13 589 1m30s 153ms 14 368 54s563ms 148ms 15 229 32s571ms 142ms 16 118 16s215ms 137ms 17 1 141ms 141ms -
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 176722 and sol.warehouse_id = 42 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 16:19:42 Duration: 1s644ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 268932 and sol.warehouse_id = 43 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 17:16:13 Duration: 1s357ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 172035 and sol.warehouse_id = 42 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 14:40:00 Duration: 1s20ms
14 13m22s 5,704 120ms 1s129ms 140ms select id from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Nov 05 03 22 3s99ms 140ms 04 166 21s117ms 127ms 07 120 16s790ms 139ms 08 565 1m18s 139ms 09 1,124 2m41s 143ms 10 756 1m45s 139ms 11 469 1m6s 141ms 12 603 1m25s 141ms 13 757 1m47s 141ms 14 468 1m5s 139ms 15 538 1m16s 142ms 16 80 10s592ms 132ms 17 36 4s574ms 127ms -
select id from product_warehouse_inventory where product_id = 246786 and warehouse_id = 44 and company_id = 1;
Date: 2024-11-05 16:22:48 Duration: 1s129ms
-
select id from product_warehouse_inventory where product_id = 185577 and warehouse_id = 46 and company_id = 1;
Date: 2024-11-05 14:18:50 Duration: 916ms
-
select id from product_warehouse_inventory where product_id = 238907 and warehouse_id = 46 and company_id = 1;
Date: 2024-11-05 14:18:50 Duration: 728ms
15 12m18s 4,150 120ms 1s450ms 177ms select "sale_order_line".id from "sale_order_line" where (((("sale_order_line"."product_id" = ?) and ("sale_order_line"."order_id" in ( select "sale_order".id from "sale_order" where ("sale_order"."branch_id" in ( select "res_branch".id from "res_branch" where ("res_branch"."id" = ?)))))) and ("sale_order_line"."open_qty_fil" > ?.?)) and (("sale_order_line"."state" not in (...)) or "sale_order_line"."state" is null)) order by "sale_order_line"."id" asc;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Nov 05 07 350 56s631ms 161ms 08 359 1m9s 193ms 09 264 50s697ms 192ms 10 471 1m26s 184ms 11 172 28s228ms 164ms 12 529 1m29s 169ms 13 451 1m21s 181ms 14 994 2m58s 179ms 15 425 1m14s 174ms 16 135 21s760ms 161ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 177580) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:33:47 Duration: 1s450ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 266060) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:33:48 Duration: 1s38ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 190945) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:08:40 Duration: 918ms
16 11m41s 115 2s176ms 1m8s 6s96ms delete from account_move_line where id in (...);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Nov 05 07 1 11s718ms 11s718ms 08 7 37s223ms 5s317ms 09 1 7s834ms 7s834ms 10 27 1m12s 2s686ms 11 7 25s806ms 3s686ms 12 7 21s424ms 3s60ms 14 4 13s889ms 3s472ms 15 2 47s548ms 23s774ms 16 1 4s545ms 4s545ms 18 58 7m38s 7s907ms -
DELETE FROM account_move_line WHERE id IN (6134115, 6134116, 6134117, 6134118, 6134119, 6134120, 6134121, 6134122, 6134123, 6134124, 6134125, 6134126, 6134127, 6134128, 6134129, 6134130, 6134131, 6134132, 6134133, 6134134, 6134135, 6134136, 6134137, 6134138, 6134139, 6134140, 6134141, 6134142, 6134143, 6138768, 6138769);
Date: 2024-11-05 23:04:53 Duration: 1m8s
-
DELETE FROM account_move_line WHERE id IN (6135859, 6135860, 6010433, 6010434, 6010435, 6010436, 6010437, 6010438, 6010439, 6010440, 6010441, 6010442, 6010443, 6010444, 6010445, 6010446, 6010447, 6010448, 6010449, 6010450, 6010451, 6010452, 6010453, 6010454, 6010455, 6010456, 6010457, 6010458, 6010459, 6010460);
Date: 2024-11-05 23:38:56 Duration: 1m5s
-
DELETE FROM account_move_line WHERE id IN (6143597, 6143598, 6143599, 6143600, 6112814, 6112815, 6112816, 6112817, 6112818, 6112819, 6112820, 6112821, 6112822, 6112823, 6112824, 6112825, 6112826, 6112827, 6112828, 6112829, 6112830, 6112831);
Date: 2024-11-05 23:33:01 Duration: 48s509ms
17 11m27s 4,523 120ms 1s26ms 152ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ("product_warehouse_inventory"."product_id" in (...)) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Nov 05 19 22 2s948ms 134ms 02 1 130ms 130ms 06 5 639ms 127ms 07 189 25s922ms 137ms 08 562 1m22s 145ms 09 730 1m51s 153ms 10 715 1m54s 160ms 11 513 1m19s 154ms 12 522 1m19s 152ms 13 471 1m12s 153ms 14 382 56s842ms 148ms 15 241 38s378ms 159ms 16 170 23s523ms 138ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (186487, 186192, 186488, 255066, 257625, 257636, 257639, 186821, 185943, 186440, 186030, 257638, 186673, 186690, 257634, 184673, 186039, 185126, 185681, 255021, 186674, 185475, 257633, 186819, 257637, 186822, 185349, 185944, 185871, 185576, 186111, 184683, 186438, 185577)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 17:50:04 Duration: 1s26ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (267253)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 16:30:42 Duration: 883ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (267253)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 16:30:43 Duration: 610ms
18 11m12s 3,590 169ms 416ms 187ms update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Nov 05 03 1,041 3m6s 178ms 04 79 14s74ms 178ms 07 64 11s653ms 182ms 08 214 40s634ms 189ms 09 469 1m30s 192ms 10 239 46s551ms 194ms 11 230 42s493ms 184ms 12 314 1m1s 196ms 13 312 59s900ms 191ms 14 311 58s281ms 187ms 15 217 42s685ms 196ms 16 54 9s865ms 182ms 17 46 8s25ms 174ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 197753 AND warehouse_id = 38;
Date: 2024-11-05 18:06:59 Duration: 416ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 216648 AND warehouse_id = 42;
Date: 2024-11-05 15:55:33 Duration: 405ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 187570 AND warehouse_id = 41;
Date: 2024-11-05 17:53:17 Duration: 365ms
19 9m59s 3,157 171ms 469ms 189ms update product_warehouse_inventory set qty_reserve = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Nov 05 03 576 1m43s 179ms 04 5 889ms 177ms 07 98 18s242ms 186ms 08 314 59s817ms 190ms 09 409 1m20s 196ms 10 333 1m4s 194ms 11 223 42s605ms 191ms 12 322 1m1s 191ms 13 301 57s909ms 192ms 14 221 42s388ms 191ms 15 211 41s701ms 197ms 16 87 15s974ms 183ms 17 57 10s61ms 176ms -
UPDATE product_warehouse_inventory SET qty_reserve = 8.0 WHERE product_id = 198569 AND warehouse_id = 43;
Date: 2024-11-05 15:02:23 Duration: 469ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 271246 AND warehouse_id = 46;
Date: 2024-11-05 19:03:58 Duration: 428ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 271544 AND warehouse_id = 37;
Date: 2024-11-05 14:10:13 Duration: 361ms
20 8m42s 2,771 168ms 1s147ms 188ms update product_warehouse_inventory set qty_on_order = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Nov 05 03 567 1m42s 179ms 04 5 886ms 177ms 07 12 2s252ms 187ms 08 102 19s28ms 186ms 09 254 50s205ms 197ms 10 231 45s153ms 195ms 11 156 28s979ms 185ms 12 340 1m5s 193ms 13 325 1m3s 196ms 14 274 52s143ms 190ms 15 284 52s828ms 186ms 16 64 11s836ms 184ms 17 157 27s736ms 176ms -
UPDATE product_warehouse_inventory SET qty_on_order = 40.0 WHERE product_id = 206034 AND warehouse_id = 46;
Date: 2024-11-05 18:38:41 Duration: 1s147ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 12.0 WHERE product_id = 206354 AND warehouse_id = 46;
Date: 2024-11-05 18:38:42 Duration: 1s26ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 75.0 WHERE product_id = 247069 AND warehouse_id = 46;
Date: 2024-11-05 18:38:39 Duration: 507ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 134,493 7h10m38s 120ms 2s964ms 192ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Nov 05 19 3,710 9m5s 147ms 20 3,734 9m6s 146ms 21 3,553 9m2s 152ms 22 3,488 8m51s 152ms 23 3,366 8m47s 156ms 00 3,689 8m44s 142ms 01 3,647 8m54s 146ms 02 3,565 8m39s 145ms 03 3,761 9m48s 156ms 04 3,901 10m1s 154ms 05 4,040 9m35s 142ms 06 4,040 10m2s 149ms 07 6,194 17m31s 169ms 08 9,568 33m57s 212ms 09 9,646 38m10s 237ms 10 9,009 34m22s 228ms 11 8,747 36m33s 250ms 12 8,940 31m51s 213ms 13 8,893 35m54s 242ms 14 8,877 31m52s 215ms 15 7,891 28m43s 218ms 16 5,451 14m29s 159ms 17 3,548 8m39s 146ms 18 3,235 7m53s 146ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19585]', '["pointspring_master","mail.channel",572]', '["pointspring_master","mail.channel",645]', '["pointspring_master","res.partner",19585]', '["pointspring_master","ir.needaction",19585]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s964ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19545]', '["pointspring_master","mail.channel",33]', '["pointspring_master","mail.channel",472]', '["pointspring_master","mail.channel",520]', '["pointspring_master","mail.channel",571]', '["pointspring_master","mail.channel",611]', '["pointspring_master","res.partner",19545]', '["pointspring_master","ir.needaction",19545]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s920ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_984"', '["pointspring_master","calendar.alarm",19522]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",329]', '["pointspring_master","mail.channel",330]', '["pointspring_master","mail.channel",422]', '["pointspring_master","mail.channel",639]', '["pointspring_master","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s916ms
2 14,351 44m58s 167ms 1s2ms 188ms update product_warehouse_inventory set loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) - coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Nov 05 03 1,118 3m19s 178ms 04 1,524 4m34s 179ms 07 347 1m3s 183ms 08 944 3m 191ms 09 1,442 4m44s 197ms 10 1,141 3m44s 196ms 11 1,143 3m34s 188ms 12 973 3m4s 189ms 13 1,535 4m49s 188ms 14 1,471 4m38s 189ms 15 1,792 5m37s 188ms 16 497 1m31s 183ms 17 424 1m15s 179ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(13.0, 0) + COALESCE(5.0, 0) - COALESCE(4.0, 0) WHERE product_id = 190709 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-11-05 13:33:47 Duration: 1s2ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(117.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 237202 AND warehouse_id = 36 AND company_id = 1;
Date: 2024-11-05 15:59:14 Duration: 892ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(4.0, 0) + COALESCE(4.0, 0) - COALESCE(0.0, 0) WHERE product_id = 187889 AND warehouse_id = 41 AND company_id = 1;
Date: 2024-11-05 17:53:52 Duration: 869ms
3 9,853 30m56s 171ms 1s21ms 188ms update product_warehouse_inventory set qty_shipped_not_invoiced = case when ?.? is not null then greatest ((?.? - ?.?) + (?.? - ?.?), ?) else greatest ((?.? - ?.?), ?) end where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Nov 05 04 1,815 5m25s 179ms 07 231 42s526ms 184ms 08 919 2m55s 190ms 09 2,243 7m11s 192ms 10 1,048 3m22s 192ms 11 708 2m14s 189ms 12 731 2m18s 189ms 13 923 2m54s 189ms 14 613 1m56s 189ms 15 421 1m18s 185ms 16 200 37s106ms 185ms 17 1 178ms 178ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((12.0 - 12.0) + (0.0 - 0.0), 0) ELSE GREATEST ((12.0 - 12.0), 0) END where product_id = 227984 and warehouse_id = 37 and company_id = 1;
Date: 2024-11-05 14:35:38 Duration: 1s21ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((1.0 - 1.0) + (0.0 - 0.0), 0) ELSE GREATEST ((1.0 - 1.0), 0) END where product_id = 268931 and warehouse_id = 43 and company_id = 1;
Date: 2024-11-05 17:16:12 Duration: 900ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 1.0 IS NOT NULL THEN GREATEST ((370.0 - 370.0) + (1.0 - 1.0), 0) ELSE GREATEST ((370.0 - 370.0), 0) END where product_id = 199634 and warehouse_id = 42 and company_id = 1;
Date: 2024-11-05 14:12:26 Duration: 892ms
4 8,608 54m23s 320ms 2s895ms 379ms select pwi.id as pwi_id, pwi.loc_check_qty as src_loc_check_qty, pwi.rep_loc_check_qty as ex_rep_loc_check_qty, sw.id as replenish_wh_id, coalesce(rep_pwi.loc_check_qty, ?) as rep_loc_check_qty from product_warehouse_inventory pwi join stock_warehouse sw on sw.branch_id = pwi.replenish_branch_id left join product_warehouse_inventory rep_pwi on rep_pwi.warehouse_id = sw.id and rep_pwi.product_id = pwi.product_id where pwi.replenish_branch_id is not null and pwi.rep_loc_check_qty != (pwi.loc_check_qty + coalesce(rep_pwi.loc_check_qty, ?));Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Nov 05 03 307 1m44s 339ms 04 1,498 8m28s 339ms 07 210 1m15s 361ms 08 669 4m16s 383ms 09 1,143 7m46s 408ms 10 776 5m11s 401ms 11 598 3m49s 384ms 12 675 4m19s 384ms 13 1,015 6m33s 387ms 14 570 3m43s 392ms 15 775 5m1s 389ms 16 199 1m11s 356ms 17 173 1m 348ms -
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 19:20:22 Duration: 2s895ms
-
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 16:30:43 Duration: 2s364ms
-
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 15:09:16 Duration: 2s285ms
5 8,607 57m28s 369ms 2s805ms 400ms select id, product_id, warehouse_id, loc_check_qty, coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Nov 05 03 307 1m56s 379ms 04 1,498 9m30s 380ms 07 210 1m22s 390ms 08 669 4m32s 406ms 09 1,142 7m57s 417ms 10 776 5m19s 412ms 11 598 4m 402ms 12 675 4m33s 404ms 13 1,015 6m50s 404ms 14 570 3m50s 404ms 15 775 5m12s 403ms 16 199 1m17s 389ms 17 173 1m6s 384ms -
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 14:42:04 Duration: 2s805ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 18:30:45 Duration: 1s340ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 14:18:52 Duration: 1s227ms
6 5,761 15m17s 137ms 1s74ms 159ms select current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages as real_size, (tblpages - est_tblpages_ff) * bs as bloat_size, case when tblpages - est_tblpages_ff > ? then ? * (tblpages - est_tblpages_ff) / tblpages::float else ? end as bloat_ratio from ( select ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / ?) as est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * ?))) + ceil(toasttuples / ?) as est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na from ( select (? + tpl_hdr_size + tpl_data_size + (? * ma) - case when tpl_hdr_size % ma = ? then ma else tpl_hdr_size % ma end - case when ceil(tpl_data_size)::int % ma = ? then ma else ceil(tpl_data_size)::int % ma end) as tpl_size, bs - page_hdr as size_per_block, (heappages + toastpages) as tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na from ( select tbl.oid as tblid, ns.nspname as schemaname, tbl.relname as tblname, tbl.reltuples, tbl.relpages as heappages, coalesce(toast.relpages, ?) as toastpages, coalesce(toast.reltuples, ?) as toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ?) from ?)::smallint, ?) as fillfactor, current_setting(?)::numeric as bs, case when version() ~ ? or version() ~ ? then ? else ? end as ma, ? as page_hdr, case when current_setting(?)::integer < ? then ? else ? end + case when max(coalesce(null_frac, ?)) > ? then (? + count(*)) / ? else ?::int end + ? as tpl_hdr_size, sum((? - coalesce(s.null_frac, ?)) * coalesce(s.avg_width, ?)) as tpl_data_size, bool_or(att.atttypid = ?::regtype) or count(att.attname) <> count(s.attname) as is_na from pg_attribute as att join pg_class as tbl on att.attrelid = tbl.oid join pg_namespace as ns on ns.oid = tbl.relnamespace left join pg_stats as s on s.schemaname = ns.nspname and s.tablename = tbl.relname and s.attname = att.attname left join pg_class as toast on tbl.reltoastrelid = toast.oid where att.attnum > ? and not att.attisdropped and tbl.relkind = ? group by ?, ?, ?, ?, ?, ?, ?, ?, ?, ? order by ?, ?) as s) as s2) as s3 where not is_na and schemaname || ? || tblname in (...);Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Nov 05 19 240 36s468ms 151ms 20 240 36s200ms 150ms 21 240 36s136ms 150ms 22 240 36s490ms 152ms 23 240 36s200ms 150ms 00 240 36s13ms 150ms 01 240 35s897ms 149ms 02 240 35s673ms 148ms 03 240 36s379ms 151ms 04 240 36s496ms 152ms 05 240 35s912ms 149ms 06 240 36s166ms 150ms 07 240 37s934ms 158ms 08 240 42s52ms 175ms 09 241 46s300ms 192ms 10 241 43s499ms 180ms 11 240 40s927ms 170ms 12 240 41s7ms 170ms 13 240 42s119ms 175ms 14 240 40s589ms 169ms 15 240 39s687ms 165ms 16 240 37s455ms 156ms 17 239 36s38ms 150ms 18 240 35s626ms 148ms -
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_indexes', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_namespace', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_settings', 'pg_catalog.pg_trigger', 'pg_catalog.pg_database', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_subscription', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_tables', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_depend', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_attribute', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_extension', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_views', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_type', 'pg_catalog.pg_operator', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_publication', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_proc', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_index', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stats', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_sequences', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_amproc', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_roles', 'pg_catalog.pg_language', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_matviews', 'pg_catalog.pg_constraint', 'pg_catalog.pg_conversion', 'pg_catalog.pg_collation', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_description', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_enum', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_am', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_locks', 'pg_catalog.pg_class', 'pg_catalog.pg_inherits', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_policy', 'pg_catalog.pg_range', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_cast', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_progress_vacuum', 'information_schema.attributes', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.column_options', 'information_schema.domain_udt_usage', 'information_schema.routine_privileges', 'information_schema.foreign_tables', 'information_schema.character_sets', 'information_schema.schemata', 'information_schema.view_table_usage', 'information_schema.foreign_server_options', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.column_udt_usage', 'information_schema.key_column_usage', 'information_schema.table_constraints', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_routine_usage', 'information_schema.tables', 'information_schema.triggered_update_columns', 'information_schema.check_constraints', 'information_schema.sql_features', 'information_schema.foreign_data_wrapper_options', 'information_schema.column_column_usage', 'information_schema.view_routine_usage', 'information_schema.routine_table_usage', 'information_schema.column_domain_usage', 'information_schema.columns', 'information_schema.parameters', 'information_schema.sequences', 'information_schema.sql_implementation_info', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.collations', 'information_schema.referential_constraints', 'information_schema.routine_sequence_usage', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.user_defined_types', 'information_schema.role_routine_grants', 'information_schema.data_type_privileges', 'information_schema.constraint_table_usage', 'information_schema.administrable_role_authorizations', 'information_schema.domain_constraints', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrappers', 'information_schema.element_types', 'information_schema.user_mapping_options', 'information_schema.constraint_column_usage', 'information_schema.sql_sizing', 'information_schema.udt_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_table_options', 'information_schema.foreign_servers', 'information_schema.routines', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.role_usage_grants', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-05 14:40:00 Duration: 1s74ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_range', 'pg_catalog.pg_sequence', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_views', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_inherits', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_operator', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_extension', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_transform', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_rules', 'pg_catalog.pg_locks', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_subscription', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_policies', 'pg_catalog.pg_indexes', 'pg_catalog.pg_sequences', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_enum', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_trigger', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_description', 'pg_catalog.pg_depend', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_constraint', 'pg_catalog.pg_database', 'pg_catalog.pg_publication', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_collation', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_settings', 'pg_catalog.pg_opclass', 'pg_catalog.pg_language', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_group', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_amproc', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_conversion', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_attribute', 'pg_catalog.pg_amop', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_proc', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_tablespace', 'information_schema.enabled_roles', 'information_schema.role_table_grants', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.routine_sequence_usage', 'information_schema.sql_sizing', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.role_routine_grants', 'information_schema.foreign_tables', 'information_schema.columns', 'information_schema.key_column_usage', 'information_schema.role_usage_grants', 'information_schema.foreign_server_options', 'information_schema.referential_constraints', 'information_schema.view_table_usage', 'information_schema.character_sets', 'information_schema.column_column_usage', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.view_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.usage_privileges', 'information_schema.collations', 'information_schema.routine_table_usage', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.applicable_roles', 'information_schema.information_schema_catalog_name', 'information_schema.column_domain_usage', 'information_schema.constraint_table_usage', 'information_schema.element_types', 'information_schema.role_column_grants', 'information_schema.table_privileges', 'information_schema.view_routine_usage', 'information_schema.user_mapping_options', 'information_schema.domains', 'information_schema.routine_routine_usage', 'information_schema.foreign_table_options', 'information_schema.domain_constraints', 'information_schema.parameters', 'information_schema.sql_features', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.routine_column_usage', 'information_schema.routine_privileges', 'information_schema.schemata', 'information_schema.column_options', 'information_schema.constraint_column_usage', 'information_schema.sql_implementation_info', 'information_schema.table_constraints', 'information_schema.tables', 'information_schema.triggered_update_columns', 'information_schema.attributes', 'information_schema.routines', 'information_schema.domain_udt_usage', 'information_schema.user_defined_types');
Date: 2024-11-05 15:59:15 Duration: 691ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_subscription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_extension', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_proc', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_range', 'pg_catalog.pg_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_trigger', 'pg_catalog.pg_sequence', 'pg_catalog.pg_depend', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_roles', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_cursors', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_amproc', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_rules', 'pg_catalog.pg_stats', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_policy', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_conversion', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_inherits', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_enum', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_collation', 'pg_catalog.pg_database', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_type', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_matviews', 'pg_catalog.pg_locks', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_settings', 'pg_catalog.pg_language', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_policies', 'pg_catalog.pg_views', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_amop', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_database', 'information_schema.triggers', 'information_schema.element_types', 'information_schema.role_column_grants', 'information_schema.columns', 'information_schema.schemata', 'information_schema.view_table_usage', 'information_schema.view_routine_usage', 'information_schema.collations', 'information_schema.column_column_usage', 'information_schema.sql_features', 'information_schema.attributes', 'information_schema.table_constraints', 'information_schema.role_udt_grants', 'information_schema.foreign_servers', 'information_schema.domains', 'information_schema.user_mappings', 'information_schema.foreign_table_options', 'information_schema.referential_constraints', 'information_schema.routine_sequence_usage', 'information_schema.view_column_usage', 'information_schema.constraint_table_usage', 'information_schema.role_routine_grants', 'information_schema.parameters', 'information_schema.role_usage_grants', 'information_schema.routine_routine_usage', 'information_schema.role_table_grants', 'information_schema.data_type_privileges', 'information_schema.sql_implementation_info', 'information_schema.user_mapping_options', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.foreign_server_options', 'information_schema.foreign_tables', 'information_schema.column_domain_usage', 'information_schema.constraint_column_usage', 'information_schema.udt_privileges', 'information_schema.applicable_roles', 'information_schema.administrable_role_authorizations', 'information_schema.table_privileges', 'information_schema.tables', 'information_schema.character_sets', 'information_schema.routines', 'information_schema.column_udt_usage', 'information_schema.user_defined_types', 'information_schema.column_options', 'information_schema.key_column_usage', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.usage_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.domain_constraints', 'information_schema.sequences', 'information_schema.sql_sizing', 'information_schema.views', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_table_usage', 'information_schema.check_constraints', 'information_schema.routine_column_usage', 'information_schema.domain_udt_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-05 18:30:45 Duration: 682ms
7 5,704 13m22s 120ms 1s129ms 140ms select id from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Nov 05 03 22 3s99ms 140ms 04 166 21s117ms 127ms 07 120 16s790ms 139ms 08 565 1m18s 139ms 09 1,124 2m41s 143ms 10 756 1m45s 139ms 11 469 1m6s 141ms 12 603 1m25s 141ms 13 757 1m47s 141ms 14 468 1m5s 139ms 15 538 1m16s 142ms 16 80 10s592ms 132ms 17 36 4s574ms 127ms -
select id from product_warehouse_inventory where product_id = 246786 and warehouse_id = 44 and company_id = 1;
Date: 2024-11-05 16:22:48 Duration: 1s129ms
-
select id from product_warehouse_inventory where product_id = 185577 and warehouse_id = 46 and company_id = 1;
Date: 2024-11-05 14:18:50 Duration: 916ms
-
select id from product_warehouse_inventory where product_id = 238907 and warehouse_id = 46 and company_id = 1;
Date: 2024-11-05 14:18:50 Duration: 728ms
8 5,636 14m5s 120ms 1s644ms 150ms select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = ? and sol.warehouse_id = ? and sol.company_id = ? and (sol.so_line_id is null and sol.move_options in (...));Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Nov 05 04 648 1m24s 129ms 07 133 18s900ms 142ms 08 595 1m30s 151ms 09 1,424 3m41s 155ms 10 662 1m43s 155ms 11 434 1m6s 154ms 12 435 1m7s 155ms 13 589 1m30s 153ms 14 368 54s563ms 148ms 15 229 32s571ms 142ms 16 118 16s215ms 137ms 17 1 141ms 141ms -
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 176722 and sol.warehouse_id = 42 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 16:19:42 Duration: 1s644ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 268932 and sol.warehouse_id = 43 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 17:16:13 Duration: 1s357ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 172035 and sol.warehouse_id = 42 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 14:40:00 Duration: 1s20ms
9 5,122 16m19s 171ms 738ms 191ms update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Nov 05 03 1,374 4m8s 180ms 04 5 886ms 177ms 07 93 17s585ms 189ms 08 488 1m39s 203ms 09 796 2m34s 194ms 10 413 1m22s 199ms 11 288 54s986ms 190ms 12 467 1m30s 193ms 13 431 1m23s 192ms 14 443 1m25s 191ms 15 219 43s487ms 198ms 16 104 19s42ms 183ms 17 1 175ms 175ms -
UPDATE product_warehouse_inventory SET qty_available = 34.0 WHERE product_id = 193111 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 15:06:41 Duration: 738ms
-
UPDATE product_warehouse_inventory SET qty_available = 11.0 WHERE product_id = 190212 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 13:08:40 Duration: 731ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 190763 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 13:02:40 Duration: 659ms
10 4,523 11m27s 120ms 1s26ms 152ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ("product_warehouse_inventory"."product_id" in (...)) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Nov 05 19 22 2s948ms 134ms 02 1 130ms 130ms 06 5 639ms 127ms 07 189 25s922ms 137ms 08 562 1m22s 145ms 09 730 1m51s 153ms 10 715 1m54s 160ms 11 513 1m19s 154ms 12 522 1m19s 152ms 13 471 1m12s 153ms 14 382 56s842ms 148ms 15 241 38s378ms 159ms 16 170 23s523ms 138ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (186487, 186192, 186488, 255066, 257625, 257636, 257639, 186821, 185943, 186440, 186030, 257638, 186673, 186690, 257634, 184673, 186039, 185126, 185681, 255021, 186674, 185475, 257633, 186819, 257637, 186822, 185349, 185944, 185871, 185576, 186111, 184683, 186438, 185577)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 17:50:04 Duration: 1s26ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (267253)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 16:30:42 Duration: 883ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (267253)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 16:30:43 Duration: 610ms
11 4,150 12m18s 120ms 1s450ms 177ms select "sale_order_line".id from "sale_order_line" where (((("sale_order_line"."product_id" = ?) and ("sale_order_line"."order_id" in ( select "sale_order".id from "sale_order" where ("sale_order"."branch_id" in ( select "res_branch".id from "res_branch" where ("res_branch"."id" = ?)))))) and ("sale_order_line"."open_qty_fil" > ?.?)) and (("sale_order_line"."state" not in (...)) or "sale_order_line"."state" is null)) order by "sale_order_line"."id" asc;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Nov 05 07 350 56s631ms 161ms 08 359 1m9s 193ms 09 264 50s697ms 192ms 10 471 1m26s 184ms 11 172 28s228ms 164ms 12 529 1m29s 169ms 13 451 1m21s 181ms 14 994 2m58s 179ms 15 425 1m14s 174ms 16 135 21s760ms 161ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 177580) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:33:47 Duration: 1s450ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 266060) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:33:48 Duration: 1s38ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 190945) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:08:40 Duration: 918ms
12 3,835 14m40s 190ms 727ms 229ms select coalesce(sum(pwi.max_product_uom_qty), ?) as tmq from forecasted_data fd inner join item_supply_plan as isp on isp.id = fd.item_supply_plan_id inner join product_warehouse_inventory pwi on fd.product_id = pwi.product_id and isp.branch_id = pwi.replenish_branch_id where isp.id = ? and fd.product_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Nov 05 07 26 5s749ms 221ms 08 75 18s229ms 243ms 09 200 52s109ms 260ms 10 722 2m46s 231ms 11 395 1m29s 226ms 12 714 2m46s 232ms 13 484 1m54s 236ms 14 372 1m25s 231ms 15 216 50s326ms 232ms 16 631 2m10s 207ms -
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 54906 and fd.product_id = 187766;
Date: 2024-11-05 14:25:39 Duration: 727ms
-
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 55098 and fd.product_id = 266013;
Date: 2024-11-05 20:03:11 Duration: 600ms
-
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 54927 and fd.product_id = 247069;
Date: 2024-11-05 17:04:45 Duration: 593ms
13 3,590 11m12s 169ms 416ms 187ms update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Nov 05 03 1,041 3m6s 178ms 04 79 14s74ms 178ms 07 64 11s653ms 182ms 08 214 40s634ms 189ms 09 469 1m30s 192ms 10 239 46s551ms 194ms 11 230 42s493ms 184ms 12 314 1m1s 196ms 13 312 59s900ms 191ms 14 311 58s281ms 187ms 15 217 42s685ms 196ms 16 54 9s865ms 182ms 17 46 8s25ms 174ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 197753 AND warehouse_id = 38;
Date: 2024-11-05 18:06:59 Duration: 416ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 216648 AND warehouse_id = 42;
Date: 2024-11-05 15:55:33 Duration: 405ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 187570 AND warehouse_id = 41;
Date: 2024-11-05 17:53:17 Duration: 365ms
14 3,272 7m58s 120ms 570ms 146ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where (("product_warehouse_inventory"."warehouse_id" = ?) and ("product_warehouse_inventory"."product_id" = ?)) order by "product_warehouse_inventory"."warehouse_name" limit ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Nov 05 07 207 28s370ms 137ms 08 311 46s196ms 148ms 09 254 38s129ms 150ms 10 426 1m6s 156ms 11 130 18s691ms 143ms 12 414 58s893ms 142ms 13 361 55s101ms 152ms 14 793 1m53s 143ms 15 284 39s651ms 139ms 16 92 12s594ms 136ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 35) AND ("product_warehouse_inventory"."product_id" = 185188)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-11-05 15:05:50 Duration: 570ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 35) AND ("product_warehouse_inventory"."product_id" = 186738)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-11-05 15:05:48 Duration: 568ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 35) AND ("product_warehouse_inventory"."product_id" = 185180)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-11-05 15:05:49 Duration: 556ms
15 3,157 9m59s 171ms 469ms 189ms update product_warehouse_inventory set qty_reserve = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Nov 05 03 576 1m43s 179ms 04 5 889ms 177ms 07 98 18s242ms 186ms 08 314 59s817ms 190ms 09 409 1m20s 196ms 10 333 1m4s 194ms 11 223 42s605ms 191ms 12 322 1m1s 191ms 13 301 57s909ms 192ms 14 221 42s388ms 191ms 15 211 41s701ms 197ms 16 87 15s974ms 183ms 17 57 10s61ms 176ms -
UPDATE product_warehouse_inventory SET qty_reserve = 8.0 WHERE product_id = 198569 AND warehouse_id = 43;
Date: 2024-11-05 15:02:23 Duration: 469ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 271246 AND warehouse_id = 46;
Date: 2024-11-05 19:03:58 Duration: 428ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 271544 AND warehouse_id = 37;
Date: 2024-11-05 14:10:13 Duration: 361ms
16 3,031 45m 725ms 3s616ms 890ms select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where ((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."sale_ok" is not null and "product_product__product_tmpl_id"."sale_ok" != false)) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Nov 05 07 211 2m46s 788ms 08 611 8m45s 859ms 09 491 8m1s 981ms 10 256 3m58s 929ms 11 356 5m31s 931ms 12 328 4m41s 859ms 13 310 4m36s 892ms 14 214 3m4s 864ms 15 118 1m47s 907ms 16 136 1m46s 782ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%489X%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489X%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489X%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:30:45 Duration: 3s616ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%wh3%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%wh3%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%wh3%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:22:50 Duration: 3s383ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%489%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:30:43 Duration: 3s262ms
17 2,771 8m42s 168ms 1s147ms 188ms update product_warehouse_inventory set qty_on_order = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Nov 05 03 567 1m42s 179ms 04 5 886ms 177ms 07 12 2s252ms 187ms 08 102 19s28ms 186ms 09 254 50s205ms 197ms 10 231 45s153ms 195ms 11 156 28s979ms 185ms 12 340 1m5s 193ms 13 325 1m3s 196ms 14 274 52s143ms 190ms 15 284 52s828ms 186ms 16 64 11s836ms 184ms 17 157 27s736ms 176ms -
UPDATE product_warehouse_inventory SET qty_on_order = 40.0 WHERE product_id = 206034 AND warehouse_id = 46;
Date: 2024-11-05 18:38:41 Duration: 1s147ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 12.0 WHERE product_id = 206354 AND warehouse_id = 46;
Date: 2024-11-05 18:38:42 Duration: 1s26ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 75.0 WHERE product_id = 247069 AND warehouse_id = 46;
Date: 2024-11-05 18:38:39 Duration: 507ms
18 2,654 6m17s 120ms 1s135ms 142ms select coalesce(loc_check_qty, ?) as loc_check_qty from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Nov 05 03 247 31s219ms 126ms 04 132 16s928ms 128ms 07 100 13s627ms 136ms 08 231 33s664ms 145ms 09 293 43s454ms 148ms 10 387 57s526ms 148ms 11 432 1m1s 141ms 12 161 22s666ms 140ms 13 220 32s546ms 147ms 14 174 25s42ms 143ms 15 163 23s890ms 146ms 16 95 12s768ms 134ms 17 19 2s556ms 134ms -
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 188517 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-11-05 15:05:50 Duration: 1s135ms
-
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 211732 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 16:28:13 Duration: 833ms
-
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 193196 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-11-05 18:34:59 Duration: 759ms
19 2,260 23m13s 529ms 1s922ms 616ms select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Nov 05 19 18 9s622ms 534ms 02 6 3s210ms 535ms 04 1 545ms 545ms 05 4 2s150ms 537ms 06 6 3s266ms 544ms 07 174 1m38s 568ms 08 271 2m43s 603ms 09 376 4m6s 655ms 10 295 3m12s 651ms 11 212 2m8s 605ms 12 181 1m52s 621ms 13 308 3m13s 628ms 14 205 2m1s 590ms 15 143 1m25s 595ms 16 43 23s649ms 549ms 17 12 6s510ms 542ms 18 5 2s689ms 537ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-904d16a/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 18:50:29 Duration: 1s922ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 14:09:17 Duration: 1s867ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 17:39:51 Duration: 1s663ms
20 1,937 6m11s 174ms 763ms 191ms update product_warehouse_inventory set rep_loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Nov 05 03 23 4s125ms 179ms 04 188 34s3ms 180ms 07 93 17s291ms 185ms 08 185 35s940ms 194ms 09 139 27s495ms 197ms 10 229 45s483ms 198ms 11 406 1m17s 190ms 12 119 23s252ms 195ms 13 146 28s576ms 195ms 14 118 22s768ms 192ms 15 134 26s421ms 197ms 16 124 23s31ms 185ms 17 33 5s965ms 180ms -
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(6.0, 0) + COALESCE(2.0, 0) WHERE product_id = 203778 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-11-05 20:25:13 Duration: 763ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(7.0, 0) + COALESCE(1.0, 0) WHERE product_id = 193196 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-11-05 18:35:00 Duration: 612ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(10.0, 0) + COALESCE(0.0, 0) WHERE product_id = 211732 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 16:28:14 Duration: 582ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 2s176ms 1m8s 6s96ms 115 11m41s delete from account_move_line where id in (...);Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Nov 05 07 1 11s718ms 11s718ms 08 7 37s223ms 5s317ms 09 1 7s834ms 7s834ms 10 27 1m12s 2s686ms 11 7 25s806ms 3s686ms 12 7 21s424ms 3s60ms 14 4 13s889ms 3s472ms 15 2 47s548ms 23s774ms 16 1 4s545ms 4s545ms 18 58 7m38s 7s907ms -
DELETE FROM account_move_line WHERE id IN (6134115, 6134116, 6134117, 6134118, 6134119, 6134120, 6134121, 6134122, 6134123, 6134124, 6134125, 6134126, 6134127, 6134128, 6134129, 6134130, 6134131, 6134132, 6134133, 6134134, 6134135, 6134136, 6134137, 6134138, 6134139, 6134140, 6134141, 6134142, 6134143, 6138768, 6138769);
Date: 2024-11-05 23:04:53 Duration: 1m8s
-
DELETE FROM account_move_line WHERE id IN (6135859, 6135860, 6010433, 6010434, 6010435, 6010436, 6010437, 6010438, 6010439, 6010440, 6010441, 6010442, 6010443, 6010444, 6010445, 6010446, 6010447, 6010448, 6010449, 6010450, 6010451, 6010452, 6010453, 6010454, 6010455, 6010456, 6010457, 6010458, 6010459, 6010460);
Date: 2024-11-05 23:38:56 Duration: 1m5s
-
DELETE FROM account_move_line WHERE id IN (6143597, 6143598, 6143599, 6143600, 6112814, 6112815, 6112816, 6112817, 6112818, 6112819, 6112820, 6112821, 6112822, 6112823, 6112824, 6112825, 6112826, 6112827, 6112828, 6112829, 6112830, 6112831);
Date: 2024-11-05 23:33:01 Duration: 48s509ms
2 918ms 3s161ms 1s52ms 814 14m16s select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."is_core" is null or "product_template"."is_core" = false) and (("product_template"."type" in (...)) and (((((unaccent ("product_template"."default_code"::text) ilike unaccent (?)) or ("product_template"."id" in ( select "product_product"."product_tmpl_id" from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") where (("product_product"."active" = true) and (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null)))) or unaccent (coalesce("product_template__name"."value", "product_template"."name")) ilike unaccent (?)) or false) or (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent (?)))))) and (("product_template"."company_id" in (...)) or "product_template"."company_id" is null) order by coalesce("product_template__name"."value", "product_template"."name") limit ?;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Nov 05 06 2 1s846ms 923ms 07 40 39s446ms 986ms 08 118 2m4s 1s55ms 09 125 2m19s 1s112ms 10 83 1m29s 1s77ms 11 78 1m19s 1s15ms 12 61 1m2s 1s27ms 13 116 2m 1s34ms 14 99 1m45s 1s61ms 15 76 1m19s 1s46ms 16 16 15s573ms 973ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%340-4009%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%340-4009%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%340-4009%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%340-4009%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-11-05 13:08:41 Duration: 3s161ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%21032--5t-2200p%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%21032--5t-2200p%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%21032--5t-2200p%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%21032--5t-2200p%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-11-05 14:42:05 Duration: 2s687ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%fuel cap seal%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%fuel cap seal%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%fuel cap seal%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%fuel cap seal%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-11-05 19:00:03 Duration: 2s676ms
3 730ms 3s608ms 892ms 1,004 14m55s select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where (("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Nov 05 07 31 24s34ms 775ms 08 76 1m6s 875ms 09 281 4m30s 962ms 10 61 56s194ms 921ms 11 246 3m23s 826ms 12 44 40s596ms 922ms 13 115 1m44s 912ms 14 106 1m32s 869ms 15 27 24s124ms 893ms 16 17 13s67ms 768ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%LT24580%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%LT24580%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%LT24580%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 14:42:04 Duration: 3s608ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%LT24580R%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%LT24580R%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%LT24580R%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 14:42:04 Duration: 2s819ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%303%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%303%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%303%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 19:20:23 Duration: 2s500ms
4 725ms 3s616ms 890ms 3,031 45m select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where ((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."sale_ok" is not null and "product_product__product_tmpl_id"."sale_ok" != false)) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Nov 05 07 211 2m46s 788ms 08 611 8m45s 859ms 09 491 8m1s 981ms 10 256 3m58s 929ms 11 356 5m31s 931ms 12 328 4m41s 859ms 13 310 4m36s 892ms 14 214 3m4s 864ms 15 118 1m47s 907ms 16 136 1m46s 782ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%489X%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489X%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489X%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:30:45 Duration: 3s616ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%wh3%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%wh3%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%wh3%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:22:50 Duration: 3s383ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%489%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-11-05 16:30:43 Duration: 3s262ms
5 529ms 1s922ms 616ms 2,260 23m13s select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Nov 05 19 18 9s622ms 534ms 02 6 3s210ms 535ms 04 1 545ms 545ms 05 4 2s150ms 537ms 06 6 3s266ms 544ms 07 174 1m38s 568ms 08 271 2m43s 603ms 09 376 4m6s 655ms 10 295 3m12s 651ms 11 212 2m8s 605ms 12 181 1m52s 621ms 13 308 3m13s 628ms 14 205 2m1s 590ms 15 143 1m25s 595ms 16 43 23s649ms 549ms 17 12 6s510ms 542ms 18 5 2s689ms 537ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-904d16a/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 18:50:29 Duration: 1s922ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 14:09:17 Duration: 1s867ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-11-05 17:39:51 Duration: 1s663ms
6 369ms 2s805ms 400ms 8,607 57m28s select id, product_id, warehouse_id, loc_check_qty, coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Nov 05 03 307 1m56s 379ms 04 1,498 9m30s 380ms 07 210 1m22s 390ms 08 669 4m32s 406ms 09 1,142 7m57s 417ms 10 776 5m19s 412ms 11 598 4m 402ms 12 675 4m33s 404ms 13 1,015 6m50s 404ms 14 570 3m50s 404ms 15 775 5m12s 403ms 16 199 1m17s 389ms 17 173 1m6s 384ms -
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 14:42:04 Duration: 2s805ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 18:30:45 Duration: 1s340ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-11-05 14:18:52 Duration: 1s227ms
7 320ms 2s895ms 379ms 8,608 54m23s select pwi.id as pwi_id, pwi.loc_check_qty as src_loc_check_qty, pwi.rep_loc_check_qty as ex_rep_loc_check_qty, sw.id as replenish_wh_id, coalesce(rep_pwi.loc_check_qty, ?) as rep_loc_check_qty from product_warehouse_inventory pwi join stock_warehouse sw on sw.branch_id = pwi.replenish_branch_id left join product_warehouse_inventory rep_pwi on rep_pwi.warehouse_id = sw.id and rep_pwi.product_id = pwi.product_id where pwi.replenish_branch_id is not null and pwi.rep_loc_check_qty != (pwi.loc_check_qty + coalesce(rep_pwi.loc_check_qty, ?));Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Nov 05 03 307 1m44s 339ms 04 1,498 8m28s 339ms 07 210 1m15s 361ms 08 669 4m16s 383ms 09 1,143 7m46s 408ms 10 776 5m11s 401ms 11 598 3m49s 384ms 12 675 4m19s 384ms 13 1,015 6m33s 387ms 14 570 3m43s 392ms 15 775 5m1s 389ms 16 199 1m11s 356ms 17 173 1m 348ms -
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 19:20:22 Duration: 2s895ms
-
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 16:30:43 Duration: 2s364ms
-
SELECT pwi.id AS pwi_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, sw.id AS replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = sw.id AND rep_pwi.product_id = pwi.product_id WHERE pwi.replenish_branch_id IS NOT NULL and pwi.rep_loc_check_qty != (pwi.loc_check_qty + COALESCE(rep_pwi.loc_check_qty, 0));
Date: 2024-11-05 15:09:16 Duration: 2s285ms
8 190ms 727ms 229ms 3,835 14m40s select coalesce(sum(pwi.max_product_uom_qty), ?) as tmq from forecasted_data fd inner join item_supply_plan as isp on isp.id = fd.item_supply_plan_id inner join product_warehouse_inventory pwi on fd.product_id = pwi.product_id and isp.branch_id = pwi.replenish_branch_id where isp.id = ? and fd.product_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Nov 05 07 26 5s749ms 221ms 08 75 18s229ms 243ms 09 200 52s109ms 260ms 10 722 2m46s 231ms 11 395 1m29s 226ms 12 714 2m46s 232ms 13 484 1m54s 236ms 14 372 1m25s 231ms 15 216 50s326ms 232ms 16 631 2m10s 207ms -
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 54906 and fd.product_id = 187766;
Date: 2024-11-05 14:25:39 Duration: 727ms
-
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 55098 and fd.product_id = 266013;
Date: 2024-11-05 20:03:11 Duration: 600ms
-
SELECT COALESCE(SUM(pwi.max_product_uom_qty), 0) AS TMQ from forecasted_data fd INNER JOIN item_supply_plan AS isp ON isp.id = fd.item_supply_plan_id INNER JOIN product_warehouse_inventory pwi ON fd.product_id = pwi.product_id AND isp.branch_id = pwi.replenish_branch_id where isp.id = 54927 and fd.product_id = 247069;
Date: 2024-11-05 17:04:45 Duration: 593ms
9 120ms 2s964ms 192ms 134,493 7h10m38s select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Nov 05 19 3,710 9m5s 147ms 20 3,734 9m6s 146ms 21 3,553 9m2s 152ms 22 3,488 8m51s 152ms 23 3,366 8m47s 156ms 00 3,689 8m44s 142ms 01 3,647 8m54s 146ms 02 3,565 8m39s 145ms 03 3,761 9m48s 156ms 04 3,901 10m1s 154ms 05 4,040 9m35s 142ms 06 4,040 10m2s 149ms 07 6,194 17m31s 169ms 08 9,568 33m57s 212ms 09 9,646 38m10s 237ms 10 9,009 34m22s 228ms 11 8,747 36m33s 250ms 12 8,940 31m51s 213ms 13 8,893 35m54s 242ms 14 8,877 31m52s 215ms 15 7,891 28m43s 218ms 16 5,451 14m29s 159ms 17 3,548 8m39s 146ms 18 3,235 7m53s 146ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19585]', '["pointspring_master","mail.channel",572]', '["pointspring_master","mail.channel",645]', '["pointspring_master","res.partner",19585]', '["pointspring_master","ir.needaction",19585]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s964ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19545]', '["pointspring_master","mail.channel",33]', '["pointspring_master","mail.channel",472]', '["pointspring_master","mail.channel",520]', '["pointspring_master","mail.channel",571]', '["pointspring_master","mail.channel",611]', '["pointspring_master","res.partner",19545]', '["pointspring_master","ir.needaction",19545]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s920ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-05 14:41:11') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_984"', '["pointspring_master","calendar.alarm",19522]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",329]', '["pointspring_master","mail.channel",330]', '["pointspring_master","mail.channel",422]', '["pointspring_master","mail.channel",639]', '["pointspring_master","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-05 14:42:03 Duration: 2s916ms
10 174ms 763ms 191ms 1,937 6m11s update product_warehouse_inventory set rep_loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Nov 05 03 23 4s125ms 179ms 04 188 34s3ms 180ms 07 93 17s291ms 185ms 08 185 35s940ms 194ms 09 139 27s495ms 197ms 10 229 45s483ms 198ms 11 406 1m17s 190ms 12 119 23s252ms 195ms 13 146 28s576ms 195ms 14 118 22s768ms 192ms 15 134 26s421ms 197ms 16 124 23s31ms 185ms 17 33 5s965ms 180ms -
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(6.0, 0) + COALESCE(2.0, 0) WHERE product_id = 203778 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-11-05 20:25:13 Duration: 763ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(7.0, 0) + COALESCE(1.0, 0) WHERE product_id = 193196 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-11-05 18:35:00 Duration: 612ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(10.0, 0) + COALESCE(0.0, 0) WHERE product_id = 211732 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 16:28:14 Duration: 582ms
11 171ms 738ms 191ms 5,122 16m19s update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Nov 05 03 1,374 4m8s 180ms 04 5 886ms 177ms 07 93 17s585ms 189ms 08 488 1m39s 203ms 09 796 2m34s 194ms 10 413 1m22s 199ms 11 288 54s986ms 190ms 12 467 1m30s 193ms 13 431 1m23s 192ms 14 443 1m25s 191ms 15 219 43s487ms 198ms 16 104 19s42ms 183ms 17 1 175ms 175ms -
UPDATE product_warehouse_inventory SET qty_available = 34.0 WHERE product_id = 193111 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 15:06:41 Duration: 738ms
-
UPDATE product_warehouse_inventory SET qty_available = 11.0 WHERE product_id = 190212 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 13:08:40 Duration: 731ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 190763 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-11-05 13:02:40 Duration: 659ms
12 171ms 469ms 189ms 3,157 9m59s update product_warehouse_inventory set qty_reserve = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Nov 05 03 576 1m43s 179ms 04 5 889ms 177ms 07 98 18s242ms 186ms 08 314 59s817ms 190ms 09 409 1m20s 196ms 10 333 1m4s 194ms 11 223 42s605ms 191ms 12 322 1m1s 191ms 13 301 57s909ms 192ms 14 221 42s388ms 191ms 15 211 41s701ms 197ms 16 87 15s974ms 183ms 17 57 10s61ms 176ms -
UPDATE product_warehouse_inventory SET qty_reserve = 8.0 WHERE product_id = 198569 AND warehouse_id = 43;
Date: 2024-11-05 15:02:23 Duration: 469ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 271246 AND warehouse_id = 46;
Date: 2024-11-05 19:03:58 Duration: 428ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 271544 AND warehouse_id = 37;
Date: 2024-11-05 14:10:13 Duration: 361ms
13 168ms 1s147ms 188ms 2,771 8m42s update product_warehouse_inventory set qty_on_order = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Nov 05 03 567 1m42s 179ms 04 5 886ms 177ms 07 12 2s252ms 187ms 08 102 19s28ms 186ms 09 254 50s205ms 197ms 10 231 45s153ms 195ms 11 156 28s979ms 185ms 12 340 1m5s 193ms 13 325 1m3s 196ms 14 274 52s143ms 190ms 15 284 52s828ms 186ms 16 64 11s836ms 184ms 17 157 27s736ms 176ms -
UPDATE product_warehouse_inventory SET qty_on_order = 40.0 WHERE product_id = 206034 AND warehouse_id = 46;
Date: 2024-11-05 18:38:41 Duration: 1s147ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 12.0 WHERE product_id = 206354 AND warehouse_id = 46;
Date: 2024-11-05 18:38:42 Duration: 1s26ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 75.0 WHERE product_id = 247069 AND warehouse_id = 46;
Date: 2024-11-05 18:38:39 Duration: 507ms
14 171ms 1s21ms 188ms 9,853 30m56s update product_warehouse_inventory set qty_shipped_not_invoiced = case when ?.? is not null then greatest ((?.? - ?.?) + (?.? - ?.?), ?) else greatest ((?.? - ?.?), ?) end where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Nov 05 04 1,815 5m25s 179ms 07 231 42s526ms 184ms 08 919 2m55s 190ms 09 2,243 7m11s 192ms 10 1,048 3m22s 192ms 11 708 2m14s 189ms 12 731 2m18s 189ms 13 923 2m54s 189ms 14 613 1m56s 189ms 15 421 1m18s 185ms 16 200 37s106ms 185ms 17 1 178ms 178ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((12.0 - 12.0) + (0.0 - 0.0), 0) ELSE GREATEST ((12.0 - 12.0), 0) END where product_id = 227984 and warehouse_id = 37 and company_id = 1;
Date: 2024-11-05 14:35:38 Duration: 1s21ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((1.0 - 1.0) + (0.0 - 0.0), 0) ELSE GREATEST ((1.0 - 1.0), 0) END where product_id = 268931 and warehouse_id = 43 and company_id = 1;
Date: 2024-11-05 17:16:12 Duration: 900ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 1.0 IS NOT NULL THEN GREATEST ((370.0 - 370.0) + (1.0 - 1.0), 0) ELSE GREATEST ((370.0 - 370.0), 0) END where product_id = 199634 and warehouse_id = 42 and company_id = 1;
Date: 2024-11-05 14:12:26 Duration: 892ms
15 167ms 1s2ms 188ms 14,351 44m58s update product_warehouse_inventory set loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) - coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Nov 05 03 1,118 3m19s 178ms 04 1,524 4m34s 179ms 07 347 1m3s 183ms 08 944 3m 191ms 09 1,442 4m44s 197ms 10 1,141 3m44s 196ms 11 1,143 3m34s 188ms 12 973 3m4s 189ms 13 1,535 4m49s 188ms 14 1,471 4m38s 189ms 15 1,792 5m37s 188ms 16 497 1m31s 183ms 17 424 1m15s 179ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(13.0, 0) + COALESCE(5.0, 0) - COALESCE(4.0, 0) WHERE product_id = 190709 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-11-05 13:33:47 Duration: 1s2ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(117.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 237202 AND warehouse_id = 36 AND company_id = 1;
Date: 2024-11-05 15:59:14 Duration: 892ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(4.0, 0) + COALESCE(4.0, 0) - COALESCE(0.0, 0) WHERE product_id = 187889 AND warehouse_id = 41 AND company_id = 1;
Date: 2024-11-05 17:53:52 Duration: 869ms
16 169ms 416ms 187ms 3,590 11m12s update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Nov 05 03 1,041 3m6s 178ms 04 79 14s74ms 178ms 07 64 11s653ms 182ms 08 214 40s634ms 189ms 09 469 1m30s 192ms 10 239 46s551ms 194ms 11 230 42s493ms 184ms 12 314 1m1s 196ms 13 312 59s900ms 191ms 14 311 58s281ms 187ms 15 217 42s685ms 196ms 16 54 9s865ms 182ms 17 46 8s25ms 174ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 197753 AND warehouse_id = 38;
Date: 2024-11-05 18:06:59 Duration: 416ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 216648 AND warehouse_id = 42;
Date: 2024-11-05 15:55:33 Duration: 405ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 187570 AND warehouse_id = 41;
Date: 2024-11-05 17:53:17 Duration: 365ms
17 120ms 1s450ms 177ms 4,150 12m18s select "sale_order_line".id from "sale_order_line" where (((("sale_order_line"."product_id" = ?) and ("sale_order_line"."order_id" in ( select "sale_order".id from "sale_order" where ("sale_order"."branch_id" in ( select "res_branch".id from "res_branch" where ("res_branch"."id" = ?)))))) and ("sale_order_line"."open_qty_fil" > ?.?)) and (("sale_order_line"."state" not in (...)) or "sale_order_line"."state" is null)) order by "sale_order_line"."id" asc;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Nov 05 07 350 56s631ms 161ms 08 359 1m9s 193ms 09 264 50s697ms 192ms 10 471 1m26s 184ms 11 172 28s228ms 164ms 12 529 1m29s 169ms 13 451 1m21s 181ms 14 994 2m58s 179ms 15 425 1m14s 174ms 16 135 21s760ms 161ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 177580) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:33:47 Duration: 1s450ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 266060) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:33:48 Duration: 1s38ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 190945) AND ("sale_order_line"."order_id" in ( SELECT "sale_order".id FROM "sale_order" WHERE ("sale_order"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE ("res_branch"."id" = '37')))))) AND ("sale_order_line"."open_qty_fil" > 0.0)) AND (("sale_order_line"."state" not in ('draft', 'cancel')) OR "sale_order_line"."state" IS NULL)) ORDER BY "sale_order_line"."id" ASC;
Date: 2024-11-05 13:08:40 Duration: 918ms
18 137ms 1s74ms 159ms 5,761 15m17s select current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages as real_size, (tblpages - est_tblpages_ff) * bs as bloat_size, case when tblpages - est_tblpages_ff > ? then ? * (tblpages - est_tblpages_ff) / tblpages::float else ? end as bloat_ratio from ( select ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / ?) as est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * ?))) + ceil(toasttuples / ?) as est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na from ( select (? + tpl_hdr_size + tpl_data_size + (? * ma) - case when tpl_hdr_size % ma = ? then ma else tpl_hdr_size % ma end - case when ceil(tpl_data_size)::int % ma = ? then ma else ceil(tpl_data_size)::int % ma end) as tpl_size, bs - page_hdr as size_per_block, (heappages + toastpages) as tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na from ( select tbl.oid as tblid, ns.nspname as schemaname, tbl.relname as tblname, tbl.reltuples, tbl.relpages as heappages, coalesce(toast.relpages, ?) as toastpages, coalesce(toast.reltuples, ?) as toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ?) from ?)::smallint, ?) as fillfactor, current_setting(?)::numeric as bs, case when version() ~ ? or version() ~ ? then ? else ? end as ma, ? as page_hdr, case when current_setting(?)::integer < ? then ? else ? end + case when max(coalesce(null_frac, ?)) > ? then (? + count(*)) / ? else ?::int end + ? as tpl_hdr_size, sum((? - coalesce(s.null_frac, ?)) * coalesce(s.avg_width, ?)) as tpl_data_size, bool_or(att.atttypid = ?::regtype) or count(att.attname) <> count(s.attname) as is_na from pg_attribute as att join pg_class as tbl on att.attrelid = tbl.oid join pg_namespace as ns on ns.oid = tbl.relnamespace left join pg_stats as s on s.schemaname = ns.nspname and s.tablename = tbl.relname and s.attname = att.attname left join pg_class as toast on tbl.reltoastrelid = toast.oid where att.attnum > ? and not att.attisdropped and tbl.relkind = ? group by ?, ?, ?, ?, ?, ?, ?, ?, ?, ? order by ?, ?) as s) as s2) as s3 where not is_na and schemaname || ? || tblname in (...);Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Nov 05 19 240 36s468ms 151ms 20 240 36s200ms 150ms 21 240 36s136ms 150ms 22 240 36s490ms 152ms 23 240 36s200ms 150ms 00 240 36s13ms 150ms 01 240 35s897ms 149ms 02 240 35s673ms 148ms 03 240 36s379ms 151ms 04 240 36s496ms 152ms 05 240 35s912ms 149ms 06 240 36s166ms 150ms 07 240 37s934ms 158ms 08 240 42s52ms 175ms 09 241 46s300ms 192ms 10 241 43s499ms 180ms 11 240 40s927ms 170ms 12 240 41s7ms 170ms 13 240 42s119ms 175ms 14 240 40s589ms 169ms 15 240 39s687ms 165ms 16 240 37s455ms 156ms 17 239 36s38ms 150ms 18 240 35s626ms 148ms -
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_indexes', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_namespace', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_settings', 'pg_catalog.pg_trigger', 'pg_catalog.pg_database', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_subscription', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_tables', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_depend', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_attribute', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_extension', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_views', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_type', 'pg_catalog.pg_operator', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_publication', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_proc', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_index', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stats', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_sequences', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_amproc', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_roles', 'pg_catalog.pg_language', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_matviews', 'pg_catalog.pg_constraint', 'pg_catalog.pg_conversion', 'pg_catalog.pg_collation', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_description', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_enum', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_am', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_locks', 'pg_catalog.pg_class', 'pg_catalog.pg_inherits', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_policy', 'pg_catalog.pg_range', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_cast', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_progress_vacuum', 'information_schema.attributes', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.column_options', 'information_schema.domain_udt_usage', 'information_schema.routine_privileges', 'information_schema.foreign_tables', 'information_schema.character_sets', 'information_schema.schemata', 'information_schema.view_table_usage', 'information_schema.foreign_server_options', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.column_udt_usage', 'information_schema.key_column_usage', 'information_schema.table_constraints', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_routine_usage', 'information_schema.tables', 'information_schema.triggered_update_columns', 'information_schema.check_constraints', 'information_schema.sql_features', 'information_schema.foreign_data_wrapper_options', 'information_schema.column_column_usage', 'information_schema.view_routine_usage', 'information_schema.routine_table_usage', 'information_schema.column_domain_usage', 'information_schema.columns', 'information_schema.parameters', 'information_schema.sequences', 'information_schema.sql_implementation_info', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.collations', 'information_schema.referential_constraints', 'information_schema.routine_sequence_usage', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.user_defined_types', 'information_schema.role_routine_grants', 'information_schema.data_type_privileges', 'information_schema.constraint_table_usage', 'information_schema.administrable_role_authorizations', 'information_schema.domain_constraints', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrappers', 'information_schema.element_types', 'information_schema.user_mapping_options', 'information_schema.constraint_column_usage', 'information_schema.sql_sizing', 'information_schema.udt_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_table_options', 'information_schema.foreign_servers', 'information_schema.routines', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.role_usage_grants', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-05 14:40:00 Duration: 1s74ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_range', 'pg_catalog.pg_sequence', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_views', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_inherits', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_operator', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_extension', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_transform', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_rules', 'pg_catalog.pg_locks', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_subscription', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_policies', 'pg_catalog.pg_indexes', 'pg_catalog.pg_sequences', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_enum', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_trigger', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_description', 'pg_catalog.pg_depend', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_constraint', 'pg_catalog.pg_database', 'pg_catalog.pg_publication', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_collation', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_settings', 'pg_catalog.pg_opclass', 'pg_catalog.pg_language', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_group', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_amproc', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_conversion', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_attribute', 'pg_catalog.pg_amop', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_proc', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_tablespace', 'information_schema.enabled_roles', 'information_schema.role_table_grants', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.routine_sequence_usage', 'information_schema.sql_sizing', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.role_routine_grants', 'information_schema.foreign_tables', 'information_schema.columns', 'information_schema.key_column_usage', 'information_schema.role_usage_grants', 'information_schema.foreign_server_options', 'information_schema.referential_constraints', 'information_schema.view_table_usage', 'information_schema.character_sets', 'information_schema.column_column_usage', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.view_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.usage_privileges', 'information_schema.collations', 'information_schema.routine_table_usage', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.applicable_roles', 'information_schema.information_schema_catalog_name', 'information_schema.column_domain_usage', 'information_schema.constraint_table_usage', 'information_schema.element_types', 'information_schema.role_column_grants', 'information_schema.table_privileges', 'information_schema.view_routine_usage', 'information_schema.user_mapping_options', 'information_schema.domains', 'information_schema.routine_routine_usage', 'information_schema.foreign_table_options', 'information_schema.domain_constraints', 'information_schema.parameters', 'information_schema.sql_features', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.routine_column_usage', 'information_schema.routine_privileges', 'information_schema.schemata', 'information_schema.column_options', 'information_schema.constraint_column_usage', 'information_schema.sql_implementation_info', 'information_schema.table_constraints', 'information_schema.tables', 'information_schema.triggered_update_columns', 'information_schema.attributes', 'information_schema.routines', 'information_schema.domain_udt_usage', 'information_schema.user_defined_types');
Date: 2024-11-05 15:59:15 Duration: 691ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_subscription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_extension', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_proc', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_range', 'pg_catalog.pg_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_trigger', 'pg_catalog.pg_sequence', 'pg_catalog.pg_depend', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_roles', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_cursors', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_amproc', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_rules', 'pg_catalog.pg_stats', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_policy', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_conversion', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_inherits', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_enum', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_collation', 'pg_catalog.pg_database', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_type', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_matviews', 'pg_catalog.pg_locks', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_settings', 'pg_catalog.pg_language', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_policies', 'pg_catalog.pg_views', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_amop', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_database', 'information_schema.triggers', 'information_schema.element_types', 'information_schema.role_column_grants', 'information_schema.columns', 'information_schema.schemata', 'information_schema.view_table_usage', 'information_schema.view_routine_usage', 'information_schema.collations', 'information_schema.column_column_usage', 'information_schema.sql_features', 'information_schema.attributes', 'information_schema.table_constraints', 'information_schema.role_udt_grants', 'information_schema.foreign_servers', 'information_schema.domains', 'information_schema.user_mappings', 'information_schema.foreign_table_options', 'information_schema.referential_constraints', 'information_schema.routine_sequence_usage', 'information_schema.view_column_usage', 'information_schema.constraint_table_usage', 'information_schema.role_routine_grants', 'information_schema.parameters', 'information_schema.role_usage_grants', 'information_schema.routine_routine_usage', 'information_schema.role_table_grants', 'information_schema.data_type_privileges', 'information_schema.sql_implementation_info', 'information_schema.user_mapping_options', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.foreign_server_options', 'information_schema.foreign_tables', 'information_schema.column_domain_usage', 'information_schema.constraint_column_usage', 'information_schema.udt_privileges', 'information_schema.applicable_roles', 'information_schema.administrable_role_authorizations', 'information_schema.table_privileges', 'information_schema.tables', 'information_schema.character_sets', 'information_schema.routines', 'information_schema.column_udt_usage', 'information_schema.user_defined_types', 'information_schema.column_options', 'information_schema.key_column_usage', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.usage_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.domain_constraints', 'information_schema.sequences', 'information_schema.sql_sizing', 'information_schema.views', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_table_usage', 'information_schema.check_constraints', 'information_schema.routine_column_usage', 'information_schema.domain_udt_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-05 18:30:45 Duration: 682ms
19 120ms 1s26ms 152ms 4,523 11m27s select "product_warehouse_inventory".id from "product_warehouse_inventory" where ("product_warehouse_inventory"."product_id" in (...)) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Nov 05 19 22 2s948ms 134ms 02 1 130ms 130ms 06 5 639ms 127ms 07 189 25s922ms 137ms 08 562 1m22s 145ms 09 730 1m51s 153ms 10 715 1m54s 160ms 11 513 1m19s 154ms 12 522 1m19s 152ms 13 471 1m12s 153ms 14 382 56s842ms 148ms 15 241 38s378ms 159ms 16 170 23s523ms 138ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (186487, 186192, 186488, 255066, 257625, 257636, 257639, 186821, 185943, 186440, 186030, 257638, 186673, 186690, 257634, 184673, 186039, 185126, 185681, 255021, 186674, 185475, 257633, 186819, 257637, 186822, 185349, 185944, 185871, 185576, 186111, 184683, 186438, 185577)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 17:50:04 Duration: 1s26ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (267253)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 16:30:42 Duration: 883ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (267253)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-05 16:30:43 Duration: 610ms
20 120ms 1s644ms 150ms 5,636 14m5s select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = ? and sol.warehouse_id = ? and sol.company_id = ? and (sol.so_line_id is null and sol.move_options in (...));Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Nov 05 04 648 1m24s 129ms 07 133 18s900ms 142ms 08 595 1m30s 151ms 09 1,424 3m41s 155ms 10 662 1m43s 155ms 11 434 1m6s 154ms 12 435 1m7s 155ms 13 589 1m30s 153ms 14 368 54s563ms 148ms 15 229 32s571ms 142ms 16 118 16s215ms 137ms 17 1 141ms 141ms -
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 176722 and sol.warehouse_id = 42 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 16:19:42 Duration: 1s644ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 268932 and sol.warehouse_id = 43 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 17:16:13 Duration: 1s357ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 172035 and sol.warehouse_id = 42 and sol.company_id = 1 and (sol.so_line_id is null and sol.move_options in ('new_product', 'core_sale_1', 'core_sale_2', 'core_sale_3'));
Date: 2024-11-05 14:40:00 Duration: 1s20ms
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
- 285,689 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 1494 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 1,058 Max number of times the same event was reported
- 1,494 Total events found
Rank Times reported Error 1 1,058 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Nov 05 19 37 20 33 21 35 22 32 23 29 00 35 01 36 02 107 03 98 04 29 05 33 06 31 07 34 08 39 09 42 10 38 11 38 12 38 13 38 14 37 15 37 16 34 17 33 18 115 - ERROR: could not obtain lock on row in relation "ir_cron"
- ERROR: could not obtain lock on row in relation "ir_cron"
- ERROR: could not obtain lock on row in relation "ir_cron"
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=67 FOR UPDATE NOWAIT
Date: 2024-11-05 10:50:18
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=68 FOR UPDATE NOWAIT
Date: 2024-11-05 11:00:03
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=66 FOR UPDATE NOWAIT
Date: 2024-11-05 11:40:05
2 405 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Nov 05 20 2 21 2 22 2 23 1 00 1 03 1 05 1 06 3 07 40 08 51 09 70 10 89 11 34 12 23 13 33 14 16 15 30 16 5 17 1 - ERROR: could not serialize access due to concurrent update
- ERROR: could not serialize access due to concurrent update
- ERROR: could not serialize access due to concurrent update
Statement: UPDATE "bus_presence" SET "last_poll"='2024-11-05 10:57:40',"last_presence"='2024-11-05 10:57:39.016212' WHERE id IN (21)
Date: 2024-11-05 10:57:40
Statement: UPDATE "bus_presence" SET "last_poll"='2024-11-05 11:35:07',"last_presence"='2024-11-05 11:35:07.115989' WHERE id IN (33)
Date: 2024-11-05 11:35:07
Statement: UPDATE "bus_presence" SET "last_poll"='2024-11-05 11:44:00',"last_presence"='2024-11-05 11:44:00.456884' WHERE id IN (69)
Date: 2024-11-05 11:44:00
3 22 LOG: process ... still waiting for ShareLock on transaction ... after ... ms
Times Reported Most Frequent Error / Event #3
Day Hour Count Nov 05 08 4 09 9 10 2 11 3 12 2 13 2 - ERROR: process 3155523 still waiting for ShareLock on transaction 323115574 after 1000.057 ms
- ERROR: process 3004634 still waiting for ShareLock on transaction 323115630 after 1000.054 ms
- ERROR: process 3457781 still waiting for ShareLock on transaction 323118285 after 1000.067 ms
Detail: Process holding the lock: 2966487. Wait queue: 3155523.
Context: while updating tuple (40119,68) in relation "account_move"
Statement: UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type IN ('out_refund', 'in_refund') AND id != 1709555 AND sequence_prefix = (SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type IN ('out_refund', 'in_refund') AND id != 1709555 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-11-05 16:52:52
Detail: Process holding the lock: 3155523. Wait queue: 3004634.
Context: while updating tuple (40134,58) in relation "account_move"
Statement: UPDATE "account_move" SET "message_main_attachment_id"=5822198,"write_uid"=1017,"write_date"=(now() at time zone 'UTC') WHERE id IN (1754885)Date: 2024-11-05 16:53:11
Detail: Process holding the lock: 3473524. Wait queue: 3457781.
Context: while updating tuple (40190,33) in relation "account_move"
Statement: UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1754905 AND sequence_prefix = (SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1754905 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-11-05 17:01:32
4 6 ERROR: duplicate key value violates unique constraint "..."
Times Reported Most Frequent Error / Event #4
Day Hour Count Nov 05 09 3 10 1 11 2 - ERROR: duplicate key value violates unique constraint "product_template_cat_vendor_default_code_unique"
- ERROR: duplicate key value violates unique constraint "product_template_cat_vendor_default_code_unique"
- ERROR: duplicate key value violates unique constraint "product_template_cat_vendor_default_code_unique"
Detail: Key (cat_vendor, default_code)=(Misc Stock, 35M30692) already exists.
Statement: UPDATE "product_template" SET "can_image_1024_be_zoomed"=false,"cat_part_type"='All Parts',"cat_prod_type"='Parts',"cat_vendor"='Misc Stock',"has_configurable_attributes"=false,"inventory_vendor_short_name"='Misc Stock',"raise_core_warning"=true,"rating_last_value"=0.0,"write_uid"=1027,"write_date"=(now() at time zone 'UTC') WHERE id IN (273550)Date: 2024-11-05 14:14:51
Detail: Key (cat_vendor, default_code)=(Misc Stock, 35M30692) already exists.
Statement: UPDATE "product_template" SET "can_image_1024_be_zoomed"=false,"cat_part_type"='All Parts',"cat_prod_type"='Parts',"cat_vendor"='Misc Stock',"has_configurable_attributes"=false,"inventory_vendor_short_name"='Misc Stock',"raise_core_warning"=true,"rating_last_value"=0.0,"write_uid"=1027,"write_date"=(now() at time zone 'UTC') WHERE id IN (273551)Date: 2024-11-05 14:14:54
Detail: Key (cat_vendor, default_code)=(Misc Stock, 35M30692) already exists.
Statement: UPDATE "product_template" SET "can_image_1024_be_zoomed"=false,"cat_part_type"='All Parts',"cat_prod_type"='Parts',"cat_vendor"='Misc Stock',"has_configurable_attributes"=false,"inventory_vendor_short_name"='Misc Stock',"raise_core_warning"=true,"rating_last_value"=0.0,"write_uid"=1027,"write_date"=(now() at time zone 'UTC') WHERE id IN (273552)Date: 2024-11-05 14:15:03
5 2 ERROR: null value in column "..." of relation "..." violates not-null constraint
Times Reported Most Frequent Error / Event #5
Day Hour Count Nov 05 12 1 15 1 - ERROR: null value in column "categ_id" of relation "product_template" violates not-null constraint
- ERROR: null value in column "categ_id" of relation "product_template" violates not-null constraint
Detail: Failing row contains (273574, null, hpb450-3, 1, null, null, null, product, null, 1.00, null, null, t, t, 1, 1, null, t, null, null, null, null, 1037, 2024-11-05 17:10:05.921763, 1037, 2024-11-05 17:10:05.921763, manual, no-message, null, no, delivery, 0, none, null, null, null, receive, no-message, null, null, no, 0, null, null, null, null, null, null, null, null, f, null, 1, 1, null, 501695, never, 0, , 50, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2024-11-05, null, E, 1, null, null, f, f, no, null, 1, null, null, null, null, null, null, null, null, null, none, null, null, null, f, f, null, null, null, f, rfq, null, null, null, null, null).
Statement: INSERT INTO "product_template" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "allow_journal", "available_threshold", "branch_id", "categ_id", "core_qty", "custom_message", "expense_policy", "first_active_date", "global_class_code", "inventory_availability", "invoice_policy", "is_core", "is_direct_order_product", "is_mo_product", "is_published", "is_transmission", "linked_with_existing_core", "list_price", "name", "produce_delay", "purchase_line_warn", "purchase_method", "purchase_ok", "purchase_requisition", "sale_delay", "sale_line_warn", "sale_ok", "sequence", "service_form_type", "service_tracking", "service_type", "standard_carton_quanity", "tracking", "type", "uom_id", "uom_po_id", "website_sequence", "website_size_x", "website_size_y") VALUES (nextval('product_template_id_seq'), 1037, (now() at time zone 'UTC'), 1037, (now() at time zone 'UTC'), true, false, 0.0, 50, NULL, 1, '', 'no', '2024-11-05', 'E', 'never', 'delivery', false, false, false, false, false, 'no', '1.00', 'hpb450-3', 0.0, 'no-message', 'receive', true, 'rfq', 0.0, 'no-message', true, 1, 'none', 'no', 'manual', 1, 'none', 'product', 1, 1, 501695, 1, 1) RETURNING idDate: 2024-11-05 17:10:05
Detail: Failing row contains (273586, null, 3103-24, 1, null, null, null, product, null, 1.00, null, null, t, t, 1, 1, null, t, null, null, null, null, 1030, 2024-11-05 20:07:56.767499, 1030, 2024-11-05 20:07:56.767499, manual, no-message, null, no, delivery, 0, none, null, null, null, receive, no-message, null, null, no, 0, null, null, null, null, null, null, null, null, f, null, 1, 1, null, 501750, never, 0, , 45, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2024-11-05, null, E, 1, null, null, f, f, no, null, 1, null, null, null, null, null, null, null, null, null, none, null, null, null, f, f, null, null, null, f, rfq, null, null, null, null, null).
Statement: INSERT INTO "product_template" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "allow_journal", "available_threshold", "branch_id", "categ_id", "core_qty", "custom_message", "expense_policy", "first_active_date", "global_class_code", "inventory_availability", "invoice_policy", "is_core", "is_direct_order_product", "is_mo_product", "is_published", "is_transmission", "linked_with_existing_core", "list_price", "name", "produce_delay", "purchase_line_warn", "purchase_method", "purchase_ok", "purchase_requisition", "sale_delay", "sale_line_warn", "sale_ok", "sequence", "service_form_type", "service_tracking", "service_type", "standard_carton_quanity", "tracking", "type", "uom_id", "uom_po_id", "website_sequence", "website_size_x", "website_size_y") VALUES (nextval('product_template_id_seq'), 1030, (now() at time zone 'UTC'), 1030, (now() at time zone 'UTC'), true, false, 0.0, 45, NULL, 1, '', 'no', '2024-11-05', 'E', 'never', 'delivery', false, false, false, false, false, 'no', '1.00', '3103-24', 0.0, 'no-message', 'receive', true, 'rfq', 0.0, 'no-message', true, 1, 'none', 'no', 'manual', 1, 'none', 'product', 1, 1, 501750, 1, 1) RETURNING idDate: 2024-11-05 20:07:56
6 1 ERROR: could not serialize access due to concurrent delete
Times Reported Most Frequent Error / Event #6
Day Hour Count Nov 05 12 1 - ERROR: could not serialize access due to concurrent delete
Statement: DELETE FROM mail_message WHERE id IN (1356658)
Date: 2024-11-05 17:02:45