-
Global information
- Generated on Tue Jul 16 00:50:13 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 771,376 log entries in 12s
- Log start from 2024-07-15 00:00:00 to 2024-07-15 23:59:57
-
Overview
Global Stats
- 1,278 Number of unique normalized queries
- 258,215 Number of queries
- 21h14m11s Total query duration
- 2024-07-15 00:00:00 First query
- 2024-07-15 23:59:57 Last query
- 70 queries/s at 2024-07-15 14:15:45 Query peak
- 21h14m11s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 21h14m11s Execute total duration
- 5,575 Number of events
- 11 Number of unique normalized events
- 4,364 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
- 258,215 Average queries per session
- 21h14m11s 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
- 70 queries/s Query Peak
- 2024-07-15 14:15:45 Date
SELECT Traffic
Key values
- 70 queries/s Query Peak
- 2024-07-15 14:15:45 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 13 queries/s Query Peak
- 2024-07-15 16:57:01 Date
Queries duration
Key values
- 21h14m11s 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) Jul 15 00 1,561 120ms 1s753ms 222ms 7s705ms 7s927ms 18s889ms 01 1,060 120ms 958ms 197ms 5s820ms 6s324ms 9s136ms 02 1,042 120ms 1s110ms 180ms 4s336ms 11s878ms 39s33ms 03 3,406 120ms 1s707ms 221ms 40s449ms 44s319ms 1m4s 04 1,202 120ms 4s219ms 227ms 7s167ms 8s921ms 9s693ms 05 882 120ms 1s102ms 208ms 5s664ms 6s221ms 6s749ms 06 1,133 120ms 646ms 209ms 6s123ms 7s2ms 8s191ms 07 1,253 120ms 1s255ms 207ms 6s874ms 8s278ms 11s3ms 08 1,366 120ms 696ms 210ms 8s381ms 11s884ms 15s942ms 09 1,162 0ms 4m1s 861ms 1m2s 2m3s 4m38s 10 1,262 120ms 8s194ms 197ms 7s319ms 12s325ms 23s346ms 11 8,466 120ms 56s604ms 315ms 1m31s 2m5s 2m26s 12 22,398 120ms 20s902ms 307ms 3m10s 3m47s 4m46s 13 36,697 120ms 24s792ms 314ms 5m4s 5m47s 7m22s 14 36,976 120ms 1m4s 312ms 5m22s 6m19s 8m40s 15 39,047 120ms 1m9s 274ms 4m37s 5m50s 6m40s 16 18,922 120ms 57s177ms 292ms 2m49s 3m42s 4m37s 17 20,313 120ms 55s669ms 296ms 2m39s 3m21s 3m49s 18 21,623 120ms 36s337ms 314ms 3m11s 3m38s 4m23s 19 22,955 120ms 30s507ms 284ms 3m15s 3m47s 4m15s 20 7,373 120ms 12s92ms 279ms 1m41s 1m58s 3m4s 21 2,326 120ms 1s102ms 195ms 10s754ms 15s211ms 22s922ms 22 2,631 120ms 905ms 198ms 13s262ms 20s917ms 22s421ms 23 3,159 120ms 51s962ms 367ms 54s276ms 1m9s 1m19s Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Jul 15 00 1,561 0 222ms 6s551ms 7s705ms 9s164ms 01 1,060 0 197ms 5s296ms 5s820ms 7s377ms 02 991 0 181ms 3s213ms 4s336ms 25s31ms 03 3,090 0 227ms 18s456ms 37s928ms 57s867ms 04 1,198 0 226ms 6s417ms 7s167ms 8s943ms 05 882 0 208ms 4s687ms 5s664ms 6s626ms 06 1,133 0 209ms 5s492ms 6s123ms 8s7ms 07 1,253 0 207ms 5s917ms 6s874ms 9s645ms 08 1,331 0 211ms 7s268ms 7s798ms 11s492ms 09 1,049 113 861ms 3s959ms 59s998ms 2m19s 10 1,254 0 194ms 5s18ms 7s31ms 14s124ms 11 7,763 0 324ms 1m13s 1m23s 2m2s 12 19,500 0 316ms 2m21s 2m54s 3m40s 13 32,761 0 324ms 3m55s 4m43s 7m9s 14 34,340 0 317ms 4m16s 4m42s 7m14s 15 34,923 0 276ms 3m35s 4m23s 5m19s 16 16,929 0 297ms 2m10s 2m47s 3m37s 17 17,588 0 291ms 2m1s 2m24s 3m18s 18 18,672 0 312ms 2m17s 2m51s 3m24s 19 19,648 0 293ms 2m18s 2m56s 3m31s 20 6,495 0 287ms 41s474ms 1m38s 2m11s 21 2,326 0 195ms 9s248ms 10s754ms 20s26ms 22 2,626 0 198ms 10s933ms 13s262ms 21s168ms 23 3,029 0 198ms 17s99ms 19s775ms 29s917ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Jul 15 00 0 0 0 0 0ms 0ms 0ms 0ms 01 0 0 0 0 0ms 0ms 0ms 0ms 02 0 51 0 0 156ms 0ms 0ms 0ms 03 0 316 0 0 159ms 0ms 1s898ms 5s324ms 04 0 4 0 0 367ms 0ms 0ms 0ms 05 0 0 0 0 0ms 0ms 0ms 0ms 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 0 0 0 0ms 0ms 0ms 0ms 08 0 34 1 0 177ms 0ms 0ms 965ms 09 0 0 0 0 0ms 0ms 0ms 0ms 10 0 4 0 0 217ms 0ms 0ms 0ms 11 0 692 10 0 216ms 2s32ms 3s707ms 8s35ms 12 0 2,845 44 0 242ms 9s50ms 14s593ms 42s595ms 13 0 3,882 49 0 227ms 11s125ms 22s212ms 46s344ms 14 0 2,599 27 0 247ms 9s955ms 14s311ms 31s577ms 15 0 4,016 92 0 262ms 15s303ms 23s485ms 45s988ms 16 0 1,933 54 0 251ms 7s607ms 12s120ms 25s683ms 17 0 2,678 40 0 328ms 9s679ms 19s922ms 50s569ms 18 0 2,853 96 0 323ms 12s505ms 21s254ms 42s905ms 19 0 3,251 53 0 227ms 11s593ms 19s121ms 33s395ms 20 0 851 26 0 221ms 2s811ms 5s862ms 13s529ms 21 0 0 0 0 0ms 0ms 0ms 0ms 22 0 5 0 0 163ms 0ms 0ms 0ms 23 0 13 117 0 4s303ms 0ms 23s981ms 43s744ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Jul 15 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 Jul 15 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 Jul 15 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 Jul 15 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 Jul 15 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) Jul 15 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 Jul 15 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 Jul 15 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 Jul 15 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
- 147 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query 1 40 2m1s 1s552ms 11s471ms 3s46ms 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 != 1534078 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 != 1534078 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-07-15 12:34:14
-
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 != 1533975 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 != 1533975 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-07-15 12:08:27
-
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 != 1536322 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 != 1536322 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-07-15 17:47:46
2 16 1m12s 1s31ms 21s117ms 4s537ms update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;-
UPDATE product_warehouse_inventory SET qty_available = 62.0 WHERE product_id = 194198 AND warehouse_id = 35 AND company_id = 1;
Date: 2024-07-15 12:46:56
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 221785 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-07-15 17:49:46
-
UPDATE product_warehouse_inventory SET qty_available = 2.0 WHERE product_id = 176362 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-07-15 15:25:56
3 14 1m10s 1s384ms 11s960ms 5s31ms update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 220169 AND warehouse_id = 42;
Date: 2024-07-15 18:36:13
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223222 AND warehouse_id = 43;
Date: 2024-07-15 12:48:50
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 194198 AND warehouse_id = 35;
Date: 2024-07-15 12:46:44
4 16 42s35ms 3s224ms 5s626ms 2s627ms update product_warehouse_inventory set qty_reserve = ?.? where product_id = ? and warehouse_id = ?;-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 209510 AND warehouse_id = 45;
Date: 2024-07-15 18:40:45
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 221785 AND warehouse_id = 43;
Date: 2024-07-15 17:49:40
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 209510 AND warehouse_id = 45;
Date: 2024-07-15 18:41:00
5 12 36s560ms 2s178ms 6s861ms 3s46ms 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" = 5563777, "write_uid" = 958, "write_date" = (now() at time zone 'UTC') WHERE id IN (1534021);
Date: 2024-07-15 12:19:04
-
UPDATE "account_move" SET "message_main_attachment_id" = 5564463, "write_uid" = 1045, "write_date" = (now() at time zone 'UTC') WHERE id IN (1534878);
Date: 2024-07-15 13:50:41
6 3 26s683ms 9s648ms 9s648ms 8s894ms update product_warehouse_inventory set qty_mtd_sold = ? - ? where product_id = ? and warehouse_id = ?;-
UPDATE product_warehouse_inventory SET qty_mtd_sold = 0 - 0 WHERE product_id = 220169 AND warehouse_id = 42;
Date: 2024-07-15 18:36:36
-
UPDATE product_warehouse_inventory SET qty_mtd_sold = 0 - 0 WHERE product_id = 223222 AND warehouse_id = 43;
Date: 2024-07-15 12:49:15
-
UPDATE product_warehouse_inventory SET qty_mtd_sold = 0 - 0 WHERE product_id = 245149 AND warehouse_id = 45;
Date: 2024-07-15 19:08:58
7 12 25s322ms 2s71ms 4s637ms 2s110ms update "product_warehouse_inventory" set "loc_check_qty" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "product_warehouse_inventory" SET "loc_check_qty" = 6.0, "write_uid" = 1012, "write_date" = (now() at time zone 'UTC') WHERE id IN (37984);
Date: 2024-07-15 18:38:40
-
UPDATE "product_warehouse_inventory" SET "loc_check_qty" = 186.0, "write_uid" = 1025, "write_date" = (now() at time zone 'UTC') WHERE id IN (332050);
Date: 2024-07-15 12:31:12
-
UPDATE "product_warehouse_inventory" SET "loc_check_qty" = 6.0, "write_uid" = 977, "write_date" = (now() at time zone 'UTC') WHERE id IN (366803, 366804);
Date: 2024-07-15 12:32:03
8 3 19s369ms 7s881ms 9s332ms 6s456ms update product_warehouse_inventory set qty_on_order = ? where product_id = ? and warehouse_id = ?;-
UPDATE product_warehouse_inventory SET qty_on_order = 0 WHERE product_id = 247744 AND warehouse_id = 42;
Date: 2024-07-15 16:52:33
-
UPDATE product_warehouse_inventory SET qty_on_order = 0 WHERE product_id = 194970 AND warehouse_id = 35;
Date: 2024-07-15 12:46:59
-
UPDATE product_warehouse_inventory SET qty_on_order = 0 WHERE product_id = 195574 AND warehouse_id = 36;
Date: 2024-07-15 17:27:02
9 8 18s124ms 3s275ms 5s505ms 2s265ms update product_warehouse_inventory set qty_on_order = ?.? where product_id = ? and warehouse_id = ?;-
UPDATE product_warehouse_inventory SET qty_on_order = 8.0 WHERE product_id = 203863 AND warehouse_id = 45;
Date: 2024-07-15 18:22:47
-
UPDATE product_warehouse_inventory SET qty_on_order = 3.0 WHERE product_id = 209168 AND warehouse_id = 35;
Date: 2024-07-15 18:38:29
-
UPDATE product_warehouse_inventory SET qty_on_order = 4.0 WHERE product_id = 207666 AND warehouse_id = 36;
Date: 2024-07-15 12:47:00
10 2 16s374ms 15s277ms 15s277ms 8s187ms 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 = 2 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 = 2 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-07-15 18:47:10
11 1 15s506ms 15s506ms 15s506ms 15s506ms update "edi_810_invoice" set "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "edi_810_invoice" SET "write_uid" = 1213, "write_date" = (now() at time zone 'UTC') WHERE id IN (52783);
Date: 2024-07-15 17:07:15
12 5 14s347ms 1s11ms 5s709ms 2s869ms update product_warehouse_inventory set qty_mtd_sold = ?.? - ? where product_id = ? and warehouse_id = ?;-
UPDATE product_warehouse_inventory SET qty_mtd_sold = 4.0 - 0 WHERE product_id = 213625 AND warehouse_id = 37;
Date: 2024-07-15 17:34:38
-
UPDATE product_warehouse_inventory SET qty_mtd_sold = 2.0 - 0 WHERE product_id = 173638 AND warehouse_id = 38;
Date: 2024-07-15 16:11:29
-
UPDATE product_warehouse_inventory SET qty_mtd_sold = 12.0 - 0 WHERE product_id = 187783 AND warehouse_id = 41;
Date: 2024-07-15 13:57:50
13 3 9s303ms 1s851ms 5s280ms 3s101ms select "ir_model_fields".id from "ir_model_fields" where ("ir_model_fields"."model" = ?) order by "ir_model_fields"."name";-
SELECT "ir_model_fields".id FROM "ir_model_fields" WHERE ("ir_model_fields"."model" = 'product.template') ORDER BY "ir_model_fields"."name";
Date: 2024-07-15 10:33:26
-
SELECT "ir_model_fields".id FROM "ir_model_fields" WHERE ("ir_model_fields"."model" = 'psd_custom.inventory_vendor') ORDER BY "ir_model_fields"."name";
Date: 2024-07-15 10:33:26
-
SELECT "ir_model_fields".id FROM "ir_model_fields" WHERE ("ir_model_fields"."model" = 'psd_custom.inventory_vendor') ORDER BY "ir_model_fields"."name";
Date: 2024-07-15 10:33:26
14 2 5s410ms 4s265ms 4s265ms 2s705ms update "account_move" set "access_token" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "account_move" SET "access_token" = '3bb1f9b8-4f64-424c-87ec-37895decaf2a', "write_uid" = 953, "write_date" = (now() at time zone 'UTC') WHERE id IN (1535124);
Date: 2024-07-15 14:25:35
15 4 4s744ms 1s104ms 1s434ms 1s186ms update product_warehouse_inventory set qty_ytd_sold = ?.? where product_id = ? and warehouse_id = ?;-
UPDATE product_warehouse_inventory SET qty_ytd_sold = 8.0 WHERE product_id = 176362 AND warehouse_id = 46;
Date: 2024-07-15 15:25:55
-
UPDATE product_warehouse_inventory SET qty_ytd_sold = 12.0 WHERE product_id = 215612 AND warehouse_id = 46;
Date: 2024-07-15 20:03:42
-
UPDATE product_warehouse_inventory SET qty_ytd_sold = 5.0 WHERE product_id = 206606 AND warehouse_id = 36;
Date: 2024-07-15 17:17:50
16 1 3s981ms 3s981ms 3s981ms 3s981ms delete from stock_inventory_line where id in (...);-
DELETE FROM stock_inventory_line WHERE id IN (3056673, 3056671, 3056672, 3056674, 3056675, 3056676, 3056670, 3056677, 3056678, 3056679, 3056680, 3056681);
Date: 2024-07-15 18:04:41
-
DELETE FROM stock_inventory_line WHERE id IN (3056682);
Date: 2024-07-15 18:05:59
-
DELETE FROM stock_inventory_line WHERE id IN (3056683);
Date: 2024-07-15 18:59:07
17 2 3s353ms 1s833ms 1s833ms 1s676ms update account_bank_statement_line set is_processed = false where statement_id = ?;-
UPDATE account_bank_statement_line SET is_processed = False where statement_id = 180;
Date: 2024-07-15 14:18:15
18 1 1s585ms 1s585ms 1s585ms 1s585ms select f.name, d.json_value from ir_default d join ir_model_fields f on d.field_id = f.id where f.model = ? and (d.user_id is null or d.user_id = ?) and (d.company_id is null or d.company_id = ?) and d.condition is null order by d.user_id, d.company_id, d.id;-
SELECT f.name, d.json_value FROM ir_default d JOIN ir_model_fields f ON d.field_id = f.id WHERE f.model = 'website.visitor' AND (d.user_id IS NULL OR d.user_id = 4) AND (d.company_id IS NULL OR d.company_id = 1) AND d.condition IS NULL ORDER BY d.user_id, d.company_id, d.id;
Date: 2024-07-15 10:33:26
-
SELECT f.name, d.json_value FROM ir_default d JOIN ir_model_fields f ON d.field_id = f.id WHERE f.model = 'website.visitor' AND (d.user_id IS NULL OR d.user_id = 4) AND (d.company_id IS NULL OR d.company_id = 1) AND d.condition IS NULL ORDER BY d.user_id, d.company_id, d.id;
Date: 2024-07-15 10:33:26
19 1 1s168ms 1s168ms 1s168ms 1s168ms update "product_warehouse_inventory" set "last_used_date" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "product_warehouse_inventory" SET "last_used_date" = '2024-07-15', "write_uid" = 1001, "write_date" = (now() at time zone 'UTC') WHERE id IN (14720, 14372, 14375, 14376, 14667, 14353, 14737, 14709, 104889, 14686, 14463);
Date: 2024-07-15 14:35:12
20 1 1s157ms 1s157ms 1s157ms 1s157ms insert into "sale_order" ("id", "create_uid", "create_date", "write_uid", "write_date", "analytic_account_id", "branch_id", "campaign_id", "carrier_id", "cart_recovery_email_sent", "client_order_ref", "commitment_date", "company_id", "date_order", "delivery", "exception_sale", "expense_choice", "fiscal_position_id", "incoterm", "is_cash_sale_order", "is_core_sale", "is_order_unlock", "is_self_used", "marked_as_lost", "medium_id", "name", "note", "opportunity_id", "order_type", "origin", "override_return_rule", "partner_id", "partner_invoice_id", "partner_shipping_id", "payment_term_id", "payment_term_need_password", "picking_policy", "pricelist_id", "project_id", "recompute_delivery_price", "require_payment", "require_signature", "sale_action", "sale_order_template_id", "sale_part_id", "sale_product_qty", "show_update_pricelist", "signed_by", "signed_on", "source_id", "special_instructions", "state", "team_id", "user_id", "validity_date", "warehouse_id") values (nextval(?), ?, (now() at time zone ?), ?, (now() at time zone ?), null, ?, null, ?, false, null, null, ?, ?, null, false, null, null, null, true, false, false, false, false, null, ?, ?, null, ?, null, false, ?, ?, ?, ?, false, ?, ?, null, false, false, false, ?, null, ?, ?.?, false, null, null, null, null, ?, ?, ?, ?, ?) returning id;-
INSERT INTO "sale_order" ("id", "create_uid", "create_date", "write_uid", "write_date", "analytic_account_id", "branch_id", "campaign_id", "carrier_id", "cart_recovery_email_sent", "client_order_ref", "commitment_date", "company_id", "date_order", "delivery", "exception_sale", "expense_choice", "fiscal_position_id", "incoterm", "is_cash_sale_order", "is_core_sale", "is_order_unlock", "is_self_used", "marked_as_lost", "medium_id", "name", "note", "opportunity_id", "order_type", "origin", "override_return_rule", "partner_id", "partner_invoice_id", "partner_shipping_id", "payment_term_id", "payment_term_need_password", "picking_policy", "pricelist_id", "project_id", "recompute_delivery_price", "require_payment", "require_signature", "sale_action", "sale_order_template_id", "sale_part_id", "sale_product_qty", "show_update_pricelist", "signed_by", "signed_on", "source_id", "special_instructions", "state", "team_id", "user_id", "validity_date", "warehouse_id") VALUES (nextval('sale_order_id_seq'), 990, (now() at time zone 'UTC'), 990, (now() at time zone 'UTC'), NULL, 48, NULL, 78, false, NULL, NULL, 1, '2024-07-15 17:06:31', NULL, false, NULL, NULL, NULL, true, false, false, false, false, NULL, 'T-26678', '', NULL, 'sale', NULL, false, 46272, 46272, 46272, 112, false, 'direct', 35, NULL, false, false, false, 1, NULL, 203804, 1.0, false, NULL, NULL, NULL, NULL, 'draft', 1, 990, '2025-01-11', 45) RETURNING id;
Date: 2024-07-15 17:06:50
Queries that waited the most
Rank Wait time Query 1 21s117ms UPDATE product_warehouse_inventory SET qty_available = 4.0 WHERE product_id = 243501 AND warehouse_id = 43 AND company_id = 1;[ Date: 2024-07-15 13:22:43 ]
2 15s506ms UPDATE "edi_810_invoice" SET "write_uid" = 1213, "write_date" = (now() at time zone 'UTC') WHERE id IN (52783);[ Date: 2024-07-15 17:07:15 ]
3 15s277ms 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 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') ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-07-15 18:47:10 ]
4 11s960ms UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 220169 AND warehouse_id = 42;[ Date: 2024-07-15 18:36:13 ]
5 11s471ms 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 != 1537200 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 != 1537200 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-07-15 19:59:54 ]
6 10s339ms UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223222 AND warehouse_id = 43;[ Date: 2024-07-15 12:48:50 ]
7 9s648ms UPDATE product_warehouse_inventory SET qty_mtd_sold = 0 - 0 WHERE product_id = 220169 AND warehouse_id = 42;[ Date: 2024-07-15 18:36:36 ]
8 9s517ms UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 223222 AND warehouse_id = 43 AND company_id = 1;[ Date: 2024-07-15 12:48:59 ]
9 9s445ms UPDATE product_warehouse_inventory SET qty_mtd_sold = 0 - 0 WHERE product_id = 223222 AND warehouse_id = 43;[ Date: 2024-07-15 12:49:15 ]
10 9s332ms UPDATE product_warehouse_inventory SET qty_on_order = 0 WHERE product_id = 223222 AND warehouse_id = 43;[ Date: 2024-07-15 12:49:25 ]
11 8s704ms 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 != 1534949 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 != 1534949 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-07-15 13:58:09 ]
12 8s387ms UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 194198 AND warehouse_id = 35;[ Date: 2024-07-15 12:46:44 ]
13 7s881ms UPDATE product_warehouse_inventory SET qty_on_order = 0 WHERE product_id = 245149 AND warehouse_id = 45;[ Date: 2024-07-15 19:09:05 ]
14 7s588ms UPDATE product_warehouse_inventory SET qty_mtd_sold = 0 - 0 WHERE product_id = 245149 AND warehouse_id = 45;[ Date: 2024-07-15 19:08:58 ]
15 7s484ms UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 245149 AND warehouse_id = 45 AND company_id = 1;[ Date: 2024-07-15 19:08:44 ]
16 7s206ms UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 213625 AND warehouse_id = 37;[ Date: 2024-07-15 17:34:29 ]
17 6s861ms UPDATE "account_move" SET "message_main_attachment_id" = 5563623, "write_uid" = 979, "write_date" = (now() at time zone 'UTC') WHERE id IN (1533955);[ Date: 2024-07-15 12:00:55 ]
18 6s114ms UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 220159 AND warehouse_id = 36;[ Date: 2024-07-15 13:15:49 ]
19 5s916ms 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 != 1536106 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 != 1536106 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-07-15 17:12:03 ]
20 5s717ms UPDATE product_warehouse_inventory SET qty_available = 4.0 WHERE product_id = 220169 AND warehouse_id = 42 AND company_id = 1;[ Date: 2024-07-15 18:36:19 ]
-
Queries
Queries by type
Key values
- 231,402 Total read queries
- 26,813 Total write queries
Queries by database
Key values
- unknown Main database
- 258,215 Requests
- 21h14m11s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 258,477 Requests
User Request type Count Duration unknown Total 258,477 21h15m16s copy to 113 13m46s cte 64 24s412ms delete 609 40m10s select 231,664 18h57m49s update 26,027 1h23m6s Duration by user
Key values
- 21h15m16s (unknown) Main time consuming user
User Request type Count Duration unknown Total 258,477 21h15m16s copy to 113 13m46s cte 64 24s412ms delete 609 40m10s select 231,664 18h57m49s update 26,027 1h23m6s Queries by host
Key values
- unknown Main host
- 258,477 Requests
- 21h15m16s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 258,215 Requests
- 21h14m11s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-07-15 19:46:42 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 231,753 100-500ms duration
Slowest individual queries
Rank Duration Query 1 4m1s 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-07-15 09:10:22 ]
2 2m2s 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-07-15 09:04:04 ]
3 1m59s 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-07-15 09:06:20 ]
4 1m9s SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 15:00:19 ]
5 1m4s SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 14:56:35 ]
6 1m2s SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 14:50:07 ]
7 1m SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 14:48:58 ]
8 59s841ms SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 15:45:49 ]
9 58s986ms SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 15:48:15 ]
10 57s177ms SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 16:55:51 ]
11 56s620ms SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 15:46:51 ]
12 56s604ms SELECT "item_list_line".id FROM "item_list_line" WHERE ("item_list_line"."product_id" in (267926)) ORDER BY "item_list_line"."id";[ Date: 2024-07-15 11:35:21 ]
13 55s669ms DELETE FROM account_move_line WHERE id IN (5407281, 5407282, 5407283, 5407284, 5407285, 5407286, 5407287, 5407288, 5407289, 5407290, 5407291, 5407292, 5407293, 5407294, 5407295, 5407296, 5407297, 5407298, 5407299, 5407300, 5407301, 5407302, 5407303, 5407304);[ Date: 2024-07-15 17:07:05 ]
14 54s644ms SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 17:11:13 ]
15 54s190ms SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 16:54:49 ]
16 53s980ms SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 15:49:23 ]
17 52s429ms SELECT partner.id as partner_id, ful.id as followup_level, CASE WHEN partner.balance <= 0 THEN 'no_action_needed' WHEN in_need_of_action_aml.id IS NOT NULL AND (prop_date.value_datetime IS NULL OR prop_date.value_datetime::date <= '2024-07-15'::date) THEN 'in_need_of_action' WHEN exceeded_unreconciled_aml.id IS NOT NULL THEN 'with_overdue_invoices' ELSE 'no_action_needed' END as followup_status FROM ( SELECT partner.id, max(current_followup_level.delay) as followup_delay, SUM(aml.balance) as balance FROM res_partner partner JOIN account_move_line aml ON aml.partner_id = partner.id JOIN account_account account ON account.id = aml.account_id JOIN account_move move ON move.id = aml.move_id -- Get the followup level LEFT JOIN LATERAL ( SELECT COALESCE(next_ful.id, ful.id) as id, COALESCE(next_ful.delay, ful.delay) as delay FROM account_move_line line LEFT OUTER JOIN account_followup_followup_line ful ON ful.id = aml.followup_line_id LEFT OUTER JOIN account_followup_followup_line next_ful ON next_ful.id = ( SELECT next_ful.id FROM account_followup_followup_line next_ful WHERE next_ful.delay > COALESCE(ful.delay, -999) AND COALESCE(aml.date_maturity, aml.date) + next_ful.delay <= '2024-07-15'::date AND next_ful.company_id = 1 ORDER BY next_ful.delay ASC LIMIT 1) WHERE line.id = aml.id AND aml.partner_id = partner.id AND aml.balance > 0) current_followup_level ON true WHERE account.deprecated IS NOT TRUE AND account.internal_type = 'receivable' AND move.state = 'posted' AND aml.reconciled IS NOT TRUE AND aml.blocked IS FALSE AND aml.company_id = 1 GROUP BY partner.id) partner LEFT JOIN account_followup_followup_line ful ON ful.delay = partner.followup_delay AND ful.company_id = 1 -- Get the followup status data LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id LEFT JOIN account_followup_followup_line ful ON ful.id = line.followup_line_id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(ful.delay, -999) < partner.followup_delay AND COALESCE(line.date_maturity, line.date) + COALESCE(ful.delay, -999) <= '2024-07-15'::date LIMIT 1) in_need_of_action_aml ON true LEFT OUTER JOIN LATERAL ( SELECT line.id FROM account_move_line line JOIN account_account account ON line.account_id = account.id JOIN account_move move ON line.move_id = move.id WHERE line.partner_id = partner.id AND account.internal_type = 'receivable' AND account.deprecated IS NOT TRUE AND move.state = 'posted' AND line.reconciled IS NOT TRUE AND line.balance > 0 AND line.blocked IS FALSE AND line.company_id = 1 AND COALESCE(line.date_maturity, line.date) <= '2024-07-15'::date LIMIT 1) exceeded_unreconciled_aml ON true LEFT OUTER JOIN ir_property prop_date ON prop_date.res_id = CONCAT('res.partner,', partner.id) AND prop_date.name = 'payment_next_action_date' AND prop_date.company_id = 1;[ Date: 2024-07-15 17:10:13 ]
18 51s962ms DELETE FROM account_move_line WHERE id IN (5401779, 5401780, 5401781, 5401782, 5401783, 5401784, 5401785, 5401786, 5401787, 5401788, 5401789, 5401790, 5401791, 5401792, 5401793, 5401794, 5401795, 5401796, 5401797, 5401798, 5401799, 5401800, 5401801, 5401802, 5401803, 5401804, 5401805);[ Date: 2024-07-15 23:43:17 ]
19 47s965ms DELETE FROM account_move_line WHERE id IN (5407316, 5407317, 5407318, 5407319, 5407320, 5407321, 5407322, 5407323, 5407324, 5407325, 5407326, 5407327, 5407328, 5407329, 5407330, 5407331, 5407332, 5407333, 5407334, 5407335, 5407336, 5407337, 5407338);[ Date: 2024-07-15 17:11:55 ]
20 44s111ms DELETE FROM account_move_line WHERE id IN (5407527, 5407528, 5407529, 5407530, 5407531, 5407532, 5407533, 5407534, 5407535, 5407536, 5407537, 5407538, 5407539, 5407540, 5407541, 5407542, 5407543, 5407544, 5407545, 5407546, 5407547, 5407548);[ Date: 2024-07-15 17:14:55 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 5h27m35s 74,312 120ms 2s462ms 264ms 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 Jul 15 00 449 56s799ms 126ms 01 380 56s393ms 148ms 02 420 1m1s 146ms 03 720 1m55s 160ms 04 304 46s864ms 154ms 05 223 31s74ms 139ms 06 299 47s60ms 157ms 07 396 1m 152ms 08 443 1m6s 149ms 09 606 1m23s 137ms 10 758 1m40s 133ms 11 2,576 7m40s 178ms 12 6,169 25m34s 248ms 13 8,247 45m28s 330ms 14 8,902 50m33s 340ms 15 8,976 44m5s 294ms 16 7,155 33m21s 279ms 17 6,653 31m10s 281ms 18 6,572 30m51s 281ms 19 6,901 26m34s 231ms 20 2,923 8m33s 175ms 21 1,409 3m43s 158ms 22 1,511 4m2s 160ms 23 1,320 3m48s 172ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1043"', '["pointspring_master","calendar.alarm",19581]', '["pointspring_master","mail.channel",64]', '["pointspring_master","mail.channel",521]', '["pointspring_master","res.partner",19581]', '["pointspring_master","ir.needaction",19581]'))) ORDER BY "bus_bus"."id";
Date: 2024-07-15 16:47:04 Duration: 2s462ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') AND ("bus_bus"."channel" in ('["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","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-07-15 16:47:04 Duration: 2s454ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') 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-07-15 16:47:04 Duration: 2s426ms
2 2h5m48s 19,355 268ms 3s656ms 390ms 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 #2
Day Hour Count Duration Avg duration Jul 15 02 140 45s4ms 321ms 03 918 5m1s 328ms 08 24 7s856ms 327ms 11 908 5m16s 349ms 12 2,348 15m27s 394ms 13 3,128 21m31s 412ms 14 1,833 12m48s 419ms 15 1,623 11m21s 420ms 16 1,098 6m55s 378ms 17 1,664 10m31s 379ms 18 2,351 14m56s 381ms 19 2,719 17m24s 384ms 20 575 3m31s 367ms 22 12 3s845ms 320ms 23 14 4s600ms 328ms -
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-07-15 14:50:50 Duration: 3s656ms
-
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-07-15 15:34:37 Duration: 2s904ms
-
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-07-15 14:32:35 Duration: 2s854ms
3 59m 3,686 584ms 3s599ms 960ms 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 #3
Day Hour Count Duration Avg duration Jul 15 11 417 5m36s 806ms 12 692 10m28s 907ms 13 490 8m55s 1s92ms 14 418 7m53s 1s131ms 15 267 5m26s 1s222ms 16 247 3m39s 886ms 17 365 5m19s 874ms 18 266 3m57s 893ms 19 346 5m27s 945ms 20 172 2m14s 780ms 23 6 4s268ms 711ms -
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 ('%%g95111%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g95111%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g95111%'))) 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-07-15 14:50:50 Duration: 3s599ms
-
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 ('%%g95111%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g95111-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g95111-%'))) 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-07-15 14:50:50 Duration: 3s290ms
-
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 ('%%489XR%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489XR%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489XR%'))) 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-07-15 15:34:38 Duration: 3s213ms
4 44m53s 18,941 120ms 895ms 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 #4
Day Hour Count Duration Avg duration Jul 15 02 15 1s985ms 132ms 03 147 18s724ms 127ms 11 312 45s542ms 145ms 12 849 1m57s 138ms 13 3,292 7m58s 145ms 14 5,037 12m12s 145ms 15 5,450 12m49s 141ms 16 1,255 2m53s 138ms 17 1,165 2m37s 134ms 18 394 55s739ms 141ms 19 930 2m9s 139ms 20 95 12s319ms 129ms -
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 206656 AND warehouse_id = 44 AND company_id = 1;
Date: 2024-07-15 13:18:29 Duration: 895ms
-
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 203725 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-07-15 14:53:37 Duration: 881ms
-
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 171812 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-07-15 18:30:32 Duration: 780ms
5 39m52s 2,768 318ms 2s351ms 864ms select id from product_warehouse_inventory where coalesce(loc_check_qty, ?) < coalesce(max_product_uom_qty, ?);Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Jul 15 11 353 4m34s 776ms 12 182 2m32s 840ms 13 1,101 16m34s 902ms 14 1,017 15m16s 901ms 16 42 26s490ms 630ms 18 51 20s66ms 393ms 19 22 8s550ms 388ms -
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 14:32:13 Duration: 2s351ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 13:18:29 Duration: 1s965ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 13:18:29 Duration: 1s962ms
6 26m36s 2,689 435ms 2s62ms 593ms 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 #6
Day Hour Count Duration Avg duration Jul 15 00 3 1s311ms 437ms 02 2 902ms 451ms 05 3 1s331ms 443ms 06 1 437ms 437ms 07 2 871ms 435ms 08 9 3s990ms 443ms 10 17 7s655ms 450ms 11 171 1m20s 470ms 12 379 3m32s 560ms 13 338 3m44s 663ms 14 302 3m30s 697ms 15 346 3m55s 679ms 16 227 2m7s 561ms 17 217 1m54s 529ms 18 214 2m3s 576ms 19 308 2m55s 569ms 20 143 1m12s 506ms 23 7 3s331ms 475ms -
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-07-15 14:29:22 Duration: 2s62ms
-
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.assets_backend.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-d7fc930/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-07-15 16:52:33 Duration: 1s959ms
-
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.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-9ded8a0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-07-15 14:29:25 Duration: 1s954ms
7 26m25s 243 1s906ms 55s669ms 6s523ms delete from account_move_line where id in (...);Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Jul 15 12 16 45s941ms 2s871ms 13 20 1m22s 4s129ms 14 9 1m8s 7s617ms 15 39 2m46s 4s264ms 16 10 1m12s 7s237ms 17 13 5m3s 23s319ms 18 28 4m43s 10s134ms 19 8 1m10s 8s804ms 23 100 8m12s 4s920ms -
DELETE FROM account_move_line WHERE id IN (5407281, 5407282, 5407283, 5407284, 5407285, 5407286, 5407287, 5407288, 5407289, 5407290, 5407291, 5407292, 5407293, 5407294, 5407295, 5407296, 5407297, 5407298, 5407299, 5407300, 5407301, 5407302, 5407303, 5407304);
Date: 2024-07-15 17:07:05 Duration: 55s669ms
-
DELETE FROM account_move_line WHERE id IN (5401779, 5401780, 5401781, 5401782, 5401783, 5401784, 5401785, 5401786, 5401787, 5401788, 5401789, 5401790, 5401791, 5401792, 5401793, 5401794, 5401795, 5401796, 5401797, 5401798, 5401799, 5401800, 5401801, 5401802, 5401803, 5401804, 5401805);
Date: 2024-07-15 23:43:17 Duration: 51s962ms
-
DELETE FROM account_move_line WHERE id IN (5407316, 5407317, 5407318, 5407319, 5407320, 5407321, 5407322, 5407323, 5407324, 5407325, 5407326, 5407327, 5407328, 5407329, 5407330, 5407331, 5407332, 5407333, 5407334, 5407335, 5407336, 5407337, 5407338);
Date: 2024-07-15 17:11:55 Duration: 47s965ms
8 25m51s 10,395 120ms 916ms 149ms select id from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Jul 15 02 2 242ms 121ms 03 46 7s155ms 155ms 11 142 23s192ms 163ms 12 671 1m39s 148ms 13 2,052 5m14s 153ms 14 2,485 6m19s 152ms 15 2,668 6m28s 145ms 16 535 1m20s 149ms 17 580 1m22s 142ms 18 440 1m4s 146ms 19 697 1m40s 144ms 20 77 11s38ms 143ms -
select id from product_warehouse_inventory where product_id = 220733 and warehouse_id = 37 and company_id = 1;
Date: 2024-07-15 15:46:30 Duration: 916ms
-
select id from product_warehouse_inventory where product_id = 222332 and warehouse_id = 43 and company_id = 1;
Date: 2024-07-15 13:24:30 Duration: 877ms
-
select id from product_warehouse_inventory where product_id = 251368 and warehouse_id = 37 and company_id = 1;
Date: 2024-07-15 16:29:50 Duration: 795ms
9 22m13s 9,355 120ms 965ms 142ms select coalesce(replenish_branch_id, ?) as replenish_branch_id from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Jul 15 02 6 780ms 130ms 03 68 9s76ms 133ms 11 151 22s724ms 150ms 12 423 1m 141ms 13 1,615 3m54s 145ms 14 2,490 6m2s 145ms 15 2,728 6m24s 140ms 16 615 1m25s 139ms 17 579 1m19s 137ms 18 180 25s132ms 139ms 19 446 1m2s 140ms 20 54 6s890ms 127ms -
SELECT COALESCE(replenish_branch_id, 0) as replenish_branch_id FROM product_warehouse_inventory WHERE product_id = 206656 AND warehouse_id = 44 AND company_id = 1;
Date: 2024-07-15 13:18:28 Duration: 965ms
-
SELECT COALESCE(replenish_branch_id, 0) as replenish_branch_id FROM product_warehouse_inventory WHERE product_id = 242073 AND warehouse_id = 41 AND company_id = 1;
Date: 2024-07-15 14:53:36 Duration: 942ms
-
SELECT COALESCE(replenish_branch_id, 0) as replenish_branch_id FROM product_warehouse_inventory WHERE product_id = 244362 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-07-15 14:32:11 Duration: 793ms
10 19m59s 7,509 120ms 1s507ms 159ms 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 #10
Day Hour Count Duration Avg duration Jul 15 08 14 1s872ms 133ms 10 1 132ms 132ms 11 196 27s170ms 138ms 12 836 2m11s 157ms 13 1,144 3m4s 161ms 14 829 2m17s 166ms 15 1,074 3m2s 169ms 16 489 1m19s 161ms 17 631 1m37s 154ms 18 1,193 3m7s 156ms 19 781 2m 154ms 20 320 48s597ms 151ms 23 1 120ms 120ms -
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 191092 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-07-15 18:14:48 Duration: 1s507ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 247744 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-07-15 16:52:31 Duration: 991ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 191083 and sol.warehouse_id = 35 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-07-15 17:45:04 Duration: 882ms
11 18m27s 6,950 120ms 980ms 159ms select id from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Jul 15 02 1 123ms 123ms 03 17 2s800ms 164ms 10 1 132ms 132ms 11 89 13s484ms 151ms 12 885 2m22s 160ms 13 1,323 3m33s 161ms 14 965 2m35s 161ms 15 1,131 3m2s 161ms 16 344 54s666ms 158ms 17 437 1m8s 156ms 18 783 2m 153ms 19 816 2m9s 158ms 20 158 24s363ms 154ms -
select id from product_warehouse_inventory where product_id = 203327 and warehouse_id = 41 and company_id = 1;
Date: 2024-07-15 15:28:08 Duration: 980ms
-
select id from product_warehouse_inventory where product_id = 206656 and warehouse_id = 44 and company_id = 1;
Date: 2024-07-15 13:18:30 Duration: 815ms
-
select id from product_warehouse_inventory where product_id = 222180 and warehouse_id = 43 and company_id = 1;
Date: 2024-07-15 13:24:31 Duration: 733ms
12 17m43s 2,874 307ms 1s513ms 370ms 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"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Jul 15 00 283 1m30s 320ms 01 69 21s797ms 315ms 02 9 2s851ms 316ms 03 18 5s666ms 314ms 04 222 1m10s 318ms 05 105 33s305ms 317ms 06 84 26s663ms 317ms 07 117 37s198ms 317ms 08 177 56s301ms 318ms 09 12 3s822ms 318ms 10 3 957ms 319ms 11 12 3s989ms 332ms 12 3 947ms 315ms 13 184 1m36s 525ms 14 106 55s497ms 523ms 15 165 1m24s 513ms 16 219 1m26s 396ms 17 141 51s258ms 363ms 18 180 1m11s 399ms 19 183 1m15s 413ms 20 57 18s979ms 332ms 21 192 1m1s 319ms 22 189 1m 318ms 23 144 45s833ms 318ms -
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 16:37:39 Duration: 1s513ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:47:30 Duration: 1s423ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:47:28 Duration: 1s293ms
13 17m25s 5,530 148ms 2s905ms 189ms update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Jul 15 02 5 807ms 161ms 03 24 3s918ms 163ms 08 3 487ms 162ms 11 142 24s594ms 173ms 12 728 2m19s 191ms 13 953 3m 188ms 14 508 1m39s 194ms 15 849 2m47s 197ms 16 306 55s893ms 182ms 17 610 1m53s 185ms 18 568 1m46s 188ms 19 665 2m3s 186ms 20 167 29s869ms 178ms 22 1 156ms 156ms 23 1 182ms 182ms -
UPDATE product_warehouse_inventory SET qty_available = 62.0 WHERE product_id = 194198 AND warehouse_id = 35 AND company_id = 1;
Date: 2024-07-15 12:46:56 Duration: 2s905ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 221785 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-07-15 17:49:46 Duration: 1s228ms
-
UPDATE product_warehouse_inventory SET qty_available = 2.0 WHERE product_id = 176362 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-07-15 15:25:56 Duration: 833ms
14 17m23s 1,062 592ms 2s639ms 982ms 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 #14
Day Hour Count Duration Avg duration Jul 15 11 2 2s298ms 1s149ms 12 125 2m8s 1s24ms 13 208 3m22s 974ms 14 102 1m52s 1s106ms 15 180 3m28s 1s159ms 16 19 14s750ms 776ms 17 109 1m26s 797ms 18 203 3m11s 943ms 19 97 1m21s 844ms 20 17 13s599ms 799ms -
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 ('%%12x1%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%1/2x1%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%1/2x1%'))) 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-07-15 13:15:50 Duration: 2s639ms
-
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 ('%%12x12%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%1/2x12%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%1/2x12%'))) 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-07-15 13:15:50 Duration: 2s394ms
-
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 ('%%34%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%3/4%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%3/4%'))) 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-07-15 15:26:48 Duration: 2s123ms
15 16m33s 2,733 305ms 2s291ms 363ms 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"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Jul 15 00 198 1m3s 318ms 01 117 36s787ms 314ms 02 12 3s776ms 314ms 03 12 3s760ms 313ms 04 165 51s982ms 315ms 05 108 33s950ms 314ms 06 90 28s479ms 316ms 07 120 37s801ms 315ms 08 165 52s136ms 315ms 09 114 36s84ms 316ms 10 66 20s831ms 315ms 11 15 5s677ms 378ms 12 9 3s287ms 365ms 13 102 55s987ms 548ms 14 120 1m4s 537ms 15 138 1m9s 507ms 16 180 1m10s 393ms 17 147 1m1s 419ms 18 144 54s481ms 378ms 19 108 44s639ms 413ms 20 69 22s434ms 325ms 21 210 1m7s 319ms 22 195 1m2s 321ms 23 129 41s781ms 323ms -
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-07-15 13:40:39 Duration: 2s291ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-07-15 13:52:34 Duration: 1s25ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-07-15 13:58:43 Duration: 977ms
16 15m35s 5,763 123ms 834ms 162ms 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 #16
Day Hour Count Duration Avg duration Jul 15 00 240 34s261ms 142ms 01 240 33s913ms 141ms 02 240 34s279ms 142ms 03 240 35s861ms 149ms 04 240 33s887ms 141ms 05 240 34s57ms 141ms 06 240 34s174ms 142ms 07 240 34s35ms 141ms 08 240 34s181ms 142ms 09 240 34s176ms 142ms 10 240 34s128ms 142ms 11 240 37s963ms 158ms 12 240 44s44ms 183ms 13 240 53s84ms 221ms 14 242 55s430ms 229ms 15 240 53s90ms 221ms 16 240 42s672ms 177ms 17 241 44s304ms 183ms 18 240 43s240ms 180ms 19 240 44s881ms 187ms 20 240 37s133ms 154ms 21 240 34s513ms 143ms 22 240 34s196ms 142ms 23 240 34s284ms 142ms -
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_stat_progress_vacuum', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_operator', 'pg_catalog.pg_language', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_publication', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_description', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_attribute', 'pg_catalog.pg_am', 'pg_catalog.pg_opclass', 'pg_catalog.pg_namespace', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_policies', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_type', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_database', 'pg_catalog.pg_range', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_collation', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_proc', 'pg_catalog.pg_policy', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_depend', 'pg_catalog.pg_cursors', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_constraint', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_trigger', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_cast', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_transform', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_settings', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_views', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_sequences', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_enum', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_conversion', 'pg_catalog.pg_extension', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_indexes', 'pg_catalog.pg_available_extensions', 'information_schema.sql_implementation_info', 'information_schema.key_column_usage', 'information_schema.routine_routine_usage', 'information_schema.role_routine_grants', 'information_schema.tables', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.foreign_tables', 'information_schema.view_table_usage', 'information_schema.view_column_usage', 'information_schema.column_domain_usage', 'information_schema.routine_column_usage', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.foreign_servers', 'information_schema.attributes', 'information_schema.collations', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.sequences', 'information_schema.routines', 'information_schema.constraint_table_usage', 'information_schema.role_column_grants', 'information_schema.parameters', 'information_schema.referential_constraints', 'information_schema.sql_sizing', 'information_schema.role_usage_grants', 'information_schema.applicable_roles', 'information_schema.column_column_usage', 'information_schema.triggers', 'information_schema.domains', 'information_schema.sql_features', 'information_schema.routine_privileges', 'information_schema.routine_sequence_usage', 'information_schema.foreign_server_options', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraints', 'information_schema.domain_constraints', 'information_schema.foreign_data_wrappers', 'information_schema.character_sets', 'information_schema.collation_character_set_applicability', 'information_schema.user_defined_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.domain_udt_usage', 'information_schema.udt_privileges', 'information_schema.triggered_update_columns', 'information_schema.views', 'information_schema.column_options', 'information_schema.administrable_role_authorizations', 'information_schema.table_constraints', 'information_schema.user_mappings', 'information_schema.element_types', 'information_schema.view_routine_usage', 'information_schema.foreign_table_options', 'information_schema.enabled_roles', 'information_schema.schemata', 'information_schema.column_privileges', 'information_schema.user_mapping_options', 'information_schema.routine_table_usage', 'information_schema.data_type_privileges', 'information_schema.columns', 'information_schema.constraint_column_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 17:06:38 Duration: 834ms
-
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_settings', 'pg_catalog.pg_cast', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_depend', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stats', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_amop', 'pg_catalog.pg_language', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_views', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_group', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_tables', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_operator', 'pg_catalog.pg_am', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_trigger', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_proc', 'pg_catalog.pg_extension', 'pg_catalog.pg_database', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_policy', 'pg_catalog.pg_matviews', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_subscription', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_transform', 'pg_catalog.pg_constraint', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_description', 'pg_catalog.pg_rules', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_amproc', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_conversion', 'pg_catalog.pg_sequences', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_opclass', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_range', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_replication_slots', 'information_schema.column_udt_usage', 'information_schema.routine_column_usage', 'information_schema.column_options', 'information_schema.foreign_server_options', 'information_schema.information_schema_catalog_name', 'information_schema.routines', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.character_sets', 'information_schema.udt_privileges', 'information_schema.triggered_update_columns', 'information_schema.constraint_column_usage', 'information_schema.domain_udt_usage', 'information_schema.administrable_role_authorizations', 'information_schema.check_constraints', 'information_schema.schemata', 'information_schema.table_privileges', 'information_schema.attributes', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.foreign_data_wrappers', 'information_schema.role_udt_grants', 'information_schema.view_column_usage', 'information_schema.key_column_usage', 'information_schema.routine_table_usage', 'information_schema.view_routine_usage', 'information_schema.foreign_table_options', 'information_schema.user_mapping_options', 'information_schema.routine_privileges', 'information_schema.user_defined_types', 'information_schema.referential_constraints', 'information_schema.sql_features', 'information_schema.user_mappings', 'information_schema.usage_privileges', 'information_schema.foreign_servers', 'information_schema.applicable_roles', 'information_schema.domain_constraints', 'information_schema.views', 'information_schema.foreign_tables', 'information_schema.column_column_usage', 'information_schema.routine_sequence_usage', 'information_schema.tables', 'information_schema.collation_character_set_applicability', 'information_schema.role_routine_grants', 'information_schema.table_constraints', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.view_table_usage', 'information_schema.element_types', 'information_schema.domains', 'information_schema.column_domain_usage', 'information_schema.sql_sizing', 'information_schema.foreign_data_wrapper_options', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_routine_usage', 'information_schema.data_type_privileges', 'information_schema.role_usage_grants', 'information_schema.columns', 'information_schema.column_privileges', 'information_schema.constraint_table_usage', 'information_schema.sql_implementation_info', 'information_schema.collations', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 14:28:52 Duration: 816ms
-
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_cast', 'pg_catalog.pg_extension', 'pg_catalog.pg_enum', 'pg_catalog.pg_depend', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_group', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_attribute', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_trigger', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_roles', 'pg_catalog.pg_amop', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_locks', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_opclass', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_settings', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_sequence', 'pg_catalog.pg_rules', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_amproc', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_proc', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_index', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_conversion', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_collation', 'pg_catalog.pg_matviews', 'pg_catalog.pg_policies', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_description', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_indexes', 'pg_catalog.pg_subscription', 'pg_catalog.pg_namespace', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_basebackup', 'information_schema.information_schema_catalog_name', 'information_schema.routine_routine_usage', 'information_schema.sql_implementation_info', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.view_column_usage', 'information_schema.character_sets', 'information_schema.routine_column_usage', 'information_schema.routine_table_usage', 'information_schema.udt_privileges', 'information_schema.domain_udt_usage', 'information_schema.enabled_roles', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_server_options', 'information_schema.schemata', 'information_schema.administrable_role_authorizations', 'information_schema.domain_constraints', 'information_schema.key_column_usage', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.column_privileges', 'information_schema.columns', 'information_schema.routine_sequence_usage', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.constraint_column_usage', 'information_schema.routine_privileges', 'information_schema.user_mapping_options', 'information_schema.element_types', 'information_schema.column_column_usage', 'information_schema.column_domain_usage', 'information_schema.routines', 'information_schema.collation_character_set_applicability', 'information_schema.tables', 'information_schema.user_defined_types', 'information_schema.referential_constraints', 'information_schema.data_type_privileges', 'information_schema.usage_privileges', 'information_schema.foreign_table_options', 'information_schema.foreign_servers', 'information_schema.attributes', 'information_schema.role_column_grants', 'information_schema.table_constraints', 'information_schema.role_routine_grants', 'information_schema.sql_sizing', 'information_schema.foreign_tables', 'information_schema.applicable_roles', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.constraint_table_usage', 'information_schema.view_table_usage', 'information_schema.views', 'information_schema.column_options', 'information_schema.check_constraints', 'information_schema.collations', 'information_schema.domains', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.role_usage_grants', 'information_schema.user_mappings', 'information_schema.role_udt_grants', 'information_schema.view_routine_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 14:32:07 Duration: 808ms
17 15m23s 798 782ms 3s317ms 1s157ms 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 #17
Day Hour Count Duration Avg duration Jul 15 11 30 30s253ms 1s8ms 12 123 2m15s 1s104ms 13 96 2m9s 1s351ms 14 88 1m58s 1s351ms 15 75 1m38s 1s316ms 16 68 1m14s 1s95ms 17 62 1m5s 1s61ms 18 101 1m46s 1s50ms 19 102 1m50s 1s82ms 20 45 46s352ms 1s30ms 22 5 4s421ms 884ms 23 3 2s678ms 892ms -
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 ('%m65416%')) 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 ('%m65416%'))) 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 ('%m65416%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%m65416%')))))) 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-07-15 14:50:51 Duration: 3s317ms
-
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 ('%trb2024t051%')) 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 ('%trb2024t051%'))) 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 ('%trb2024t051%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%trb2024t051%')))))) 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-07-15 13:28:09 Duration: 3s6ms
-
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 ('%ty25%')) 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 ('%ty25%'))) 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 ('%ty25%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%ty25%')))))) 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-07-15 13:24:32 Duration: 2s797ms
18 14m11s 3,347 160ms 870ms 254ms select "account_move".id from "account_move" where ((("account_move"."journal_id" in ( select "account_journal".id from "account_journal" where ("account_journal"."type" in (...)))) and ("account_move"."state" in (...))) and ("account_move"."partner_id" in (...))) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Jul 15 08 17 3s525ms 207ms 11 73 16s239ms 222ms 12 342 1m27s 254ms 13 482 2m15s 281ms 14 441 2m8s 291ms 15 300 1m28s 296ms 16 176 42s218ms 239ms 17 320 1m17s 242ms 18 412 1m41s 245ms 19 261 1m5s 251ms 20 90 21s346ms 237ms 23 433 1m23s 193ms -
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (31468))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 18:31:55 Duration: 870ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (33110))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 14:29:21 Duration: 780ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (52308))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 17:06:38 Duration: 768ms
19 13m51s 3,710 156ms 2s71ms 224ms 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 #19
Day Hour Count Duration Avg duration Jul 15 02 87 14s934ms 171ms 03 275 51s677ms 187ms 13 28 6s166ms 220ms 14 371 1m39s 267ms 15 942 4m6s 261ms 16 112 19s521ms 174ms 17 755 2m38s 210ms 18 561 1m59s 213ms 19 433 1m29s 205ms 20 146 26s52ms 178ms -
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 = 46846 and fd.product_id = 209311;
Date: 2024-07-15 15:34:37 Duration: 2s71ms
-
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 = 46846 and fd.product_id = 209475;
Date: 2024-07-15 15:47:22 Duration: 1s201ms
-
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 = 46846 and fd.product_id = 209440;
Date: 2024-07-15 15:46:31 Duration: 1s168ms
20 12m51s 2,772 228ms 1s765ms 278ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Jul 15 00 174 41s297ms 237ms 01 117 27s591ms 235ms 02 3 710ms 236ms 03 63 15s370ms 243ms 04 147 34s691ms 235ms 05 141 33s186ms 235ms 06 117 27s643ms 236ms 07 117 27s650ms 236ms 08 167 39s372ms 235ms 09 37 8s763ms 236ms 10 63 14s876ms 236ms 12 6 1s636ms 272ms 13 162 1m3s 391ms 14 129 53s200ms 412ms 15 174 1m6s 379ms 16 171 47s982ms 280ms 17 153 43s606ms 285ms 18 165 49s50ms 297ms 19 162 55s396ms 341ms 20 42 10s703ms 254ms 21 129 30s358ms 235ms 22 228 53s539ms 234ms 23 105 25s38ms 238ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 19:10:21 Duration: 1s765ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:32:12 Duration: 1s477ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 18:30:33 Duration: 1s377ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 74,312 5h27m35s 120ms 2s462ms 264ms 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 Jul 15 00 449 56s799ms 126ms 01 380 56s393ms 148ms 02 420 1m1s 146ms 03 720 1m55s 160ms 04 304 46s864ms 154ms 05 223 31s74ms 139ms 06 299 47s60ms 157ms 07 396 1m 152ms 08 443 1m6s 149ms 09 606 1m23s 137ms 10 758 1m40s 133ms 11 2,576 7m40s 178ms 12 6,169 25m34s 248ms 13 8,247 45m28s 330ms 14 8,902 50m33s 340ms 15 8,976 44m5s 294ms 16 7,155 33m21s 279ms 17 6,653 31m10s 281ms 18 6,572 30m51s 281ms 19 6,901 26m34s 231ms 20 2,923 8m33s 175ms 21 1,409 3m43s 158ms 22 1,511 4m2s 160ms 23 1,320 3m48s 172ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1043"', '["pointspring_master","calendar.alarm",19581]', '["pointspring_master","mail.channel",64]', '["pointspring_master","mail.channel",521]', '["pointspring_master","res.partner",19581]', '["pointspring_master","ir.needaction",19581]'))) ORDER BY "bus_bus"."id";
Date: 2024-07-15 16:47:04 Duration: 2s462ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') AND ("bus_bus"."channel" in ('["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","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-07-15 16:47:04 Duration: 2s454ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') 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-07-15 16:47:04 Duration: 2s426ms
2 19,355 2h5m48s 268ms 3s656ms 390ms 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 #2
Day Hour Count Duration Avg duration Jul 15 02 140 45s4ms 321ms 03 918 5m1s 328ms 08 24 7s856ms 327ms 11 908 5m16s 349ms 12 2,348 15m27s 394ms 13 3,128 21m31s 412ms 14 1,833 12m48s 419ms 15 1,623 11m21s 420ms 16 1,098 6m55s 378ms 17 1,664 10m31s 379ms 18 2,351 14m56s 381ms 19 2,719 17m24s 384ms 20 575 3m31s 367ms 22 12 3s845ms 320ms 23 14 4s600ms 328ms -
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-07-15 14:50:50 Duration: 3s656ms
-
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-07-15 15:34:37 Duration: 2s904ms
-
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-07-15 14:32:35 Duration: 2s854ms
3 18,941 44m53s 120ms 895ms 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 #3
Day Hour Count Duration Avg duration Jul 15 02 15 1s985ms 132ms 03 147 18s724ms 127ms 11 312 45s542ms 145ms 12 849 1m57s 138ms 13 3,292 7m58s 145ms 14 5,037 12m12s 145ms 15 5,450 12m49s 141ms 16 1,255 2m53s 138ms 17 1,165 2m37s 134ms 18 394 55s739ms 141ms 19 930 2m9s 139ms 20 95 12s319ms 129ms -
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 206656 AND warehouse_id = 44 AND company_id = 1;
Date: 2024-07-15 13:18:29 Duration: 895ms
-
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 203725 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-07-15 14:53:37 Duration: 881ms
-
SELECT COALESCE(loc_check_qty, 0) as loc_check_qty FROM product_warehouse_inventory WHERE product_id = 171812 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-07-15 18:30:32 Duration: 780ms
4 10,395 25m51s 120ms 916ms 149ms select id from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Jul 15 02 2 242ms 121ms 03 46 7s155ms 155ms 11 142 23s192ms 163ms 12 671 1m39s 148ms 13 2,052 5m14s 153ms 14 2,485 6m19s 152ms 15 2,668 6m28s 145ms 16 535 1m20s 149ms 17 580 1m22s 142ms 18 440 1m4s 146ms 19 697 1m40s 144ms 20 77 11s38ms 143ms -
select id from product_warehouse_inventory where product_id = 220733 and warehouse_id = 37 and company_id = 1;
Date: 2024-07-15 15:46:30 Duration: 916ms
-
select id from product_warehouse_inventory where product_id = 222332 and warehouse_id = 43 and company_id = 1;
Date: 2024-07-15 13:24:30 Duration: 877ms
-
select id from product_warehouse_inventory where product_id = 251368 and warehouse_id = 37 and company_id = 1;
Date: 2024-07-15 16:29:50 Duration: 795ms
5 9,355 22m13s 120ms 965ms 142ms select coalesce(replenish_branch_id, ?) as replenish_branch_id from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Jul 15 02 6 780ms 130ms 03 68 9s76ms 133ms 11 151 22s724ms 150ms 12 423 1m 141ms 13 1,615 3m54s 145ms 14 2,490 6m2s 145ms 15 2,728 6m24s 140ms 16 615 1m25s 139ms 17 579 1m19s 137ms 18 180 25s132ms 139ms 19 446 1m2s 140ms 20 54 6s890ms 127ms -
SELECT COALESCE(replenish_branch_id, 0) as replenish_branch_id FROM product_warehouse_inventory WHERE product_id = 206656 AND warehouse_id = 44 AND company_id = 1;
Date: 2024-07-15 13:18:28 Duration: 965ms
-
SELECT COALESCE(replenish_branch_id, 0) as replenish_branch_id FROM product_warehouse_inventory WHERE product_id = 242073 AND warehouse_id = 41 AND company_id = 1;
Date: 2024-07-15 14:53:36 Duration: 942ms
-
SELECT COALESCE(replenish_branch_id, 0) as replenish_branch_id FROM product_warehouse_inventory WHERE product_id = 244362 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-07-15 14:32:11 Duration: 793ms
6 7,509 19m59s 120ms 1s507ms 159ms 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 #6
Day Hour Count Duration Avg duration Jul 15 08 14 1s872ms 133ms 10 1 132ms 132ms 11 196 27s170ms 138ms 12 836 2m11s 157ms 13 1,144 3m4s 161ms 14 829 2m17s 166ms 15 1,074 3m2s 169ms 16 489 1m19s 161ms 17 631 1m37s 154ms 18 1,193 3m7s 156ms 19 781 2m 154ms 20 320 48s597ms 151ms 23 1 120ms 120ms -
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 191092 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-07-15 18:14:48 Duration: 1s507ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 247744 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-07-15 16:52:31 Duration: 991ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 191083 and sol.warehouse_id = 35 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-07-15 17:45:04 Duration: 882ms
7 6,950 18m27s 120ms 980ms 159ms 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 Jul 15 02 1 123ms 123ms 03 17 2s800ms 164ms 10 1 132ms 132ms 11 89 13s484ms 151ms 12 885 2m22s 160ms 13 1,323 3m33s 161ms 14 965 2m35s 161ms 15 1,131 3m2s 161ms 16 344 54s666ms 158ms 17 437 1m8s 156ms 18 783 2m 153ms 19 816 2m9s 158ms 20 158 24s363ms 154ms -
select id from product_warehouse_inventory where product_id = 203327 and warehouse_id = 41 and company_id = 1;
Date: 2024-07-15 15:28:08 Duration: 980ms
-
select id from product_warehouse_inventory where product_id = 206656 and warehouse_id = 44 and company_id = 1;
Date: 2024-07-15 13:18:30 Duration: 815ms
-
select id from product_warehouse_inventory where product_id = 222180 and warehouse_id = 43 and company_id = 1;
Date: 2024-07-15 13:24:31 Duration: 733ms
8 5,763 15m35s 123ms 834ms 162ms 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 #8
Day Hour Count Duration Avg duration Jul 15 00 240 34s261ms 142ms 01 240 33s913ms 141ms 02 240 34s279ms 142ms 03 240 35s861ms 149ms 04 240 33s887ms 141ms 05 240 34s57ms 141ms 06 240 34s174ms 142ms 07 240 34s35ms 141ms 08 240 34s181ms 142ms 09 240 34s176ms 142ms 10 240 34s128ms 142ms 11 240 37s963ms 158ms 12 240 44s44ms 183ms 13 240 53s84ms 221ms 14 242 55s430ms 229ms 15 240 53s90ms 221ms 16 240 42s672ms 177ms 17 241 44s304ms 183ms 18 240 43s240ms 180ms 19 240 44s881ms 187ms 20 240 37s133ms 154ms 21 240 34s513ms 143ms 22 240 34s196ms 142ms 23 240 34s284ms 142ms -
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_stat_progress_vacuum', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_operator', 'pg_catalog.pg_language', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_publication', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_description', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_attribute', 'pg_catalog.pg_am', 'pg_catalog.pg_opclass', 'pg_catalog.pg_namespace', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_policies', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_type', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_database', 'pg_catalog.pg_range', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_collation', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_proc', 'pg_catalog.pg_policy', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_depend', 'pg_catalog.pg_cursors', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_constraint', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_trigger', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_cast', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_transform', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_settings', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_views', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_sequences', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_enum', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_conversion', 'pg_catalog.pg_extension', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_indexes', 'pg_catalog.pg_available_extensions', 'information_schema.sql_implementation_info', 'information_schema.key_column_usage', 'information_schema.routine_routine_usage', 'information_schema.role_routine_grants', 'information_schema.tables', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.foreign_tables', 'information_schema.view_table_usage', 'information_schema.view_column_usage', 'information_schema.column_domain_usage', 'information_schema.routine_column_usage', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.foreign_servers', 'information_schema.attributes', 'information_schema.collations', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.sequences', 'information_schema.routines', 'information_schema.constraint_table_usage', 'information_schema.role_column_grants', 'information_schema.parameters', 'information_schema.referential_constraints', 'information_schema.sql_sizing', 'information_schema.role_usage_grants', 'information_schema.applicable_roles', 'information_schema.column_column_usage', 'information_schema.triggers', 'information_schema.domains', 'information_schema.sql_features', 'information_schema.routine_privileges', 'information_schema.routine_sequence_usage', 'information_schema.foreign_server_options', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraints', 'information_schema.domain_constraints', 'information_schema.foreign_data_wrappers', 'information_schema.character_sets', 'information_schema.collation_character_set_applicability', 'information_schema.user_defined_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.domain_udt_usage', 'information_schema.udt_privileges', 'information_schema.triggered_update_columns', 'information_schema.views', 'information_schema.column_options', 'information_schema.administrable_role_authorizations', 'information_schema.table_constraints', 'information_schema.user_mappings', 'information_schema.element_types', 'information_schema.view_routine_usage', 'information_schema.foreign_table_options', 'information_schema.enabled_roles', 'information_schema.schemata', 'information_schema.column_privileges', 'information_schema.user_mapping_options', 'information_schema.routine_table_usage', 'information_schema.data_type_privileges', 'information_schema.columns', 'information_schema.constraint_column_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 17:06:38 Duration: 834ms
-
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_settings', 'pg_catalog.pg_cast', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_depend', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stats', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_amop', 'pg_catalog.pg_language', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_views', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_group', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_tables', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_operator', 'pg_catalog.pg_am', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_trigger', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_proc', 'pg_catalog.pg_extension', 'pg_catalog.pg_database', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_policy', 'pg_catalog.pg_matviews', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_subscription', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_transform', 'pg_catalog.pg_constraint', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_description', 'pg_catalog.pg_rules', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_amproc', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_conversion', 'pg_catalog.pg_sequences', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_opclass', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_range', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_replication_slots', 'information_schema.column_udt_usage', 'information_schema.routine_column_usage', 'information_schema.column_options', 'information_schema.foreign_server_options', 'information_schema.information_schema_catalog_name', 'information_schema.routines', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.character_sets', 'information_schema.udt_privileges', 'information_schema.triggered_update_columns', 'information_schema.constraint_column_usage', 'information_schema.domain_udt_usage', 'information_schema.administrable_role_authorizations', 'information_schema.check_constraints', 'information_schema.schemata', 'information_schema.table_privileges', 'information_schema.attributes', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.foreign_data_wrappers', 'information_schema.role_udt_grants', 'information_schema.view_column_usage', 'information_schema.key_column_usage', 'information_schema.routine_table_usage', 'information_schema.view_routine_usage', 'information_schema.foreign_table_options', 'information_schema.user_mapping_options', 'information_schema.routine_privileges', 'information_schema.user_defined_types', 'information_schema.referential_constraints', 'information_schema.sql_features', 'information_schema.user_mappings', 'information_schema.usage_privileges', 'information_schema.foreign_servers', 'information_schema.applicable_roles', 'information_schema.domain_constraints', 'information_schema.views', 'information_schema.foreign_tables', 'information_schema.column_column_usage', 'information_schema.routine_sequence_usage', 'information_schema.tables', 'information_schema.collation_character_set_applicability', 'information_schema.role_routine_grants', 'information_schema.table_constraints', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.view_table_usage', 'information_schema.element_types', 'information_schema.domains', 'information_schema.column_domain_usage', 'information_schema.sql_sizing', 'information_schema.foreign_data_wrapper_options', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_routine_usage', 'information_schema.data_type_privileges', 'information_schema.role_usage_grants', 'information_schema.columns', 'information_schema.column_privileges', 'information_schema.constraint_table_usage', 'information_schema.sql_implementation_info', 'information_schema.collations', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 14:28:52 Duration: 816ms
-
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_cast', 'pg_catalog.pg_extension', 'pg_catalog.pg_enum', 'pg_catalog.pg_depend', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_group', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_attribute', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_trigger', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_roles', 'pg_catalog.pg_amop', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_locks', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_opclass', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_settings', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_sequence', 'pg_catalog.pg_rules', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_amproc', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_proc', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_index', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_conversion', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_collation', 'pg_catalog.pg_matviews', 'pg_catalog.pg_policies', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_description', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_indexes', 'pg_catalog.pg_subscription', 'pg_catalog.pg_namespace', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_basebackup', 'information_schema.information_schema_catalog_name', 'information_schema.routine_routine_usage', 'information_schema.sql_implementation_info', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.view_column_usage', 'information_schema.character_sets', 'information_schema.routine_column_usage', 'information_schema.routine_table_usage', 'information_schema.udt_privileges', 'information_schema.domain_udt_usage', 'information_schema.enabled_roles', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_server_options', 'information_schema.schemata', 'information_schema.administrable_role_authorizations', 'information_schema.domain_constraints', 'information_schema.key_column_usage', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.column_privileges', 'information_schema.columns', 'information_schema.routine_sequence_usage', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.constraint_column_usage', 'information_schema.routine_privileges', 'information_schema.user_mapping_options', 'information_schema.element_types', 'information_schema.column_column_usage', 'information_schema.column_domain_usage', 'information_schema.routines', 'information_schema.collation_character_set_applicability', 'information_schema.tables', 'information_schema.user_defined_types', 'information_schema.referential_constraints', 'information_schema.data_type_privileges', 'information_schema.usage_privileges', 'information_schema.foreign_table_options', 'information_schema.foreign_servers', 'information_schema.attributes', 'information_schema.role_column_grants', 'information_schema.table_constraints', 'information_schema.role_routine_grants', 'information_schema.sql_sizing', 'information_schema.foreign_tables', 'information_schema.applicable_roles', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.constraint_table_usage', 'information_schema.view_table_usage', 'information_schema.views', 'information_schema.column_options', 'information_schema.check_constraints', 'information_schema.collations', 'information_schema.domains', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.role_usage_grants', 'information_schema.user_mappings', 'information_schema.role_udt_grants', 'information_schema.view_routine_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 14:32:07 Duration: 808ms
9 5,530 17m25s 148ms 2s905ms 189ms 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 Jul 15 02 5 807ms 161ms 03 24 3s918ms 163ms 08 3 487ms 162ms 11 142 24s594ms 173ms 12 728 2m19s 191ms 13 953 3m 188ms 14 508 1m39s 194ms 15 849 2m47s 197ms 16 306 55s893ms 182ms 17 610 1m53s 185ms 18 568 1m46s 188ms 19 665 2m3s 186ms 20 167 29s869ms 178ms 22 1 156ms 156ms 23 1 182ms 182ms -
UPDATE product_warehouse_inventory SET qty_available = 62.0 WHERE product_id = 194198 AND warehouse_id = 35 AND company_id = 1;
Date: 2024-07-15 12:46:56 Duration: 2s905ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 221785 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-07-15 17:49:46 Duration: 1s228ms
-
UPDATE product_warehouse_inventory SET qty_available = 2.0 WHERE product_id = 176362 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-07-15 15:25:56 Duration: 833ms
10 3,973 9m57s 120ms 545ms 150ms select max(id) from ir_attachment where create_uid = ? and url like ? group by name order by name;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Jul 15 11 61 8s904ms 145ms 12 291 43s933ms 150ms 13 940 2m21s 150ms 14 779 2m 154ms 15 791 1m57s 148ms 16 182 27s76ms 148ms 17 219 33s779ms 154ms 18 319 48s239ms 151ms 19 321 45s455ms 141ms 20 70 10s297ms 147ms -
SELECT max(id) FROM ir_attachment WHERE create_uid = 1 AND url like '/web/content/%-43c7e99/web.assets_frontend_lazy.js' GROUP BY name ORDER BY name;
Date: 2024-07-15 18:20:42 Duration: 545ms
-
SELECT max(id) FROM ir_attachment WHERE create_uid = 1 AND url like '/web/content/%-7eb3f27/web.assets_common.css' GROUP BY name ORDER BY name;
Date: 2024-07-15 17:06:37 Duration: 506ms
-
SELECT max(id) FROM ir_attachment WHERE create_uid = 1 AND url like '/web/content/%-169d39f/web.assets_frontend.css' GROUP BY name ORDER BY name;
Date: 2024-07-15 18:20:42 Duration: 498ms
11 3,710 13m51s 156ms 2s71ms 224ms 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 Jul 15 02 87 14s934ms 171ms 03 275 51s677ms 187ms 13 28 6s166ms 220ms 14 371 1m39s 267ms 15 942 4m6s 261ms 16 112 19s521ms 174ms 17 755 2m38s 210ms 18 561 1m59s 213ms 19 433 1m29s 205ms 20 146 26s52ms 178ms -
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 = 46846 and fd.product_id = 209311;
Date: 2024-07-15 15:34:37 Duration: 2s71ms
-
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 = 46846 and fd.product_id = 209475;
Date: 2024-07-15 15:47:22 Duration: 1s201ms
-
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 = 46846 and fd.product_id = 209440;
Date: 2024-07-15 15:46:31 Duration: 1s168ms
12 3,686 59m 584ms 3s599ms 960ms 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 #12
Day Hour Count Duration Avg duration Jul 15 11 417 5m36s 806ms 12 692 10m28s 907ms 13 490 8m55s 1s92ms 14 418 7m53s 1s131ms 15 267 5m26s 1s222ms 16 247 3m39s 886ms 17 365 5m19s 874ms 18 266 3m57s 893ms 19 346 5m27s 945ms 20 172 2m14s 780ms 23 6 4s268ms 711ms -
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 ('%%g95111%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g95111%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g95111%'))) 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-07-15 14:50:50 Duration: 3s599ms
-
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 ('%%g95111%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g95111-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g95111-%'))) 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-07-15 14:50:50 Duration: 3s290ms
-
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 ('%%489XR%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489XR%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489XR%'))) 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-07-15 15:34:38 Duration: 3s213ms
13 3,635 11m47s 120ms 1s554ms 194ms 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 #13
Day Hour Count Duration Avg duration Jul 15 11 226 37s563ms 166ms 12 456 1m17s 169ms 13 298 58s667ms 196ms 14 322 1m4s 201ms 15 1,074 4m6s 229ms 16 384 1m14s 193ms 17 188 32s351ms 172ms 18 336 54s177ms 161ms 19 234 37s143ms 158ms 20 117 24s563ms 209ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 254634) 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-07-15 16:47:04 Duration: 1s554ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 204642) 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-07-15 15:25:56 Duration: 1s40ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 247252) 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" = '44')))))) 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-07-15 13:57:50 Duration: 874ms
14 3,347 14m11s 160ms 870ms 254ms select "account_move".id from "account_move" where ((("account_move"."journal_id" in ( select "account_journal".id from "account_journal" where ("account_journal"."type" in (...)))) and ("account_move"."state" in (...))) and ("account_move"."partner_id" in (...))) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Jul 15 08 17 3s525ms 207ms 11 73 16s239ms 222ms 12 342 1m27s 254ms 13 482 2m15s 281ms 14 441 2m8s 291ms 15 300 1m28s 296ms 16 176 42s218ms 239ms 17 320 1m17s 242ms 18 412 1m41s 245ms 19 261 1m5s 251ms 20 90 21s346ms 237ms 23 433 1m23s 193ms -
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (31468))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 18:31:55 Duration: 870ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (33110))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 14:29:21 Duration: 780ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (52308))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 17:06:38 Duration: 768ms
15 3,272 10m28s 143ms 5s687ms 191ms 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 Jul 15 02 22 3s464ms 157ms 03 132 21s277ms 161ms 08 5 798ms 159ms 10 2 436ms 218ms 11 204 35s126ms 172ms 12 455 1m24s 186ms 13 335 1m4s 191ms 14 351 1m9s 199ms 15 293 57s853ms 197ms 16 212 39s709ms 187ms 17 289 59s891ms 207ms 18 458 1m33s 204ms 19 436 1m22s 189ms 20 73 13s275ms 181ms 22 2 329ms 164ms 23 3 484ms 161ms -
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 209510 AND warehouse_id = 45;
Date: 2024-07-15 18:40:45 Duration: 5s687ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 221785 AND warehouse_id = 43;
Date: 2024-07-15 17:49:40 Duration: 4s210ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 209510 AND warehouse_id = 45;
Date: 2024-07-15 18:41:00 Duration: 3s639ms
16 3,226 10m50s 143ms 12s131ms 201ms 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 Jul 15 02 8 1s252ms 156ms 03 58 9s148ms 157ms 08 3 491ms 163ms 11 76 14s175ms 186ms 12 318 1m14s 235ms 13 735 2m27s 201ms 14 214 40s439ms 188ms 15 397 1m17s 193ms 16 203 36s664ms 180ms 17 304 1m7s 221ms 18 300 1m7s 225ms 19 486 1m32s 189ms 20 123 21s556ms 175ms 23 1 158ms 158ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 220169 AND warehouse_id = 42;
Date: 2024-07-15 18:36:13 Duration: 12s131ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223222 AND warehouse_id = 43;
Date: 2024-07-15 12:48:50 Duration: 10s500ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 194198 AND warehouse_id = 35;
Date: 2024-07-15 12:46:44 Duration: 8s546ms
17 3,191 10m20s 120ms 771ms 194ms 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 Jul 15 02 22 3s167ms 143ms 03 187 36s97ms 193ms 10 7 948ms 135ms 11 75 11s756ms 156ms 12 351 59s832ms 170ms 13 524 1m31s 175ms 14 738 3m11s 259ms 15 512 1m37s 189ms 16 131 22s273ms 170ms 17 191 30s319ms 158ms 18 132 22s253ms 168ms 19 280 46s851ms 167ms 20 41 6s233ms 152ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (219413)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-07-15 15:34:37 Duration: 771ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (186339, 186111, 185690, 186647, 186457, 185096, 185182, 186227, 186466, 257625, 186030, 186690, 186821, 186049, 186488, 186682, 186673, 257639, 255021, 186823, 185176, 186822, 185495, 186438, 184786, 185475, 257633, 186039, 185349, 185126, 186693, 184923, 185235, 186818, 186680, 184748, 186211)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-07-15 14:32:33 Duration: 764ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (190710, 206638, 173638)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-07-15 16:11:29 Duration: 752ms
18 2,874 17m43s 307ms 1s513ms 370ms 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"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Jul 15 00 283 1m30s 320ms 01 69 21s797ms 315ms 02 9 2s851ms 316ms 03 18 5s666ms 314ms 04 222 1m10s 318ms 05 105 33s305ms 317ms 06 84 26s663ms 317ms 07 117 37s198ms 317ms 08 177 56s301ms 318ms 09 12 3s822ms 318ms 10 3 957ms 319ms 11 12 3s989ms 332ms 12 3 947ms 315ms 13 184 1m36s 525ms 14 106 55s497ms 523ms 15 165 1m24s 513ms 16 219 1m26s 396ms 17 141 51s258ms 363ms 18 180 1m11s 399ms 19 183 1m15s 413ms 20 57 18s979ms 332ms 21 192 1m1s 319ms 22 189 1m 318ms 23 144 45s833ms 318ms -
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 16:37:39 Duration: 1s513ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:47:30 Duration: 1s423ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:47:28 Duration: 1s293ms
19 2,772 12m51s 228ms 1s765ms 278ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Jul 15 00 174 41s297ms 237ms 01 117 27s591ms 235ms 02 3 710ms 236ms 03 63 15s370ms 243ms 04 147 34s691ms 235ms 05 141 33s186ms 235ms 06 117 27s643ms 236ms 07 117 27s650ms 236ms 08 167 39s372ms 235ms 09 37 8s763ms 236ms 10 63 14s876ms 236ms 12 6 1s636ms 272ms 13 162 1m3s 391ms 14 129 53s200ms 412ms 15 174 1m6s 379ms 16 171 47s982ms 280ms 17 153 43s606ms 285ms 18 165 49s50ms 297ms 19 162 55s396ms 341ms 20 42 10s703ms 254ms 21 129 30s358ms 235ms 22 228 53s539ms 234ms 23 105 25s38ms 238ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 19:10:21 Duration: 1s765ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:32:12 Duration: 1s477ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 18:30:33 Duration: 1s377ms
20 2,768 39m52s 318ms 2s351ms 864ms select id from product_warehouse_inventory where coalesce(loc_check_qty, ?) < coalesce(max_product_uom_qty, ?);Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Jul 15 11 353 4m34s 776ms 12 182 2m32s 840ms 13 1,101 16m34s 902ms 14 1,017 15m16s 901ms 16 42 26s490ms 630ms 18 51 20s66ms 393ms 19 22 8s550ms 388ms -
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 14:32:13 Duration: 2s351ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 13:18:29 Duration: 1s965ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 13:18:29 Duration: 1s962ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 1s906ms 55s669ms 6s523ms 243 26m25s delete from account_move_line where id in (...);Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Jul 15 12 16 45s941ms 2s871ms 13 20 1m22s 4s129ms 14 9 1m8s 7s617ms 15 39 2m46s 4s264ms 16 10 1m12s 7s237ms 17 13 5m3s 23s319ms 18 28 4m43s 10s134ms 19 8 1m10s 8s804ms 23 100 8m12s 4s920ms -
DELETE FROM account_move_line WHERE id IN (5407281, 5407282, 5407283, 5407284, 5407285, 5407286, 5407287, 5407288, 5407289, 5407290, 5407291, 5407292, 5407293, 5407294, 5407295, 5407296, 5407297, 5407298, 5407299, 5407300, 5407301, 5407302, 5407303, 5407304);
Date: 2024-07-15 17:07:05 Duration: 55s669ms
-
DELETE FROM account_move_line WHERE id IN (5401779, 5401780, 5401781, 5401782, 5401783, 5401784, 5401785, 5401786, 5401787, 5401788, 5401789, 5401790, 5401791, 5401792, 5401793, 5401794, 5401795, 5401796, 5401797, 5401798, 5401799, 5401800, 5401801, 5401802, 5401803, 5401804, 5401805);
Date: 2024-07-15 23:43:17 Duration: 51s962ms
-
DELETE FROM account_move_line WHERE id IN (5407316, 5407317, 5407318, 5407319, 5407320, 5407321, 5407322, 5407323, 5407324, 5407325, 5407326, 5407327, 5407328, 5407329, 5407330, 5407331, 5407332, 5407333, 5407334, 5407335, 5407336, 5407337, 5407338);
Date: 2024-07-15 17:11:55 Duration: 47s965ms
2 782ms 3s317ms 1s157ms 798 15m23s 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 Jul 15 11 30 30s253ms 1s8ms 12 123 2m15s 1s104ms 13 96 2m9s 1s351ms 14 88 1m58s 1s351ms 15 75 1m38s 1s316ms 16 68 1m14s 1s95ms 17 62 1m5s 1s61ms 18 101 1m46s 1s50ms 19 102 1m50s 1s82ms 20 45 46s352ms 1s30ms 22 5 4s421ms 884ms 23 3 2s678ms 892ms -
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 ('%m65416%')) 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 ('%m65416%'))) 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 ('%m65416%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%m65416%')))))) 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-07-15 14:50:51 Duration: 3s317ms
-
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 ('%trb2024t051%')) 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 ('%trb2024t051%'))) 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 ('%trb2024t051%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%trb2024t051%')))))) 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-07-15 13:28:09 Duration: 3s6ms
-
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 ('%ty25%')) 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 ('%ty25%'))) 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 ('%ty25%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%ty25%')))))) 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-07-15 13:24:32 Duration: 2s797ms
3 592ms 2s639ms 982ms 1,062 17m23s 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 Jul 15 11 2 2s298ms 1s149ms 12 125 2m8s 1s24ms 13 208 3m22s 974ms 14 102 1m52s 1s106ms 15 180 3m28s 1s159ms 16 19 14s750ms 776ms 17 109 1m26s 797ms 18 203 3m11s 943ms 19 97 1m21s 844ms 20 17 13s599ms 799ms -
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 ('%%12x1%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%1/2x1%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%1/2x1%'))) 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-07-15 13:15:50 Duration: 2s639ms
-
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 ('%%12x12%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%1/2x12%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%1/2x12%'))) 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-07-15 13:15:50 Duration: 2s394ms
-
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 ('%%34%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%3/4%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%3/4%'))) 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-07-15 15:26:48 Duration: 2s123ms
4 584ms 3s599ms 960ms 3,686 59m 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 Jul 15 11 417 5m36s 806ms 12 692 10m28s 907ms 13 490 8m55s 1s92ms 14 418 7m53s 1s131ms 15 267 5m26s 1s222ms 16 247 3m39s 886ms 17 365 5m19s 874ms 18 266 3m57s 893ms 19 346 5m27s 945ms 20 172 2m14s 780ms 23 6 4s268ms 711ms -
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 ('%%g95111%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g95111%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g95111%'))) 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-07-15 14:50:50 Duration: 3s599ms
-
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 ('%%g95111%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g95111-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g95111-%'))) 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-07-15 14:50:50 Duration: 3s290ms
-
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 ('%%489XR%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489XR%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489XR%'))) 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-07-15 15:34:38 Duration: 3s213ms
5 318ms 2s351ms 864ms 2,768 39m52s select id from product_warehouse_inventory where coalesce(loc_check_qty, ?) < coalesce(max_product_uom_qty, ?);Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Jul 15 11 353 4m34s 776ms 12 182 2m32s 840ms 13 1,101 16m34s 902ms 14 1,017 15m16s 901ms 16 42 26s490ms 630ms 18 51 20s66ms 393ms 19 22 8s550ms 388ms -
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 14:32:13 Duration: 2s351ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 13:18:29 Duration: 1s965ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-07-15 13:18:29 Duration: 1s962ms
6 435ms 2s62ms 593ms 2,689 26m36s 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 #6
Day Hour Count Duration Avg duration Jul 15 00 3 1s311ms 437ms 02 2 902ms 451ms 05 3 1s331ms 443ms 06 1 437ms 437ms 07 2 871ms 435ms 08 9 3s990ms 443ms 10 17 7s655ms 450ms 11 171 1m20s 470ms 12 379 3m32s 560ms 13 338 3m44s 663ms 14 302 3m30s 697ms 15 346 3m55s 679ms 16 227 2m7s 561ms 17 217 1m54s 529ms 18 214 2m3s 576ms 19 308 2m55s 569ms 20 143 1m12s 506ms 23 7 3s331ms 475ms -
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-07-15 14:29:22 Duration: 2s62ms
-
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.assets_backend.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-d7fc930/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-07-15 16:52:33 Duration: 1s959ms
-
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.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-9ded8a0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-07-15 14:29:25 Duration: 1s954ms
7 268ms 3s656ms 390ms 19,355 2h5m48s 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 Jul 15 02 140 45s4ms 321ms 03 918 5m1s 328ms 08 24 7s856ms 327ms 11 908 5m16s 349ms 12 2,348 15m27s 394ms 13 3,128 21m31s 412ms 14 1,833 12m48s 419ms 15 1,623 11m21s 420ms 16 1,098 6m55s 378ms 17 1,664 10m31s 379ms 18 2,351 14m56s 381ms 19 2,719 17m24s 384ms 20 575 3m31s 367ms 22 12 3s845ms 320ms 23 14 4s600ms 328ms -
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-07-15 14:50:50 Duration: 3s656ms
-
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-07-15 15:34:37 Duration: 2s904ms
-
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-07-15 14:32:35 Duration: 2s854ms
8 307ms 1s513ms 370ms 2,874 17m43s 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"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Jul 15 00 283 1m30s 320ms 01 69 21s797ms 315ms 02 9 2s851ms 316ms 03 18 5s666ms 314ms 04 222 1m10s 318ms 05 105 33s305ms 317ms 06 84 26s663ms 317ms 07 117 37s198ms 317ms 08 177 56s301ms 318ms 09 12 3s822ms 318ms 10 3 957ms 319ms 11 12 3s989ms 332ms 12 3 947ms 315ms 13 184 1m36s 525ms 14 106 55s497ms 523ms 15 165 1m24s 513ms 16 219 1m26s 396ms 17 141 51s258ms 363ms 18 180 1m11s 399ms 19 183 1m15s 413ms 20 57 18s979ms 332ms 21 192 1m1s 319ms 22 189 1m 318ms 23 144 45s833ms 318ms -
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 16:37:39 Duration: 1s513ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:47:30 Duration: 1s423ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:47:28 Duration: 1s293ms
9 305ms 2s291ms 363ms 2,733 16m33s 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"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Jul 15 00 198 1m3s 318ms 01 117 36s787ms 314ms 02 12 3s776ms 314ms 03 12 3s760ms 313ms 04 165 51s982ms 315ms 05 108 33s950ms 314ms 06 90 28s479ms 316ms 07 120 37s801ms 315ms 08 165 52s136ms 315ms 09 114 36s84ms 316ms 10 66 20s831ms 315ms 11 15 5s677ms 378ms 12 9 3s287ms 365ms 13 102 55s987ms 548ms 14 120 1m4s 537ms 15 138 1m9s 507ms 16 180 1m10s 393ms 17 147 1m1s 419ms 18 144 54s481ms 378ms 19 108 44s639ms 413ms 20 69 22s434ms 325ms 21 210 1m7s 319ms 22 195 1m2s 321ms 23 129 41s781ms 323ms -
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-07-15 13:40:39 Duration: 2s291ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-07-15 13:52:34 Duration: 1s25ms
-
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"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-07-15 13:58:43 Duration: 977ms
10 228ms 1s765ms 278ms 2,772 12m51s select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Jul 15 00 174 41s297ms 237ms 01 117 27s591ms 235ms 02 3 710ms 236ms 03 63 15s370ms 243ms 04 147 34s691ms 235ms 05 141 33s186ms 235ms 06 117 27s643ms 236ms 07 117 27s650ms 236ms 08 167 39s372ms 235ms 09 37 8s763ms 236ms 10 63 14s876ms 236ms 12 6 1s636ms 272ms 13 162 1m3s 391ms 14 129 53s200ms 412ms 15 174 1m6s 379ms 16 171 47s982ms 280ms 17 153 43s606ms 285ms 18 165 49s50ms 297ms 19 162 55s396ms 341ms 20 42 10s703ms 254ms 21 129 30s358ms 235ms 22 228 53s539ms 234ms 23 105 25s38ms 238ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 19:10:21 Duration: 1s765ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 14:32:12 Duration: 1s477ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-07-15 18:30:33 Duration: 1s377ms
11 120ms 2s462ms 264ms 74,312 5h27m35s 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 #11
Day Hour Count Duration Avg duration Jul 15 00 449 56s799ms 126ms 01 380 56s393ms 148ms 02 420 1m1s 146ms 03 720 1m55s 160ms 04 304 46s864ms 154ms 05 223 31s74ms 139ms 06 299 47s60ms 157ms 07 396 1m 152ms 08 443 1m6s 149ms 09 606 1m23s 137ms 10 758 1m40s 133ms 11 2,576 7m40s 178ms 12 6,169 25m34s 248ms 13 8,247 45m28s 330ms 14 8,902 50m33s 340ms 15 8,976 44m5s 294ms 16 7,155 33m21s 279ms 17 6,653 31m10s 281ms 18 6,572 30m51s 281ms 19 6,901 26m34s 231ms 20 2,923 8m33s 175ms 21 1,409 3m43s 158ms 22 1,511 4m2s 160ms 23 1,320 3m48s 172ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1043"', '["pointspring_master","calendar.alarm",19581]', '["pointspring_master","mail.channel",64]', '["pointspring_master","mail.channel",521]', '["pointspring_master","res.partner",19581]', '["pointspring_master","ir.needaction",19581]'))) ORDER BY "bus_bus"."id";
Date: 2024-07-15 16:47:04 Duration: 2s462ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') AND ("bus_bus"."channel" in ('["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","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-07-15 16:47:04 Duration: 2s454ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-07-15 16:46:12') 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-07-15 16:47:04 Duration: 2s426ms
12 160ms 870ms 254ms 3,347 14m11s select "account_move".id from "account_move" where ((("account_move"."journal_id" in ( select "account_journal".id from "account_journal" where ("account_journal"."type" in (...)))) and ("account_move"."state" in (...))) and ("account_move"."partner_id" in (...))) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Jul 15 08 17 3s525ms 207ms 11 73 16s239ms 222ms 12 342 1m27s 254ms 13 482 2m15s 281ms 14 441 2m8s 291ms 15 300 1m28s 296ms 16 176 42s218ms 239ms 17 320 1m17s 242ms 18 412 1m41s 245ms 19 261 1m5s 251ms 20 90 21s346ms 237ms 23 433 1m23s 193ms -
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (31468))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 18:31:55 Duration: 870ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (33110))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 14:29:21 Duration: 780ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (52308))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-07-15 17:06:38 Duration: 768ms
13 156ms 2s71ms 224ms 3,710 13m51s 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 #13
Day Hour Count Duration Avg duration Jul 15 02 87 14s934ms 171ms 03 275 51s677ms 187ms 13 28 6s166ms 220ms 14 371 1m39s 267ms 15 942 4m6s 261ms 16 112 19s521ms 174ms 17 755 2m38s 210ms 18 561 1m59s 213ms 19 433 1m29s 205ms 20 146 26s52ms 178ms -
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 = 46846 and fd.product_id = 209311;
Date: 2024-07-15 15:34:37 Duration: 2s71ms
-
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 = 46846 and fd.product_id = 209475;
Date: 2024-07-15 15:47:22 Duration: 1s201ms
-
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 = 46846 and fd.product_id = 209440;
Date: 2024-07-15 15:46:31 Duration: 1s168ms
14 143ms 12s131ms 201ms 3,226 10m50s update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Jul 15 02 8 1s252ms 156ms 03 58 9s148ms 157ms 08 3 491ms 163ms 11 76 14s175ms 186ms 12 318 1m14s 235ms 13 735 2m27s 201ms 14 214 40s439ms 188ms 15 397 1m17s 193ms 16 203 36s664ms 180ms 17 304 1m7s 221ms 18 300 1m7s 225ms 19 486 1m32s 189ms 20 123 21s556ms 175ms 23 1 158ms 158ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 220169 AND warehouse_id = 42;
Date: 2024-07-15 18:36:13 Duration: 12s131ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223222 AND warehouse_id = 43;
Date: 2024-07-15 12:48:50 Duration: 10s500ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 194198 AND warehouse_id = 35;
Date: 2024-07-15 12:46:44 Duration: 8s546ms
15 120ms 1s554ms 194ms 3,635 11m47s 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 Jul 15 11 226 37s563ms 166ms 12 456 1m17s 169ms 13 298 58s667ms 196ms 14 322 1m4s 201ms 15 1,074 4m6s 229ms 16 384 1m14s 193ms 17 188 32s351ms 172ms 18 336 54s177ms 161ms 19 234 37s143ms 158ms 20 117 24s563ms 209ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 254634) 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-07-15 16:47:04 Duration: 1s554ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 204642) 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-07-15 15:25:56 Duration: 1s40ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 247252) 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" = '44')))))) 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-07-15 13:57:50 Duration: 874ms
16 120ms 771ms 194ms 3,191 10m20s 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 #16
Day Hour Count Duration Avg duration Jul 15 02 22 3s167ms 143ms 03 187 36s97ms 193ms 10 7 948ms 135ms 11 75 11s756ms 156ms 12 351 59s832ms 170ms 13 524 1m31s 175ms 14 738 3m11s 259ms 15 512 1m37s 189ms 16 131 22s273ms 170ms 17 191 30s319ms 158ms 18 132 22s253ms 168ms 19 280 46s851ms 167ms 20 41 6s233ms 152ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (219413)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-07-15 15:34:37 Duration: 771ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (186339, 186111, 185690, 186647, 186457, 185096, 185182, 186227, 186466, 257625, 186030, 186690, 186821, 186049, 186488, 186682, 186673, 257639, 255021, 186823, 185176, 186822, 185495, 186438, 184786, 185475, 257633, 186039, 185349, 185126, 186693, 184923, 185235, 186818, 186680, 184748, 186211)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-07-15 14:32:33 Duration: 764ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (190710, 206638, 173638)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-07-15 16:11:29 Duration: 752ms
17 143ms 5s687ms 191ms 3,272 10m28s update product_warehouse_inventory set qty_reserve = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Jul 15 02 22 3s464ms 157ms 03 132 21s277ms 161ms 08 5 798ms 159ms 10 2 436ms 218ms 11 204 35s126ms 172ms 12 455 1m24s 186ms 13 335 1m4s 191ms 14 351 1m9s 199ms 15 293 57s853ms 197ms 16 212 39s709ms 187ms 17 289 59s891ms 207ms 18 458 1m33s 204ms 19 436 1m22s 189ms 20 73 13s275ms 181ms 22 2 329ms 164ms 23 3 484ms 161ms -
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 209510 AND warehouse_id = 45;
Date: 2024-07-15 18:40:45 Duration: 5s687ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 221785 AND warehouse_id = 43;
Date: 2024-07-15 17:49:40 Duration: 4s210ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 209510 AND warehouse_id = 45;
Date: 2024-07-15 18:41:00 Duration: 3s639ms
18 148ms 2s905ms 189ms 5,530 17m25s update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Jul 15 02 5 807ms 161ms 03 24 3s918ms 163ms 08 3 487ms 162ms 11 142 24s594ms 173ms 12 728 2m19s 191ms 13 953 3m 188ms 14 508 1m39s 194ms 15 849 2m47s 197ms 16 306 55s893ms 182ms 17 610 1m53s 185ms 18 568 1m46s 188ms 19 665 2m3s 186ms 20 167 29s869ms 178ms 22 1 156ms 156ms 23 1 182ms 182ms -
UPDATE product_warehouse_inventory SET qty_available = 62.0 WHERE product_id = 194198 AND warehouse_id = 35 AND company_id = 1;
Date: 2024-07-15 12:46:56 Duration: 2s905ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 221785 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-07-15 17:49:46 Duration: 1s228ms
-
UPDATE product_warehouse_inventory SET qty_available = 2.0 WHERE product_id = 176362 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-07-15 15:25:56 Duration: 833ms
19 123ms 834ms 162ms 5,763 15m35s 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 #19
Day Hour Count Duration Avg duration Jul 15 00 240 34s261ms 142ms 01 240 33s913ms 141ms 02 240 34s279ms 142ms 03 240 35s861ms 149ms 04 240 33s887ms 141ms 05 240 34s57ms 141ms 06 240 34s174ms 142ms 07 240 34s35ms 141ms 08 240 34s181ms 142ms 09 240 34s176ms 142ms 10 240 34s128ms 142ms 11 240 37s963ms 158ms 12 240 44s44ms 183ms 13 240 53s84ms 221ms 14 242 55s430ms 229ms 15 240 53s90ms 221ms 16 240 42s672ms 177ms 17 241 44s304ms 183ms 18 240 43s240ms 180ms 19 240 44s881ms 187ms 20 240 37s133ms 154ms 21 240 34s513ms 143ms 22 240 34s196ms 142ms 23 240 34s284ms 142ms -
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_stat_progress_vacuum', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_operator', 'pg_catalog.pg_language', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_publication', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_description', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_attribute', 'pg_catalog.pg_am', 'pg_catalog.pg_opclass', 'pg_catalog.pg_namespace', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_policies', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_type', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_database', 'pg_catalog.pg_range', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_collation', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_proc', 'pg_catalog.pg_policy', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_depend', 'pg_catalog.pg_cursors', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_constraint', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_trigger', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_cast', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_transform', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_settings', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_views', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_sequences', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_enum', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_conversion', 'pg_catalog.pg_extension', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_indexes', 'pg_catalog.pg_available_extensions', 'information_schema.sql_implementation_info', 'information_schema.key_column_usage', 'information_schema.routine_routine_usage', 'information_schema.role_routine_grants', 'information_schema.tables', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.foreign_tables', 'information_schema.view_table_usage', 'information_schema.view_column_usage', 'information_schema.column_domain_usage', 'information_schema.routine_column_usage', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.foreign_servers', 'information_schema.attributes', 'information_schema.collations', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.sequences', 'information_schema.routines', 'information_schema.constraint_table_usage', 'information_schema.role_column_grants', 'information_schema.parameters', 'information_schema.referential_constraints', 'information_schema.sql_sizing', 'information_schema.role_usage_grants', 'information_schema.applicable_roles', 'information_schema.column_column_usage', 'information_schema.triggers', 'information_schema.domains', 'information_schema.sql_features', 'information_schema.routine_privileges', 'information_schema.routine_sequence_usage', 'information_schema.foreign_server_options', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraints', 'information_schema.domain_constraints', 'information_schema.foreign_data_wrappers', 'information_schema.character_sets', 'information_schema.collation_character_set_applicability', 'information_schema.user_defined_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.domain_udt_usage', 'information_schema.udt_privileges', 'information_schema.triggered_update_columns', 'information_schema.views', 'information_schema.column_options', 'information_schema.administrable_role_authorizations', 'information_schema.table_constraints', 'information_schema.user_mappings', 'information_schema.element_types', 'information_schema.view_routine_usage', 'information_schema.foreign_table_options', 'information_schema.enabled_roles', 'information_schema.schemata', 'information_schema.column_privileges', 'information_schema.user_mapping_options', 'information_schema.routine_table_usage', 'information_schema.data_type_privileges', 'information_schema.columns', 'information_schema.constraint_column_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 17:06:38 Duration: 834ms
-
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_settings', 'pg_catalog.pg_cast', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_depend', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stats', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_amop', 'pg_catalog.pg_language', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_views', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_group', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_tables', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_operator', 'pg_catalog.pg_am', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_trigger', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_proc', 'pg_catalog.pg_extension', 'pg_catalog.pg_database', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_policy', 'pg_catalog.pg_matviews', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_subscription', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_transform', 'pg_catalog.pg_constraint', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_description', 'pg_catalog.pg_rules', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_amproc', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_conversion', 'pg_catalog.pg_sequences', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_opclass', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_range', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_replication_slots', 'information_schema.column_udt_usage', 'information_schema.routine_column_usage', 'information_schema.column_options', 'information_schema.foreign_server_options', 'information_schema.information_schema_catalog_name', 'information_schema.routines', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.character_sets', 'information_schema.udt_privileges', 'information_schema.triggered_update_columns', 'information_schema.constraint_column_usage', 'information_schema.domain_udt_usage', 'information_schema.administrable_role_authorizations', 'information_schema.check_constraints', 'information_schema.schemata', 'information_schema.table_privileges', 'information_schema.attributes', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.foreign_data_wrappers', 'information_schema.role_udt_grants', 'information_schema.view_column_usage', 'information_schema.key_column_usage', 'information_schema.routine_table_usage', 'information_schema.view_routine_usage', 'information_schema.foreign_table_options', 'information_schema.user_mapping_options', 'information_schema.routine_privileges', 'information_schema.user_defined_types', 'information_schema.referential_constraints', 'information_schema.sql_features', 'information_schema.user_mappings', 'information_schema.usage_privileges', 'information_schema.foreign_servers', 'information_schema.applicable_roles', 'information_schema.domain_constraints', 'information_schema.views', 'information_schema.foreign_tables', 'information_schema.column_column_usage', 'information_schema.routine_sequence_usage', 'information_schema.tables', 'information_schema.collation_character_set_applicability', 'information_schema.role_routine_grants', 'information_schema.table_constraints', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.view_table_usage', 'information_schema.element_types', 'information_schema.domains', 'information_schema.column_domain_usage', 'information_schema.sql_sizing', 'information_schema.foreign_data_wrapper_options', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_routine_usage', 'information_schema.data_type_privileges', 'information_schema.role_usage_grants', 'information_schema.columns', 'information_schema.column_privileges', 'information_schema.constraint_table_usage', 'information_schema.sql_implementation_info', 'information_schema.collations', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 14:28:52 Duration: 816ms
-
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_cast', 'pg_catalog.pg_extension', 'pg_catalog.pg_enum', 'pg_catalog.pg_depend', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_group', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_attribute', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_trigger', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_roles', 'pg_catalog.pg_amop', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_locks', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_opclass', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_settings', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_sequence', 'pg_catalog.pg_rules', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_amproc', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_proc', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_index', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_conversion', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_collation', 'pg_catalog.pg_matviews', 'pg_catalog.pg_policies', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_description', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_indexes', 'pg_catalog.pg_subscription', 'pg_catalog.pg_namespace', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_basebackup', 'information_schema.information_schema_catalog_name', 'information_schema.routine_routine_usage', 'information_schema.sql_implementation_info', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.view_column_usage', 'information_schema.character_sets', 'information_schema.routine_column_usage', 'information_schema.routine_table_usage', 'information_schema.udt_privileges', 'information_schema.domain_udt_usage', 'information_schema.enabled_roles', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_server_options', 'information_schema.schemata', 'information_schema.administrable_role_authorizations', 'information_schema.domain_constraints', 'information_schema.key_column_usage', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.column_privileges', 'information_schema.columns', 'information_schema.routine_sequence_usage', 'information_schema.sequences', 'information_schema.triggers', 'information_schema.constraint_column_usage', 'information_schema.routine_privileges', 'information_schema.user_mapping_options', 'information_schema.element_types', 'information_schema.column_column_usage', 'information_schema.column_domain_usage', 'information_schema.routines', 'information_schema.collation_character_set_applicability', 'information_schema.tables', 'information_schema.user_defined_types', 'information_schema.referential_constraints', 'information_schema.data_type_privileges', 'information_schema.usage_privileges', 'information_schema.foreign_table_options', 'information_schema.foreign_servers', 'information_schema.attributes', 'information_schema.role_column_grants', 'information_schema.table_constraints', 'information_schema.role_routine_grants', 'information_schema.sql_sizing', 'information_schema.foreign_tables', 'information_schema.applicable_roles', 'information_schema.check_constraint_routine_usage', 'information_schema.column_udt_usage', 'information_schema.constraint_table_usage', 'information_schema.view_table_usage', 'information_schema.views', 'information_schema.column_options', 'information_schema.check_constraints', 'information_schema.collations', 'information_schema.domains', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.role_usage_grants', 'information_schema.user_mappings', 'information_schema.role_udt_grants', 'information_schema.view_routine_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-07-15 14:32:07 Duration: 808ms
20 120ms 1s507ms 159ms 7,509 19m59s 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 Jul 15 08 14 1s872ms 133ms 10 1 132ms 132ms 11 196 27s170ms 138ms 12 836 2m11s 157ms 13 1,144 3m4s 161ms 14 829 2m17s 166ms 15 1,074 3m2s 169ms 16 489 1m19s 161ms 17 631 1m37s 154ms 18 1,193 3m7s 156ms 19 781 2m 154ms 20 320 48s597ms 151ms 23 1 120ms 120ms -
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 191092 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-07-15 18:14:48 Duration: 1s507ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 247744 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-07-15 16:52:31 Duration: 991ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 191083 and sol.warehouse_id = 35 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-07-15 17:45:04 Duration: 882ms
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
- 270,126 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 5575 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 4,364 Max number of times the same event was reported
- 5,575 Total events found
Rank Times reported Error 1 4,364 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #1
Day Hour Count Jul 15 02 20 03 134 06 1 08 21 10 2 11 277 12 787 13 381 14 78 15 45 16 242 17 670 18 634 19 816 20 247 22 3 23 6 - 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 product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 205530 AND warehouse_id = 37 AND company_id = 1
Date: 2024-07-15 22:57:01
Statement: UPDATE "product_warehouse_inventory" SET "loc_check_qty"=0.0,"write_uid"=1041,"write_date"=(now() at time zone 'UTC') WHERE id IN (73152)
Date: 2024-07-15 22:57:02
Statement: UPDATE "product_warehouse_inventory" SET "loc_check_qty"=1.0,"write_uid"=1041,"write_date"=(now() at time zone 'UTC') WHERE id IN (73155)
Date: 2024-07-15 22:57:03
2 1,048 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #2
Day Hour Count Jul 15 00 34 01 30 02 27 03 33 04 31 05 33 06 29 07 99 08 71 09 31 10 34 11 30 12 47 13 55 14 60 15 44 16 33 17 44 18 32 19 35 20 28 21 29 22 26 23 133 - 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-07-15 22:50:10
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-07-15 23:00:19
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=58 FOR UPDATE NOWAIT
Date: 2024-07-15 23:06:38
3 139 LOG: process ... still waiting for ShareLock on transaction ... after ... ms
Times Reported Most Frequent Error / Event #3
Day Hour Count Jul 15 03 3 11 2 12 29 13 25 14 13 15 2 16 3 17 23 18 21 19 18 - ERROR: process 910711 still waiting for ShareLock on transaction 286082034 after 1000.049 ms
- ERROR: process 910710 still waiting for ShareLock on transaction 286083812 after 1000.054 ms
- ERROR: process 912513 still waiting for ShareLock on transaction 286088863 after 1000.049 ms
Detail: Process holding the lock: 913021. Wait queue: 910711.
Context: while updating tuple (21934,32) 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 != 1431488 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 != 1431488 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-07-15 12:52:18
Detail: Process holding the lock: 910740. Wait queue: 910710.
Context: while updating tuple (21889,3) 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 != 1473992 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 != 1473992 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-07-15 12:55:36
Detail: Process holding the lock: 913936. Wait queue: 912513.
Context: while updating tuple (21942,27) in relation "account_move"
Statement: UPDATE "account_move" SET "access_token"='cdabe108-0bc1-470b-bf69-023d43e76e6e',"write_uid"=953,"write_date"=(now() at time zone 'UTC') WHERE id IN (1534348)Date: 2024-07-15 13:04:02
4 5 ERROR: deadlock detected
Times Reported Most Frequent Error / Event #4
Day Hour Count Jul 15 11 1 12 1 18 3 - ERROR: deadlock detected
- ERROR: deadlock detected
- ERROR: deadlock detected
Detail: Process 911492 waits for ShareLock on transaction 286066427; blocked by process 922660. Process 922660 waits for ShareLock on transaction 286066426; blocked by process 911492. Process 911492: UPDATE "product_warehouse_inventory" SET "loc_check_qty"=4.0,"write_uid"=977,"write_date"=(now() at time zone 'UTC') WHERE id IN (93443, 93925) Process 922660: UPDATE "product_warehouse_inventory" SET "loc_check_qty"=6.0,"write_uid"=977,"write_date"=(now() at time zone 'UTC') WHERE id IN (366803, 366804)
Context: while updating tuple (3570,5) in relation "product_warehouse_inventory"
Hint: See server log for query details.
Statement: UPDATE "product_warehouse_inventory" SET "loc_check_qty"=4.0,"write_uid"=977,"write_date"=(now() at time zone 'UTC') WHERE id IN (93443, 93925)Date: 2024-07-15 12:32:03
Detail: Process 912026 waits for ShareLock on transaction 286039006; blocked by process 912455. Process 912455 waits for ShareLock on transaction 286039008; blocked by process 912026. Process 912026: UPDATE "sale_order" SET "partner_id"=33977,"partner_invoice_id"=33977,"partner_shipping_id"=33977,"write_uid"=1291,"write_date"=(now() at time zone 'UTC') WHERE id IN (152226) Process 912455: UPDATE "sale_order_line" SET "cus_part_route"=32,"cus_user_id"=1009,"order_partner_id"=33977,"write_uid"=1291,"write_date"=(now() at time zone 'UTC') WHERE id IN (442685, 442686, 442703)
Context: while updating tuple (2663,49) in relation "sale_order"
Hint: See server log for query details.
Statement: UPDATE "sale_order" SET "partner_id"=33977,"partner_invoice_id"=33977,"partner_shipping_id"=33977,"write_uid"=1291,"write_date"=(now() at time zone 'UTC') WHERE id IN (152226)Date: 2024-07-15 11:18:34
Detail: Process 2129546 waits for ShareLock on transaction 286264316; blocked by process 2129496. Process 2129496 waits for ShareLock on transaction 286264302; blocked by process 2129546. Process 2129546: UPDATE product_warehouse_inventory SET qty_reserve = 9.0 WHERE product_id = 198569 AND warehouse_id = 42 Process 2129496: UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 172569 AND warehouse_id = 42
Context: while updating tuple (3790,22) in relation "product_warehouse_inventory"
Hint: See server log for query details.
Statement: UPDATE product_warehouse_inventory SET qty_reserve = 9.0 WHERE product_id = 198569 AND warehouse_id = 42Date: 2024-07-15 18:11:49
5 4 LOG: process ... still waiting for AccessShareLock on relation ... of database ... after ... ms
Times Reported Most Frequent Error / Event #5
Day Hour Count Jul 15 10 4 - ERROR: process 910739 still waiting for AccessShareLock on relation 43699 of database 65946 after 1000.041 ms at character 34
- ERROR: process 910535 still waiting for AccessShareLock on relation 43699 of database 65946 after 1000.035 ms at character 34
- ERROR: process 911195 still waiting for AccessShareLock on relation 43699 of database 65946 after 1000.045 ms at character 93
Detail: Process holding the lock: 912026. Wait queue: 910739.
Statement: SELECT "ir_model_fields".id FROM "ir_model_fields" WHERE ("ir_model_fields"."model" = 'product.template') ORDER BY "ir_model_fields"."name"Date: 2024-07-15 10:33:22
Detail: Process holding the lock: 912026. Wait queue: 910739, 910535, 911660, 911195.
Statement: SELECT "ir_model_fields".id FROM "ir_model_fields" WHERE ("ir_model_fields"."model" = 'psd_custom.inventory_vendor') ORDER BY "ir_model_fields"."name"Date: 2024-07-15 10:33:25
Detail: Process holding the lock: 912026. Wait queue: 910739, 910535, 911660, 911195.
Statement: SELECT f.name, d.json_value FROM ir_default d JOIN ir_model_fields f ON d.field_id=f.id WHERE f.model='website.visitor' AND (d.user_id IS NULL OR d.user_id=4) AND (d.company_id IS NULL OR d.company_id=1) AND d.condition IS NULL ORDER BY d.user_id, d.company_id, d.idDate: 2024-07-15 10:33:26
6 4 LOG: process ... still waiting for ExclusiveLock on tuple (...) of relation ... of database ... after ... ms
Times Reported Most Frequent Error / Event #6
Day Hour Count Jul 15 13 1 14 1 17 2 - ERROR: process 912514 still waiting for ExclusiveLock on tuple (22109,16) of relation 42418 of database 65946 after 1000.063 ms
- ERROR: process 2001349 still waiting for ExclusiveLock on tuple (23987,27) of relation 42418 of database 65946 after 1000.060 ms
- ERROR: process 2016083 still waiting for ExclusiveLock on tuple (23987,27) of relation 42418 of database 65946 after 1000.067 ms
Detail: Process holding the lock: 911188. Wait queue: 912514.
Statement: UPDATE "account_move" SET "message_main_attachment_id"=5564346,"write_uid"=1025,"write_date"=(now() at time zone 'UTC') WHERE id IN (1534786)Date: 2024-07-15 13:38:32
Detail: Process holding the lock: 2037260. Wait queue: 2001349.
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 != 1536323 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 != 1536323 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-07-15 17:47:46
Detail: Process holding the lock: 2001349. Wait queue: 2016083.
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 != 1536325 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 != 1536325 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-07-15 17:47:49
7 3 ERROR: syntax error at or near "..."
Times Reported Most Frequent Error / Event #7
Day Hour Count Jul 15 11 3 - ERROR: syntax error at or near "Roll" at character 132
Statement: select max(id) from sale_history_line where (product_name is not null and product_name ilike 'Cable-GPT 2/14 Ga-Gray Jacket - 100' Roll' and inventory_short_vendor_name ='Tectran') or (product_id=195574) group by product_name
Date: 2024-07-15 11:16:43
8 3 ERROR: null value in column "..." of relation "..." violates not-null constraint
Times Reported Most Frequent Error / Event #8
Day Hour Count Jul 15 15 1 16 1 17 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
- ERROR: null value in column "categ_id" of relation "product_template" violates not-null constraint
Detail: Failing row contains (269639, null, 5200, 1, null, null, null, product, null, 1.00, null, null, t, t, 1, 1, null, t, null, null, null, null, 978, 2024-07-15 15:46:56.314271, 978, 2024-07-15 15:46:56.314271, 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, 484885, never, 0, , 46, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2024-07-15, 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'), 978, (now() at time zone 'UTC'), 978, (now() at time zone 'UTC'), true, false, 0.0, 46, NULL, 1, '', 'no', '2024-07-15', 'E', 'never', 'delivery', false, false, false, false, false, 'no', '1.00', '5200', 0.0, 'no-message', 'receive', true, 'rfq', 0.0, 'no-message', true, 1, 'none', 'no', 'manual', 1, 'none', 'product', 1, 1, 484885, 1, 1) RETURNING idDate: 2024-07-15 15:46:56
Detail: Failing row contains (269646, null, 60062rsj, 1, null, null, null, product, null, 1.00, null, null, t, t, 1, 1, null, t, null, null, null, null, 1295, 2024-07-15 16:41:18.703658, 1295, 2024-07-15 16:41:18.703658, 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, 484910, never, 0, , 37, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2024-07-15, 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'), 1295, (now() at time zone 'UTC'), 1295, (now() at time zone 'UTC'), true, false, 0.0, 37, NULL, 1, '', 'no', '2024-07-15', 'E', 'never', 'delivery', false, false, false, false, false, 'no', '1.00', '60062rsj', 0.0, 'no-message', 'receive', true, 'rfq', 0.0, 'no-message', true, 1, 'none', 'no', 'manual', 1, 'none', 'product', 1, 1, 484910, 1, 1) RETURNING idDate: 2024-07-15 16:41:18
Detail: Failing row contains (269658, null, RPX89CL, 1, null, null, null, product, null, 1.00, null, null, t, t, 1, 1, null, t, null, null, null, null, 1025, 2024-07-15 17:43:28.892178, 1025, 2024-07-15 17:43:28.892178, 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, 484965, never, 0, , 38, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2024-07-15, 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'), 1025, (now() at time zone 'UTC'), 1025, (now() at time zone 'UTC'), true, false, 0.0, 38, NULL, 1, '', 'no', '2024-07-15', 'E', 'never', 'delivery', false, false, false, false, false, 'no', '1.00', 'RPX89CL', 0.0, 'no-message', 'receive', true, 'rfq', 0.0, 'no-message', true, 1, 'none', 'no', 'manual', 1, 'none', 'product', 1, 1, 484965, 1, 1) RETURNING idDate: 2024-07-15 17:43:29
9 2 ERROR: could not create unique index "..."
Times Reported Most Frequent Error / Event #9
Day Hour Count Jul 15 10 2 - ERROR: could not create unique index "vendor_account_master_unique_acc_no"
Detail: Key (account_number)=(0002609) is duplicated.
Statement: ALTER TABLE "vendor_account_master" ADD CONSTRAINT "vendor_account_master_unique_acc_no" unique (account_number)Date: 2024-07-15 10:32:54
10 2 ERROR: could not serialize access due to concurrent delete
Times Reported Most Frequent Error / Event #10
Day Hour Count Jul 15 18 2 - ERROR: could not serialize access due to concurrent delete
- ERROR: could not serialize access due to concurrent delete
Statement: DELETE FROM stock_inventory_line WHERE id IN (3056673, 3056671, 3056672, 3056674, 3056675, 3056676, 3056670, 3056677, 3056678, 3056679, 3056680, 3056681)
Date: 2024-07-15 18:04:42
Statement: DELETE FROM stock_inventory_line WHERE id IN (3056682)
Date: 2024-07-15 18:06:00
11 1 ERROR: duplicate key value violates unique constraint "..."
Times Reported Most Frequent Error / Event #11
Day Hour Count Jul 15 16 1 - ERROR: duplicate key value violates unique constraint "product_template_cat_vendor_default_code_unique"
Detail: Key (cat_vendor, default_code)=(Haldex, 1212010) already exists.
Statement: UPDATE "product_template" SET "can_image_1024_be_zoomed"=false,"cat_part_type"='SPR Brake - Roto Chambers',"cat_prod_type"='Parts',"cat_vendor"='Haldex',"has_configurable_attributes"=false,"inventory_vendor_short_name"='Haldex',"raise_core_warning"=false,"rating_last_value"=0.0,"write_uid"=1035,"write_date"=(now() at time zone 'UTC') WHERE id IN (269642)Date: 2024-07-15 16:06:59