-
Global information
- Generated on Tue Aug 27 00:50:12 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 781,099 log entries in 11s
- Log start from 2024-08-26 00:00:06 to 2024-08-26 23:59:57
-
Overview
Global Stats
- 1,287 Number of unique normalized queries
- 268,378 Number of queries
- 19h14m55s Total query duration
- 2024-08-26 00:00:06 First query
- 2024-08-26 23:59:57 Last query
- 55 queries/s at 2024-08-26 19:11:56 Query peak
- 19h14m55s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 19h14m55s Execute total duration
- 1,633 Number of events
- 11 Number of unique normalized events
- 738 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
- 268,378 Average queries per session
- 19h14m55s 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
- 55 queries/s Query Peak
- 2024-08-26 19:11:56 Date
SELECT Traffic
Key values
- 55 queries/s Query Peak
- 2024-08-26 19:11:56 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 11 queries/s Query Peak
- 2024-08-26 14:30:08 Date
Queries duration
Key values
- 19h14m55s 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) Aug 26 00 2,611 120ms 621ms 139ms 7s305ms 8s824ms 9s297ms 01 2,653 120ms 6s918ms 143ms 7s878ms 9s508ms 15s882ms 02 3,854 120ms 1s874ms 160ms 22s997ms 40s452ms 41s454ms 03 6,127 120ms 998ms 195ms 1m1s 1m9s 1m12s 04 2,686 120ms 1s252ms 136ms 7s595ms 8s165ms 8s940ms 05 2,589 120ms 576ms 137ms 7s214ms 8s451ms 9s213ms 06 2,616 120ms 20s216ms 146ms 7s386ms 9s575ms 27s964ms 07 3,024 120ms 2s536ms 136ms 7s967ms 8s986ms 13s860ms 08 3,170 120ms 2s625ms 140ms 9s971ms 12s117ms 13s105ms 09 3,170 120ms 3m58s 393ms 1m1s 2m8s 4m41s 10 3,987 120ms 7s566ms 173ms 23s407ms 29s40ms 32s386ms 11 16,052 120ms 9s564ms 341ms 3m34s 4m19s 5m50s 12 28,338 120ms 2m55s 276ms 3m45s 3m58s 5m 13 30,322 120ms 12s359ms 273ms 3m11s 3m36s 5m11s 14 23,139 120ms 22s143ms 244ms 2m21s 2m51s 3m16s 15 24,485 120ms 30s223ms 320ms 3m47s 7m1s 10m3s 16 20,157 120ms 27s903ms 263ms 2m16s 2m38s 3m6s 17 20,897 120ms 11s303ms 236ms 2m1s 2m39s 3m4s 18 21,625 120ms 27s233ms 263ms 2m22s 2m34s 2m59s 19 19,163 120ms 19s64ms 260ms 2m11s 2m39s 3m2s 20 13,481 120ms 8s731ms 258ms 1m47s 2m14s 4m25s 21 5,686 120ms 6s110ms 214ms 35s171ms 48s464ms 1m14s 22 4,066 120ms 1s379ms 154ms 16s230ms 18s199ms 25s263ms 23 4,480 120ms 43s137ms 318ms 58s173ms 1m2s 1m18s Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Aug 26 00 2,611 0 139ms 6s933ms 7s305ms 8s937ms 01 2,653 0 143ms 7s255ms 7s878ms 10s143ms 02 3,393 0 158ms 10s811ms 19s250ms 25s491ms 03 4,370 0 205ms 27s690ms 37s712ms 54s935ms 04 2,682 0 135ms 6s814ms 7s536ms 8s175ms 05 2,589 0 137ms 6s591ms 7s214ms 8s764ms 06 2,616 0 146ms 6s685ms 7s386ms 10s80ms 07 3,024 0 136ms 7s496ms 7s967ms 10s14ms 08 3,111 0 138ms 8s384ms 8s763ms 11s50ms 09 3,007 116 397ms 11s207ms 53s99ms 2m19s 10 3,864 0 173ms 14s261ms 20s735ms 28s534ms 11 13,683 0 366ms 2m35s 3m17s 4m58s 12 23,368 0 292ms 2m27s 3m15s 4m27s 13 23,300 0 296ms 2m25s 2m50s 4m8s 14 17,220 0 258ms 1m35s 1m49s 2m28s 15 19,725 0 281ms 2m9s 2m46s 3m37s 16 15,466 0 286ms 1m39s 2m1s 2m37s 17 16,002 0 246ms 1m17s 1m42s 2m32s 18 15,549 0 290ms 1m36s 1m54s 2m19s 19 15,367 0 274ms 1m34s 1m56s 2m26s 20 9,946 0 282ms 1m4s 1m25s 2m18s 21 5,133 0 219ms 23s535ms 29s13ms 1m12s 22 4,028 0 153ms 11s855ms 16s230ms 20s517ms 23 4,350 0 149ms 14s996ms 16s321ms 18s845ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Aug 26 00 0 0 0 0 0ms 0ms 0ms 0ms 01 0 0 0 0 0ms 0ms 0ms 0ms 02 0 459 2 0 171ms 0ms 0ms 10s7ms 03 0 1,752 4 0 171ms 0ms 14s250ms 24s396ms 04 0 4 0 0 376ms 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 53 0 0 169ms 0ms 0ms 1s360ms 09 0 47 0 0 170ms 0ms 0ms 852ms 10 0 123 0 0 176ms 0ms 0ms 3s230ms 11 0 2,362 6 0 193ms 7s116ms 15s980ms 20s227ms 12 0 4,924 25 0 199ms 18s348ms 22s248ms 31s202ms 13 0 6,955 63 0 199ms 24s945ms 27s256ms 43s86ms 14 0 5,847 68 0 205ms 19s104ms 32s571ms 50s731ms 15 0 4,606 149 0 480ms 20s168ms 26s846ms 4m13s 16 0 4,662 24 0 188ms 17s127ms 24s539ms 29s450ms 17 0 4,838 51 0 202ms 18s288ms 22s228ms 30s83ms 18 0 6,033 32 0 193ms 23s731ms 27s759ms 33s262ms 19 0 3,747 47 0 206ms 14s639ms 21s489ms 26s909ms 20 0 3,509 24 0 192ms 14s375ms 18s636ms 28s809ms 21 0 553 0 0 170ms 1s18ms 2s96ms 7s924ms 22 0 38 0 0 170ms 0ms 0ms 1s556ms 23 0 1 129 0 5s956ms 0ms 35s954ms 48s16ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Aug 26 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 Aug 26 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 Aug 26 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 Aug 26 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 Aug 26 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) Aug 26 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 Aug 26 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 Aug 26 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 Aug 26 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
- ExclusiveLock Main Lock Type
- 200 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query 1 103 16m11s 1s779ms 29s193ms 9s435ms update "sale_order" set "carrier_id" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);
Date: 2024-08-26 15:34:41
2 41 5m26s 2s432ms 13s642ms 7s954ms delete from sale_order_line where id in (...);-
DELETE FROM sale_order_line WHERE id IN (465034);
Date: 2024-08-26 15:36:08
-
DELETE FROM sale_order_line WHERE id IN (465042);
Date: 2024-08-26 15:36:44
-
DELETE FROM sale_order_line WHERE id IN (465034);
Date: 2024-08-26 15:36:18
3 12 2m9s 1s187ms 26s893ms 10s790ms update "sale_order" set "carrier_id" = ?, "margin" = ?, "margin_percent" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order" SET "carrier_id" = 1, "margin" = '-35.95', "margin_percent" = - 0.09674381054897739, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);
Date: 2024-08-26 15:35:48
4 9 1m55s 5s358ms 25s982ms 12s790ms update "sale_order" set "amount_total" = ?, "amount_untaxed" = ?, "carrier_id" = ?, "margin" = ?, "margin_percent" = ?.?, "unpaid_amount_total" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order" SET "amount_total" = '445.92', "amount_untaxed" = '445.92', "carrier_id" = 1, "margin" = '4.86', "margin_percent" = 0.010898815931108719, "unpaid_amount_total" = '445.92', "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);
Date: 2024-08-26 15:35:34
5 17 1m1s 1s727ms 9s470ms 3s625ms 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 != 1618179 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 != 1618179 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-08-26 14:07:02
6 5 41s260ms 1s501ms 19s696ms 8s252ms update "sale_order" set "core_bank_transaction" = false, "margin" = ?, "margin_percent" = ?.?, "unpaid_amount_total" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order" SET "core_bank_transaction" = false, "margin" = '44.86', "margin_percent" = 0.10060100466451381, "unpaid_amount_total" = '445.92', "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);
Date: 2024-08-26 15:35:11
7 5 26s654ms 1s10ms 8s272ms 5s330ms update "sale_order" set "amount_total" = ?, "amount_untaxed" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order" SET "amount_total" = '297.28', "amount_untaxed" = '297.28', "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);
Date: 2024-08-26 15:35:48
8 2 26s448ms 12s813ms 13s635ms 13s224ms update "sale_order" set "amount_total" = ?, "amount_untaxed" = ?, "carrier_id" = ?, "margin" = ?, "margin_percent" = ?.?, "unpaid_amount_total" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order" SET "amount_total" = '284.26', "amount_untaxed" = '284.26', "carrier_id" = 1, "margin" = '-80.41', "margin_percent" = - 0.28287483289945825, "unpaid_amount_total" = '284.26', "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);
Date: 2024-08-26 15:40:23
9 2 8s278ms 2s464ms 5s814ms 4s139ms 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" = 5654063, "write_uid" = 1, "write_date" = (now() at time zone 'UTC') WHERE id IN (1618826);
Date: 2024-08-26 12:57:14
10 1 8s42ms 8s42ms 8s42ms 8s42ms update product_warehouse_inventory set qty_shipped_not_invoiced = case when ?.? is not null then greatest ((?.? - ?.?) + (?.? - ?.?), ?) else greatest ((?.? - ?.?), ?) end where product_id = ? and warehouse_id = ? and company_id = ?;-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 15.0 IS NOT NULL THEN GREATEST ((0.0 - 0.0) + (15.0 - 15.0), 0) ELSE GREATEST ((0.0 - 0.0), 0) END where product_id = 216173 and warehouse_id = 35 and company_id = 1;
Date: 2024-08-26 13:36:54
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 18.0 IS NOT NULL THEN GREATEST ((341.0 - 341.0) + (18.0 - 18.0), 0) ELSE GREATEST ((341.0 - 341.0), 0) END where product_id = 213911 and warehouse_id = 35 and company_id = 1;
Date: 2024-08-26 13:36:56
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 3.0 IS NOT NULL THEN GREATEST ((0.0 - 0.0) + (3.0 - 3.0), 0) ELSE GREATEST ((0.0 - 0.0), 0) END where product_id = 172453 and warehouse_id = 45 and company_id = 1;
Date: 2024-08-26 13:15:25
11 1 1s567ms 1s567ms 1s567ms 1s567ms update "sale_order" set "amount_total" = ?, "amount_untaxed" = ?, "margin" = ?, "margin_percent" = ?.?, "unpaid_amount_total" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order" SET "amount_total" = '284.26', "amount_untaxed" = '284.26', "margin" = '-40.41', "margin_percent" = - 0.1421585872088933, "unpaid_amount_total" = '284.26', "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);
Date: 2024-08-26 15:40:49
12 1 1s539ms 1s539ms 1s539ms 1s539ms update "sale_order_line" set "cus_part_route" = ?, "cus_user_id" = ?, "order_partner_id" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order_line" SET "cus_part_route" = NULL, "cus_user_id" = 1027, "order_partner_id" = 44447, "write_uid" = 1302, "write_date" = (now() at time zone 'UTC') WHERE id IN (472386, 466236, 471900);
Date: 2024-08-26 20:18:40
13 1 1s395ms 1s395ms 1s395ms 1s395ms delete from monthly_statement_line where id in (...);-
DELETE FROM monthly_statement_line WHERE id IN (1213950, 1213871, 1213872, 1213873, 1213869, 1213868, 1213867, 1213874, 1213949, 1213948, 1213870, 1213878, 1213879, 1213875, 1213876, 1213877, 1213883, 1213884, 1213885, 1213886, 1213887, 1213880, 1213881, 1213882, 1213891, 1213888, 1213889, 1213890, 1213892, 1213893, 1213894, 1213895, 1213896, 1213897, 1213899, 1213898, 1213951, 1213900, 1213901, 1213905, 1213904, 1213903, 1213902, 1213906, 1213910, 1213907, 1213908, 1213909, 1213911, 1213912, 1213913, 1213916, 1213914, 1213915, 1213952, 1213917, 1213919, 1213920, 1213918, 1213922, 1213921, 1213923, 1213924, 1213954, 1213925, 1213926, 1213927, 1213928, 1213953, 1213929, 1213930, 1213932, 1213933, 1213931, 1213936, 1213937, 1213934, 1213935, 1213939, 1213941, 1213940, 1213938, 1213944, 1213942, 1213943, 1213946, 1213945, 1213947);
Date: 2024-08-26 12:49:09
Queries that waited the most
Rank Wait time Query 1 29s193ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
2 26s893ms UPDATE "sale_order" SET "carrier_id" = 1, "margin" = '-35.95', "margin_percent" = - 0.09674381054897739, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
3 25s982ms UPDATE "sale_order" SET "amount_total" = '445.92', "amount_untaxed" = '445.92', "carrier_id" = 1, "margin" = '4.86', "margin_percent" = 0.010898815931108719, "unpaid_amount_total" = '445.92', "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
4 24s429ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
5 23s992ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
6 22s184ms UPDATE "sale_order" SET "carrier_id" = 1, "margin" = '-35.95', "margin_percent" = - 0.09674381054897739, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
7 20s908ms UPDATE "sale_order" SET "amount_total" = '445.92', "amount_untaxed" = '445.92', "carrier_id" = 1, "margin" = '4.86', "margin_percent" = 0.010898815931108719, "unpaid_amount_total" = '445.92', "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
8 20s666ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
9 20s393ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
10 19s696ms UPDATE "sale_order" SET "core_bank_transaction" = false, "margin" = '4.05', "margin_percent" = 0.010898815931108717, "unpaid_amount_total" = '371.60', "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
11 18s287ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:11 ]
12 18s205ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
13 17s974ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
14 17s59ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:11 ]
15 16s763ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:35:34 ]
16 16s715ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:11 ]
17 16s544ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:45 ]
18 16s527ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:11 ]
19 16s380ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:36:11 ]
20 15s984ms UPDATE "sale_order" SET "carrier_id" = NULL, "write_uid" = 1271, "write_date" = (now() at time zone 'UTC') WHERE id IN (159284);[ Date: 2024-08-26 15:40:23 ]
-
Queries
Queries by type
Key values
- 217,057 Total read queries
- 51,318 Total write queries
Queries by database
Key values
- unknown Main database
- 268,378 Requests
- 19h14m55s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 268,810 Requests
User Request type Count Duration unknown Total 268,810 19h15m53s copy to 116 13m28s cte 49 21s193ms delete 624 46m47s others 3 2s393ms select 217,489 15h39m22s tcl 16 2s487ms update 50,513 2h35m48s Duration by user
Key values
- 19h15m53s (unknown) Main time consuming user
User Request type Count Duration unknown Total 268,810 19h15m53s copy to 116 13m28s cte 49 21s193ms delete 624 46m47s others 3 2s393ms select 217,489 15h39m22s tcl 16 2s487ms update 50,513 2h35m48s Queries by host
Key values
- unknown Main host
- 268,810 Requests
- 19h15m53s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 268,378 Requests
- 19h14m55s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-08-26 09:29:39 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 247,371 100-500ms duration
Slowest individual queries
Rank Duration Query 1 3m58s 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-08-26 09:10:21 ]
2 2m55s SELECT "item_list_line".id FROM "item_list_line" WHERE ("item_list_line"."product_id" in (269248)) ORDER BY "item_list_line"."id";[ Date: 2024-08-26 12:21:52 ]
3 2m7s 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-08-26 09:04:12 ]
4 1m57s 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-08-26 09:06:21 ]
5 43s137ms DELETE FROM account_move_line WHERE id IN (5543936, 5543937, 5543938, 5543939, 5543940, 5543941, 5543942, 5543943, 5543944, 5543945, 5543946, 5543947, 5543948, 5543949, 5543950, 5543951, 5543952, 5543953, 5543954, 5717589, 5717590);[ Date: 2024-08-26 23:30:50 ]
6 37s830ms COPY public.account_move_line (id, move_id, move_name, date, ref, parent_state, journal_id, company_id, company_currency_id, account_id, account_root_id, sequence, name, quantity, price_unit, discount, debit, credit, balance, amount_currency, price_subtotal, price_total, reconciled, blocked, date_maturity, currency_id, partner_id, product_uom_id, product_id, reconcile_model_id, payment_id, statement_line_id, statement_id, tax_line_id, tax_group_id, tax_base_amount, tax_exigible, tax_repartition_line_id, tax_audit, amount_residual, amount_residual_currency, full_reconcile_id, matching_number, analytic_account_id, display_type, is_rounding_line, exclude_from_invoice_tab, create_uid, create_date, write_uid, write_date, expected_pay_date, internal_note, next_action_date, followup_line_id, followup_date, is_anglo_saxon_line, purchase_line_id, branch_id, branch_name, vehicle_id, move_options, sign_product_qty, sign_price_subtotal, new_product_qty, sale_line_id, child_sale_line_id, main_invoice_line_id, core_bank_transaction, is_rtv_line, core_qty, rebate_amount, cost_price, is_visible_in_report, is_labour, can_be_paid, bal_core_bank_id, repair_line_id, inv_back_order_qty, sale_back_order_qty, product_pricelist_item_id, is_discount, is_sale_tax, auto_reconcile, is_writeoff, is_extra_line, is_carry_forward) TO stdout;[ Date: 2024-08-26 09:01:01 ]
7 31s23ms DELETE FROM account_move_line WHERE id IN (5635532, 5635533, 5635534, 5635535, 5635536, 5635537, 5635538, 5635539, 5635540, 5635541, 5635542, 5635543, 5635544, 5717449, 5717450);[ Date: 2024-08-26 23:18:39 ]
8 30s780ms DELETE FROM account_move_line WHERE id IN (5722814, 5722815, 5722816, 5722817, 5722818, 5722819, 5722820, 5722821, 5722822, 5722823, 5722824, 5722825, 5722826, 5722827, 5722828);[ Date: 2024-08-26 23:41:19 ]
9 30s725ms SELECT "item_list_line".id FROM "item_list_line" WHERE ("item_list_line"."product_id" in (269249)) ORDER BY "item_list_line"."id";[ Date: 2024-08-26 12:21:53 ]
10 30s640ms DELETE FROM account_move_line WHERE id IN (5712679, 5712680, 5712681, 5712682, 5712683, 5712684, 5712685, 5712686, 5712687, 5720182, 5720183, 5720184, 5720185, 5720186, 5720187);[ Date: 2024-08-26 23:42:54 ]
11 30s223ms DELETE FROM sale_order_line WHERE id IN (465034);[ Date: 2024-08-26 15:36:08 ]
12 29s975ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-08-31')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id UNION ALL SELECT account_move_line.account_id AS groupby, 'initial_balance' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-07-31')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in (1465))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;[ Date: 2024-08-26 15:53:13 ]
13 28s696ms DELETE FROM account_move_line WHERE id IN (5723097, 5723098, 5723099, 5723100, 5723101, 5723102, 5723103, 5723104, 5723105, 5723106, 5723107, 5723108, 5723109, 5723110);[ Date: 2024-08-26 23:41:54 ]
14 27s903ms 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-08-26'::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-08-26'::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-08-26'::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-08-26'::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-08-26 16:55:35 ]
15 27s234ms 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-08-26'::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-08-26'::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-08-26'::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-08-26'::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-08-26 16:53:40 ]
16 27s233ms SELECT min("account_move_line".id) AS id, count("account_move_line".id) AS "account_id_count", min("account_move_line"."date") AS "date", sum("account_move_line"."debit") AS "debit", sum("account_move_line"."credit") AS "credit", sum("account_move_line"."balance") AS "balance", sum("account_move_line"."amount_currency") AS "amount_currency", "account_move_line"."account_id" as "account_id" FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN "account_account" AS "account_move_line__account_id" ON ("account_move_line"."account_id" = "account_move_line__account_id"."id") LEFT JOIN "res_company" AS "account_move_line__account_id__company_id" ON ("account_move_line__account_id"."company_id" = "account_move_line__account_id__company_id"."id") WHERE ((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line"."parent_state" = 'posted') AND (((unaccent ("account_move_line__move_id"."name"::text) ilike unaccent ('%N-BILL-07198%')) OR (unaccent ("account_move_line__move_id"."ref"::text) ilike unaccent ('%N-BILL-07198%'))) OR FALSE))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY "account_move_line"."account_id", COALESCE("account_move_line__account_id"."is_off_balance", false), "account_move_line__account_id"."code", "account_move_line__account_id__company_id"."sequence", "account_move_line__account_id__company_id"."name" ORDER BY COALESCE("account_move_line__account_id"."is_off_balance", false), "account_move_line__account_id"."code", "account_move_line__account_id__company_id"."sequence", "account_move_line__account_id__company_id"."name" LIMIT 80;[ Date: 2024-08-26 18:56:34 ]
17 26s940ms DELETE FROM sale_order_line WHERE id IN (465042);[ Date: 2024-08-26 15:36:44 ]
18 26s815ms SELECT account_move_line.account_id AS groupby, 'sum' AS key, MAX(account_move_line.date) AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2024-08-31')) AND (("account_move_line"."date" >= '2024-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.company_id AS groupby, 'unaffected_earnings' AS key, NULL AS max_date, 0 AS period_number, COALESCE(SUM(account_move_line.amount_currency), 0.0) AS amount_currency, SUM(ROUND(account_move_line.debit * currency_table.rate, currency_table.precision)) AS debit, SUM(ROUND(account_move_line.credit * currency_table.rate, currency_table.precision)) AS credit, SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE (((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND ("account_move_line__move_id"."state" = 'posted')) AND ((unaccent ("account_move_line"."account_id"::text) ilike unaccent ('%%')) OR "account_move_line"."account_id" IS NULL)) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" IS NULL or "account_account_type"."include_initial_balance" = false))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.company_id;[ Date: 2024-08-26 15:41:31 ]
19 26s788ms DELETE FROM sale_order_line WHERE id IN (465034);[ Date: 2024-08-26 15:36:18 ]
20 26s723ms DELETE FROM account_move_line WHERE id IN (5705928, 5705929, 5705930, 5705931, 5705932, 5705933, 5705934, 5718062, 5718063, 5718064, 5718065, 5718066, 5718067);[ Date: 2024-08-26 23:35:21 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 6h9m4s 117,711 120ms 2s197ms 188ms 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 Aug 26 00 2,360 5m27s 138ms 01 2,371 5m23s 136ms 02 2,482 5m38s 136ms 03 2,380 5m35s 141ms 04 2,415 5m22s 133ms 05 2,333 5m16s 135ms 06 2,361 5m23s 137ms 07 2,693 5m52s 130ms 08 2,802 6m16s 134ms 09 2,679 6m11s 138ms 10 3,254 7m25s 136ms 11 5,042 15m29s 184ms 12 8,675 32m22s 223ms 13 9,268 38m12s 247ms 14 8,944 29m1s 194ms 15 8,445 30m4s 213ms 16 8,609 29m56s 208ms 17 9,190 27m50s 181ms 18 8,214 30m2s 219ms 19 7,375 30m14s 246ms 20 5,019 16m3s 192ms 21 3,548 8m40s 146ms 22 3,669 8m47s 143ms 23 3,583 8m23s 140ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 13:36:03') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1035"', '["pointspring_master","calendar.alarm",19573]', '["pointspring_master","mail.channel",66]', '["pointspring_master","mail.channel",432]', '["pointspring_master","mail.channel",476]', '["pointspring_master","mail.channel",570]', '["pointspring_master","mail.channel",637]', '["pointspring_master","mail.channel",640]', '["pointspring_master","res.partner",19573]', '["pointspring_master","ir.needaction",19573]'))) ORDER BY "bus_bus"."id";
Date: 2024-08-26 13:36:56 Duration: 2s197ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 15:48:03') 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-08-26 15:48:55 Duration: 2s165ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 13:36:03') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19503]', '["pointspring_master","mail.channel",148]', '["pointspring_master","mail.channel",149]', '["pointspring_master","mail.channel",150]', '["pointspring_master","mail.channel",448]', '["pointspring_master","mail.channel",546]', '["pointspring_master","mail.channel",551]', '["pointspring_master","mail.channel",569]', '["pointspring_master","res.partner",19503]', '["pointspring_master","ir.needaction",19503]'))) ORDER BY "bus_bus"."id";
Date: 2024-08-26 13:36:56 Duration: 2s164ms
2 53m25s 8,113 356ms 2s113ms 395ms select id, product_id, warehouse_id, loc_check_qty, coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ?;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Aug 26 02 116 42s361ms 365ms 03 386 2m21s 366ms 08 4 1s502ms 375ms 09 6 2s355ms 392ms 10 25 9s194ms 367ms 11 508 3m20s 393ms 12 898 6m11s 413ms 13 1,028 7m1s 409ms 14 731 4m47s 393ms 15 703 4m39s 397ms 16 930 6m 387ms 17 722 4m44s 394ms 18 849 5m32s 391ms 19 519 3m30s 405ms 20 543 3m26s 380ms 21 139 51s198ms 368ms 22 6 2s202ms 367ms -
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 12:41:24 Duration: 2s113ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 17:55:29 Duration: 1s478ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 18:40:12 Duration: 1s395ms
3 50m32s 3,495 691ms 3s131ms 867ms 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 Aug 26 10 89 1m5s 735ms 11 329 4m23s 799ms 12 454 7m13s 954ms 13 600 9m38s 963ms 14 360 5m2s 841ms 15 406 5m52s 868ms 16 255 3m29s 821ms 17 264 3m39s 832ms 18 297 4m 809ms 19 159 2m24s 908ms 20 230 3m4s 803ms 21 33 24s2ms 727ms 22 19 14s18ms 737ms -
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 ('%%N31%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%N3-1-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%N3-1-%'))) 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-08-26 13:48:12 Duration: 3s131ms
-
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 ('%%N311%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%N3-1-1%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%N3-1-1%'))) 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-08-26 13:48:12 Duration: 2s622ms
-
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 ('%%489xfa%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489xfa%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489xfa%'))) 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-08-26 12:41:25 Duration: 2s605ms
4 48m42s 8,112 290ms 2s710ms 360ms select pwi.id as pwi_id, pwi.loc_check_qty as src_loc_check_qty, pwi.rep_loc_check_qty as ex_rep_loc_check_qty, sw.id as replenish_wh_id, coalesce(rep_pwi.loc_check_qty, ?) as rep_loc_check_qty from product_warehouse_inventory pwi join stock_warehouse sw on sw.branch_id = pwi.replenish_branch_id left join product_warehouse_inventory rep_pwi on rep_pwi.warehouse_id = sw.id and rep_pwi.product_id = pwi.product_id where pwi.replenish_branch_id is not null and pwi.rep_loc_check_qty != (pwi.loc_check_qty + coalesce(rep_pwi.loc_check_qty, ?));Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Aug 26 02 116 35s530ms 306ms 03 386 1m59s 309ms 08 4 1s222ms 305ms 09 6 1s881ms 313ms 10 25 7s556ms 302ms 11 508 2m57s 349ms 12 898 6m3s 404ms 13 1,027 6m46s 395ms 14 731 4m17s 352ms 15 703 4m20s 370ms 16 930 5m16s 340ms 17 721 4m9s 346ms 18 850 4m56s 348ms 19 519 3m20s 385ms 20 543 3m2s 336ms 21 139 43s563ms 313ms 22 6 1s854ms 309ms -
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-08-26 11:57:51 Duration: 2s710ms
-
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-08-26 15:35:16 Duration: 2s409ms
-
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-08-26 12:39:14 Duration: 1s741ms
5 36m50s 2,651 343ms 1s872ms 833ms 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 Aug 26 11 1,927 27m57s 870ms 12 601 7m59s 798ms 13 42 21s565ms 513ms 16 30 11s396ms 379ms 17 13 5s38ms 387ms 18 26 9s943ms 382ms 19 9 4s386ms 487ms 20 3 1s43ms 347ms -
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s872ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s701ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s581ms
6 35m35s 11,547 158ms 888ms 184ms update product_warehouse_inventory set loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) - coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Aug 26 02 222 37s653ms 169ms 03 899 2m32s 169ms 08 3 524ms 174ms 09 2 348ms 174ms 10 28 4s847ms 173ms 11 858 2m42s 189ms 12 1,249 4m1s 193ms 13 1,355 4m20s 192ms 14 866 2m39s 184ms 15 866 2m43s 188ms 16 1,303 3m55s 181ms 17 951 2m54s 183ms 18 1,286 3m55s 183ms 19 733 2m21s 192ms 20 732 2m11s 179ms 21 186 31s918ms 171ms 22 8 1s377ms 172ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(4.0, 0) + COALESCE(0.0, 0) - COALESCE(5.0, 0) WHERE product_id = 250760 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 12:56:25 Duration: 888ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(0.0, 0) + COALESCE(0.0, 0) - COALESCE(1.0, 0) WHERE product_id = 269257 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-08-26 13:13:51 Duration: 836ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(26.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 203728 AND warehouse_id = 35 AND company_id = 1;
Date: 2024-08-26 15:31:35 Duration: 780ms
7 30m21s 9,849 165ms 755ms 184ms update product_warehouse_inventory set qty_shipped_not_invoiced = case when ?.? is not null then greatest ((?.? - ?.?) + (?.? - ?.?), ?) else greatest ((?.? - ?.?), ?) end where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Aug 26 08 28 4s739ms 169ms 09 11 1s875ms 170ms 10 35 6s376ms 182ms 11 404 1m11s 176ms 12 722 2m17s 190ms 13 1,409 4m30s 191ms 14 699 2m9s 185ms 15 1,001 3m11s 191ms 16 684 2m3s 180ms 17 780 2m22s 182ms 18 1,868 5m36s 180ms 19 1,435 4m26s 185ms 20 718 2m10s 181ms 21 48 8s204ms 170ms 22 7 1s200ms 171ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 15.0 IS NOT NULL THEN GREATEST ((0.0 - 0.0) + (15.0 - 15.0), 0) ELSE GREATEST ((0.0 - 0.0), 0) END where product_id = 216173 and warehouse_id = 35 and company_id = 1;
Date: 2024-08-26 13:36:54 Duration: 755ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 18.0 IS NOT NULL THEN GREATEST ((341.0 - 341.0) + (18.0 - 18.0), 0) ELSE GREATEST ((341.0 - 341.0), 0) END where product_id = 213911 and warehouse_id = 35 and company_id = 1;
Date: 2024-08-26 13:36:56 Duration: 612ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 3.0 IS NOT NULL THEN GREATEST ((0.0 - 0.0) + (3.0 - 3.0), 0) ELSE GREATEST ((0.0 - 0.0), 0) END where product_id = 172453 and warehouse_id = 45 and company_id = 1;
Date: 2024-08-26 13:15:25 Duration: 607ms
8 26m35s 148 6s338ms 30s223ms 10s778ms delete from sale_order_line where id in (...);Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Aug 26 11 1 7s12ms 7s12ms 12 3 22s116ms 7s372ms 13 1 7s500ms 7s500ms 14 5 35s338ms 7s67ms 15 120 23m8s 11s571ms 16 3 21s47ms 7s15ms 17 5 33s32ms 6s606ms 18 4 34s533ms 8s633ms 19 1 13s344ms 13s344ms 20 5 32s632ms 6s526ms -
DELETE FROM sale_order_line WHERE id IN (465034);
Date: 2024-08-26 15:36:08 Duration: 30s223ms
-
DELETE FROM sale_order_line WHERE id IN (465042);
Date: 2024-08-26 15:36:44 Duration: 26s940ms
-
DELETE FROM sale_order_line WHERE id IN (465034);
Date: 2024-08-26 15:36:18 Duration: 26s788ms
9 24m11s 2,644 462ms 1s951ms 549ms 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 #9
Day Hour Count Duration Avg duration Aug 26 01 3 1s433ms 477ms 06 4 1s862ms 465ms 09 6 2s875ms 479ms 10 24 11s276ms 469ms 11 191 1m39s 522ms 12 424 4m5s 580ms 13 411 3m57s 578ms 14 367 3m20s 546ms 15 271 2m35s 572ms 16 209 1m44s 498ms 17 238 2m2s 512ms 18 240 2m7s 530ms 19 168 1m36s 575ms 20 69 36s266ms 525ms 21 16 7s476ms 467ms 22 3 1s416ms 472ms -
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-08-26 12:00:27 Duration: 1s951ms
-
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.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-08-26 11:52:26 Duration: 1s814ms
-
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/%-922b3e6/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-08-26 15:55:04 Duration: 1s749ms
10 22m41s 8,671 120ms 992ms 157ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ("product_warehouse_inventory"."product_id" in (...)) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Aug 26 01 1 141ms 141ms 02 131 20s892ms 159ms 03 256 1m5s 256ms 09 2 270ms 135ms 10 28 3s741ms 133ms 11 437 1m5s 150ms 12 2,275 5m29s 144ms 13 1,948 5m48s 178ms 14 315 52s300ms 166ms 15 405 1m4s 159ms 16 214 30s470ms 142ms 17 286 41s642ms 145ms 18 249 44s71ms 176ms 19 1,467 3m23s 138ms 20 638 1m26s 136ms 21 18 2s290ms 127ms 22 1 125ms 125ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (186481)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-08-26 13:36:55 Duration: 992ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (217835)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-08-26 12:56:25 Duration: 934ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (180674, 266614, 180597, 180643, 180554)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-08-26 13:11:09 Duration: 816ms
11 17m37s 5,615 160ms 1s35ms 188ms update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Aug 26 02 4 690ms 172ms 03 30 5s57ms 168ms 09 6 1s38ms 173ms 10 8 1s369ms 171ms 11 168 30s373ms 180ms 12 633 2m5s 198ms 13 778 2m31s 194ms 14 751 2m20s 187ms 15 650 2m5s 193ms 16 577 1m43s 179ms 17 733 2m14s 182ms 18 593 1m50s 186ms 19 314 1m 193ms 20 336 59s892ms 178ms 21 33 5s650ms 171ms 22 1 168ms 168ms -
UPDATE product_warehouse_inventory SET qty_available = 2.0 WHERE product_id = 193726 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:55 Duration: 1s35ms
-
UPDATE product_warehouse_inventory SET qty_available = - 1.0 WHERE product_id = 269089 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:54 Duration: 564ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 193768 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:56 Duration: 477ms
12 17m36s 5,153 166ms 980ms 205ms select coalesce(sum(pwi.max_product_uom_qty), ?) as tmq from forecasted_data fd inner join item_supply_plan as isp on isp.id = fd.item_supply_plan_id inner join product_warehouse_inventory pwi on fd.product_id = pwi.product_id and isp.branch_id = pwi.replenish_branch_id where isp.id = ? and fd.product_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Aug 26 02 152 27s241ms 179ms 03 260 46s666ms 179ms 11 7 1s734ms 247ms 12 439 1m35s 217ms 13 722 2m35s 215ms 14 696 2m19s 199ms 15 1,477 5m17s 214ms 16 201 39s362ms 195ms 17 313 1m2s 199ms 18 322 1m5s 202ms 19 107 23s373ms 218ms 20 64 12s380ms 193ms 21 393 1m10s 180ms -
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 = 49627 and fd.product_id = 209394;
Date: 2024-08-26 15:31:35 Duration: 980ms
-
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 = 49822 and fd.product_id = 174022;
Date: 2024-08-26 18:55:25 Duration: 916ms
-
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 = 49760 and fd.product_id = 209392;
Date: 2024-08-26 15:36:14 Duration: 664ms
13 15m27s 5,493 120ms 693ms 168ms 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 Aug 26 11 463 1m18s 169ms 12 904 2m46s 183ms 13 749 2m9s 172ms 14 617 1m39s 161ms 15 959 2m42s 169ms 16 600 1m28s 148ms 17 444 1m12s 162ms 18 274 42s745ms 156ms 19 260 46s620ms 179ms 20 223 40s729ms 182ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 208664) 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" = '46')))))) 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-08-26 12:08:15 Duration: 693ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 220868) 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-08-26 20:30:49 Duration: 531ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 254609) 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-08-26 20:30:50 Duration: 499ms
14 14m57s 866 892ms 2s449ms 1s36ms 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 #14
Day Hour Count Duration Avg duration Aug 26 11 19 17s839ms 938ms 12 72 1m16s 1s62ms 13 120 2m13s 1s116ms 14 75 1m15s 1s8ms 15 89 1m33s 1s47ms 16 74 1m12s 978ms 17 127 2m5s 989ms 18 123 2m6s 1s32ms 19 114 2m2s 1s78ms 20 53 52s639ms 993ms -
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 ('%6.5-4-5101-1%')) 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 ('%6.5-4-5101-1%'))) 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 ('%6.5-4-5101-1%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%6.5-4-5101-1%')))))) 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-08-26 15:27:28 Duration: 2s449ms
-
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 ('%99705%')) 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 ('%99705%'))) 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 ('%99705%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%99705%')))))) 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-08-26 15:39:34 Duration: 2s215ms
-
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 ('%xk3124707qp%')) 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 ('%xk3124707qp%'))) 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 ('%xk3124707qp%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%xk3124707qp%')))))) 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-08-26 13:45:24 Duration: 1s846ms
15 14m54s 5,763 139ms 885ms 155ms 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 #15
Day Hour Count Duration Avg duration Aug 26 00 240 34s647ms 144ms 01 240 34s417ms 143ms 02 240 34s586ms 144ms 03 240 34s864ms 145ms 04 240 34s228ms 142ms 05 240 34s220ms 142ms 06 240 34s185ms 142ms 07 240 34s255ms 142ms 08 240 34s192ms 142ms 09 240 34s759ms 144ms 10 240 34s341ms 143ms 11 243 41s562ms 171ms 12 240 45s263ms 188ms 13 240 44s898ms 187ms 14 240 40s304ms 167ms 15 240 41s547ms 173ms 16 240 38s449ms 160ms 17 240 38s514ms 160ms 18 240 39s66ms 162ms 19 240 42s467ms 176ms 20 240 38s185ms 159ms 21 240 35s351ms 147ms 22 240 34s765ms 144ms 23 240 34s968ms 145ms -
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_seclabels', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_constraint', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_collation', 'pg_catalog.pg_rules', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_index', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_user', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_conversion', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_group', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_attribute', 'pg_catalog.pg_amproc', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_database', 'pg_catalog.pg_locks', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_cast', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_subscription', 'pg_catalog.pg_matviews', 'pg_catalog.pg_indexes', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_trigger', 'pg_catalog.pg_enum', 'pg_catalog.pg_description', 'pg_catalog.pg_extension', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_am', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_namespace', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_proc', 'pg_catalog.pg_operator', 'pg_catalog.pg_language', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_depend', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_views', 'pg_catalog.pg_stats', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_type', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_policy', 'pg_catalog.pg_policies', 'pg_catalog.pg_settings', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_range', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_wal_receiver', 'information_schema.routine_column_usage', 'information_schema.sql_implementation_info', 'information_schema.table_constraints', 'information_schema.triggers', 'information_schema.foreign_data_wrappers', 'information_schema.user_mapping_options', 'information_schema.check_constraints', 'information_schema.triggered_update_columns', 'information_schema.foreign_servers', 'information_schema.sql_features', 'information_schema.column_privileges', 'information_schema.sequences', 'information_schema.usage_privileges', 'information_schema.view_column_usage', 'information_schema.routines', 'information_schema.sql_sizing', 'information_schema.data_type_privileges', 'information_schema.constraint_table_usage', 'information_schema.role_table_grants', 'information_schema.role_usage_grants', 'information_schema.view_routine_usage', 'information_schema.foreign_table_options', 'information_schema.collations', 'information_schema.parameters', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.column_options', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_tables', 'information_schema.applicable_roles', 'information_schema.view_table_usage', 'information_schema.tables', 'information_schema.routine_table_usage', 'information_schema.table_privileges', 'information_schema.check_constraint_routine_usage', 'information_schema.key_column_usage', 'information_schema.domains', 'information_schema.schemata', 'information_schema.constraint_column_usage', 'information_schema.columns', 'information_schema.domain_constraints', 'information_schema.column_column_usage', 'information_schema.collation_character_set_applicability', 'information_schema.column_udt_usage', 'information_schema.referential_constraints', 'information_schema.role_udt_grants', 'information_schema.character_sets', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.role_column_grants', 'information_schema.foreign_server_options', 'information_schema.column_domain_usage', 'information_schema.domain_udt_usage', 'information_schema.role_routine_grants', 'information_schema.user_defined_types', 'information_schema.element_types', 'information_schema.information_schema_catalog_name', 'information_schema.administrable_role_authorizations', 'information_schema.routine_routine_usage', 'information_schema.routine_sequence_usage', 'information_schema.udt_privileges', 'information_schema.attributes', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-08-26 12:48:53 Duration: 885ms
-
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_publication_rel', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_user', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_locks', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_rules', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_group', 'pg_catalog.pg_type', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_am', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_operator', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_depend', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_database', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_sequences', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_trigger', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_cast', 'pg_catalog.pg_range', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_namespace', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_indexes', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_subscription', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_enum', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_constraint', 'pg_catalog.pg_amop', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_policies', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_opclass', 'pg_catalog.pg_language', 'pg_catalog.pg_views', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_extension', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_description', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_publication', 'information_schema.check_constraints', 'information_schema.user_mappings', 'information_schema.key_column_usage', 'information_schema.sql_sizing', 'information_schema.column_options', 'information_schema.information_schema_catalog_name', 'information_schema.columns', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.enabled_roles', 'information_schema.referential_constraints', 'information_schema.administrable_role_authorizations', 'information_schema.role_routine_grants', 'information_schema.triggers', 'information_schema.role_usage_grants', 'information_schema.check_constraint_routine_usage', 'information_schema.sequences', 'information_schema.column_domain_usage', 'information_schema.column_privileges', 'information_schema.constraint_table_usage', 'information_schema.attributes', 'information_schema.applicable_roles', 'information_schema.foreign_data_wrappers', 'information_schema.view_routine_usage', 'information_schema.triggered_update_columns', 'information_schema.data_type_privileges', 'information_schema.routine_routine_usage', 'information_schema.tables', 'information_schema.user_defined_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.constraint_column_usage', 'information_schema.role_udt_grants', 'information_schema.domains', 'information_schema.schemata', 'information_schema.sql_implementation_info', 'information_schema.foreign_server_options', 'information_schema.role_column_grants', 'information_schema.column_udt_usage', 'information_schema.domain_constraints', 'information_schema.domain_udt_usage', 'information_schema.parameters', 'information_schema.view_table_usage', 'information_schema.role_table_grants', 'information_schema.foreign_tables', 'information_schema.collation_character_set_applicability', 'information_schema.routines', 'information_schema.table_constraints', 'information_schema.routine_column_usage', 'information_schema.routine_sequence_usage', 'information_schema.user_mapping_options', 'information_schema.udt_privileges', 'information_schema.usage_privileges', 'information_schema.foreign_table_options', 'information_schema.character_sets', 'information_schema.view_column_usage', 'information_schema.routine_privileges', 'information_schema.routine_table_usage', 'information_schema.views', 'information_schema.element_types', 'information_schema.foreign_servers', 'information_schema.collations', 'information_schema.column_column_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-08-26 12:41:23 Duration: 800ms
-
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_transform', 'pg_catalog.pg_sequences', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_group', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_amproc', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_locks', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_amop', 'pg_catalog.pg_policy', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_user', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_matviews', 'pg_catalog.pg_depend', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_proc', 'pg_catalog.pg_cast', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_description', 'pg_catalog.pg_publication', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_range', 'pg_catalog.pg_sequence', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_opclass', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_extension', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_tables', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_collation', 'pg_catalog.pg_policies', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_conversion', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_inherits', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_database', 'pg_catalog.pg_trigger', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_enum', 'pg_catalog.pg_views', 'pg_catalog.pg_roles', 'pg_catalog.pg_language', 'pg_catalog.pg_am', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_constraint', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_subscription', 'pg_catalog.pg_ts_template', 'information_schema.administrable_role_authorizations', 'information_schema.domains', 'information_schema.applicable_roles', 'information_schema.check_constraints', 'information_schema.constraint_table_usage', 'information_schema.key_column_usage', 'information_schema.parameters', 'information_schema.sql_implementation_info', 'information_schema.udt_privileges', 'information_schema.role_usage_grants', 'information_schema.character_sets', 'information_schema.domain_udt_usage', 'information_schema.sql_features', 'information_schema.table_constraints', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.data_type_privileges', 'information_schema.domain_constraints', 'information_schema.user_mappings', 'information_schema.triggered_update_columns', 'information_schema.view_routine_usage', 'information_schema.enabled_roles', 'information_schema.collations', 'information_schema.role_udt_grants', 'information_schema.information_schema_catalog_name', 'information_schema.column_udt_usage', 'information_schema.columns', 'information_schema.table_privileges', 'information_schema.views', 'information_schema.usage_privileges', 'information_schema.column_column_usage', 'information_schema.routine_sequence_usage', 'information_schema.view_table_usage', 'information_schema.referential_constraints', 'information_schema.column_domain_usage', 'information_schema.element_types', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.schemata', 'information_schema.user_mapping_options', 'information_schema.routines', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_server_options', 'information_schema.role_column_grants', 'information_schema.user_defined_types', 'information_schema.foreign_table_options', 'information_schema.foreign_servers', 'information_schema.foreign_tables', 'information_schema.routine_table_usage', 'information_schema.constraint_column_usage', 'information_schema.sequences', 'information_schema.tables', 'information_schema.foreign_data_wrappers', 'information_schema.attributes', 'information_schema.routine_column_usage', 'information_schema.sql_sizing', 'information_schema.routine_routine_usage', 'information_schema.view_column_usage', 'information_schema.check_constraint_routine_usage', 'information_schema.role_routine_grants', 'information_schema.column_options', 'information_schema.routine_privileges', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-08-26 11:46:38 Duration: 741ms
16 13m59s 129 2s25ms 43s137ms 6s506ms delete from account_move_line where id in (...);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Aug 26 11 2 12s274ms 6s137ms 12 1 4s317ms 4s317ms 14 5 41s163ms 8s232ms 15 1 6s512ms 6s512ms 16 2 14s788ms 7s394ms 17 7 37s268ms 5s324ms 18 2 12s915ms 6s457ms 19 5 25s13ms 5s2ms 20 1 6s810ms 6s810ms 23 103 11m18s 6s585ms -
DELETE FROM account_move_line WHERE id IN (5543936, 5543937, 5543938, 5543939, 5543940, 5543941, 5543942, 5543943, 5543944, 5543945, 5543946, 5543947, 5543948, 5543949, 5543950, 5543951, 5543952, 5543953, 5543954, 5717589, 5717590);
Date: 2024-08-26 23:30:50 Duration: 43s137ms
-
DELETE FROM account_move_line WHERE id IN (5635532, 5635533, 5635534, 5635535, 5635536, 5635537, 5635538, 5635539, 5635540, 5635541, 5635542, 5635543, 5635544, 5717449, 5717450);
Date: 2024-08-26 23:18:39 Duration: 31s23ms
-
DELETE FROM account_move_line WHERE id IN (5722814, 5722815, 5722816, 5722817, 5722818, 5722819, 5722820, 5722821, 5722822, 5722823, 5722824, 5722825, 5722826, 5722827, 5722828);
Date: 2024-08-26 23:41:19 Duration: 30s780ms
17 13m30s 935 707ms 1s639ms 867ms 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 #17
Day Hour Count Duration Avg duration Aug 26 11 11 8s64ms 733ms 12 126 1m57s 931ms 13 84 1m21s 973ms 14 10 9s735ms 973ms 15 81 1m8s 846ms 16 147 1m59s 812ms 17 73 1m2s 852ms 18 242 3m25s 848ms 19 145 2m5s 865ms 20 16 12s645ms 790ms -
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 ('%%iuj%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%iuj%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%iuj%'))) 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-08-26 12:05:00 Duration: 1s639ms
-
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 ('%%50%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%50-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%50-%'))) 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-08-26 18:42:26 Duration: 1s581ms
-
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 ('%%288753%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%288753%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%288753%'))) 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-08-26 18:24:22 Duration: 1s552ms
18 9m34s 3,118 155ms 1s29ms 184ms update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Aug 26 02 32 5s248ms 164ms 03 100 17s103ms 171ms 08 3 497ms 165ms 09 2 333ms 166ms 10 12 2s277ms 189ms 11 48 8s721ms 181ms 12 363 1m8s 188ms 13 437 1m23s 190ms 14 323 1m1s 191ms 15 297 55s757ms 187ms 16 296 52s536ms 177ms 17 293 53s326ms 182ms 18 314 56s785ms 180ms 19 213 40s422ms 189ms 20 360 1m3s 176ms 21 24 4s58ms 169ms 22 1 164ms 164ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 192903 AND warehouse_id = 37;
Date: 2024-08-26 14:26:24 Duration: 1s29ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 252390 AND warehouse_id = 45;
Date: 2024-08-26 17:06:43 Duration: 787ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223012 AND warehouse_id = 37;
Date: 2024-08-26 20:19:33 Duration: 773ms
19 9m16s 3,018 155ms 574ms 184ms update product_warehouse_inventory set qty_reserve = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Aug 26 02 19 3s155ms 166ms 03 74 12s869ms 173ms 08 2 342ms 171ms 09 2 336ms 168ms 10 8 1s347ms 168ms 11 249 44s110ms 177ms 12 322 1m3s 197ms 13 399 1m15s 189ms 14 293 54s235ms 185ms 15 266 49s749ms 187ms 16 380 1m7s 176ms 17 301 54s898ms 182ms 18 344 1m2s 180ms 19 185 36s390ms 196ms 20 129 23s324ms 180ms 21 40 6s724ms 168ms 22 5 845ms 169ms -
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 254600 AND warehouse_id = 46;
Date: 2024-08-26 18:11:59 Duration: 574ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 185962 AND warehouse_id = 46;
Date: 2024-08-26 12:57:16 Duration: 395ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 5.0 WHERE product_id = 185662 AND warehouse_id = 41;
Date: 2024-08-26 13:21:43 Duration: 395ms
20 8m45s 3,611 120ms 677ms 145ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where (("product_warehouse_inventory"."warehouse_id" = ?) and ("product_warehouse_inventory"."product_id" = ?)) order by "product_warehouse_inventory"."warehouse_name" limit ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Aug 26 11 136 19s200ms 141ms 12 687 1m43s 150ms 13 585 1m24s 143ms 14 308 43s116ms 139ms 15 712 1m49s 153ms 16 370 51s493ms 139ms 17 248 33s939ms 136ms 18 194 27s166ms 140ms 19 220 32s65ms 145ms 20 151 21s584ms 142ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 39) AND ("product_warehouse_inventory"."product_id" = 199059)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-08-26 12:00:25 Duration: 677ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 39) AND ("product_warehouse_inventory"."product_id" = 199061)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-08-26 12:00:26 Duration: 673ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 43) AND ("product_warehouse_inventory"."product_id" = 199634)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-08-26 19:00:31 Duration: 601ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 117,711 6h9m4s 120ms 2s197ms 188ms 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 Aug 26 00 2,360 5m27s 138ms 01 2,371 5m23s 136ms 02 2,482 5m38s 136ms 03 2,380 5m35s 141ms 04 2,415 5m22s 133ms 05 2,333 5m16s 135ms 06 2,361 5m23s 137ms 07 2,693 5m52s 130ms 08 2,802 6m16s 134ms 09 2,679 6m11s 138ms 10 3,254 7m25s 136ms 11 5,042 15m29s 184ms 12 8,675 32m22s 223ms 13 9,268 38m12s 247ms 14 8,944 29m1s 194ms 15 8,445 30m4s 213ms 16 8,609 29m56s 208ms 17 9,190 27m50s 181ms 18 8,214 30m2s 219ms 19 7,375 30m14s 246ms 20 5,019 16m3s 192ms 21 3,548 8m40s 146ms 22 3,669 8m47s 143ms 23 3,583 8m23s 140ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 13:36:03') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1035"', '["pointspring_master","calendar.alarm",19573]', '["pointspring_master","mail.channel",66]', '["pointspring_master","mail.channel",432]', '["pointspring_master","mail.channel",476]', '["pointspring_master","mail.channel",570]', '["pointspring_master","mail.channel",637]', '["pointspring_master","mail.channel",640]', '["pointspring_master","res.partner",19573]', '["pointspring_master","ir.needaction",19573]'))) ORDER BY "bus_bus"."id";
Date: 2024-08-26 13:36:56 Duration: 2s197ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 15:48:03') 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-08-26 15:48:55 Duration: 2s165ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 13:36:03') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19503]', '["pointspring_master","mail.channel",148]', '["pointspring_master","mail.channel",149]', '["pointspring_master","mail.channel",150]', '["pointspring_master","mail.channel",448]', '["pointspring_master","mail.channel",546]', '["pointspring_master","mail.channel",551]', '["pointspring_master","mail.channel",569]', '["pointspring_master","res.partner",19503]', '["pointspring_master","ir.needaction",19503]'))) ORDER BY "bus_bus"."id";
Date: 2024-08-26 13:36:56 Duration: 2s164ms
2 11,547 35m35s 158ms 888ms 184ms update product_warehouse_inventory set loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) - coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Aug 26 02 222 37s653ms 169ms 03 899 2m32s 169ms 08 3 524ms 174ms 09 2 348ms 174ms 10 28 4s847ms 173ms 11 858 2m42s 189ms 12 1,249 4m1s 193ms 13 1,355 4m20s 192ms 14 866 2m39s 184ms 15 866 2m43s 188ms 16 1,303 3m55s 181ms 17 951 2m54s 183ms 18 1,286 3m55s 183ms 19 733 2m21s 192ms 20 732 2m11s 179ms 21 186 31s918ms 171ms 22 8 1s377ms 172ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(4.0, 0) + COALESCE(0.0, 0) - COALESCE(5.0, 0) WHERE product_id = 250760 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 12:56:25 Duration: 888ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(0.0, 0) + COALESCE(0.0, 0) - COALESCE(1.0, 0) WHERE product_id = 269257 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-08-26 13:13:51 Duration: 836ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(26.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 203728 AND warehouse_id = 35 AND company_id = 1;
Date: 2024-08-26 15:31:35 Duration: 780ms
3 9,849 30m21s 165ms 755ms 184ms update product_warehouse_inventory set qty_shipped_not_invoiced = case when ?.? is not null then greatest ((?.? - ?.?) + (?.? - ?.?), ?) else greatest ((?.? - ?.?), ?) end where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Aug 26 08 28 4s739ms 169ms 09 11 1s875ms 170ms 10 35 6s376ms 182ms 11 404 1m11s 176ms 12 722 2m17s 190ms 13 1,409 4m30s 191ms 14 699 2m9s 185ms 15 1,001 3m11s 191ms 16 684 2m3s 180ms 17 780 2m22s 182ms 18 1,868 5m36s 180ms 19 1,435 4m26s 185ms 20 718 2m10s 181ms 21 48 8s204ms 170ms 22 7 1s200ms 171ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 15.0 IS NOT NULL THEN GREATEST ((0.0 - 0.0) + (15.0 - 15.0), 0) ELSE GREATEST ((0.0 - 0.0), 0) END where product_id = 216173 and warehouse_id = 35 and company_id = 1;
Date: 2024-08-26 13:36:54 Duration: 755ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 18.0 IS NOT NULL THEN GREATEST ((341.0 - 341.0) + (18.0 - 18.0), 0) ELSE GREATEST ((341.0 - 341.0), 0) END where product_id = 213911 and warehouse_id = 35 and company_id = 1;
Date: 2024-08-26 13:36:56 Duration: 612ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 3.0 IS NOT NULL THEN GREATEST ((0.0 - 0.0) + (3.0 - 3.0), 0) ELSE GREATEST ((0.0 - 0.0), 0) END where product_id = 172453 and warehouse_id = 45 and company_id = 1;
Date: 2024-08-26 13:15:25 Duration: 607ms
4 8,671 22m41s 120ms 992ms 157ms 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 #4
Day Hour Count Duration Avg duration Aug 26 01 1 141ms 141ms 02 131 20s892ms 159ms 03 256 1m5s 256ms 09 2 270ms 135ms 10 28 3s741ms 133ms 11 437 1m5s 150ms 12 2,275 5m29s 144ms 13 1,948 5m48s 178ms 14 315 52s300ms 166ms 15 405 1m4s 159ms 16 214 30s470ms 142ms 17 286 41s642ms 145ms 18 249 44s71ms 176ms 19 1,467 3m23s 138ms 20 638 1m26s 136ms 21 18 2s290ms 127ms 22 1 125ms 125ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (186481)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-08-26 13:36:55 Duration: 992ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (217835)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-08-26 12:56:25 Duration: 934ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (180674, 266614, 180597, 180643, 180554)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-08-26 13:11:09 Duration: 816ms
5 8,113 53m25s 356ms 2s113ms 395ms select id, product_id, warehouse_id, loc_check_qty, coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Aug 26 02 116 42s361ms 365ms 03 386 2m21s 366ms 08 4 1s502ms 375ms 09 6 2s355ms 392ms 10 25 9s194ms 367ms 11 508 3m20s 393ms 12 898 6m11s 413ms 13 1,028 7m1s 409ms 14 731 4m47s 393ms 15 703 4m39s 397ms 16 930 6m 387ms 17 722 4m44s 394ms 18 849 5m32s 391ms 19 519 3m30s 405ms 20 543 3m26s 380ms 21 139 51s198ms 368ms 22 6 2s202ms 367ms -
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 12:41:24 Duration: 2s113ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 17:55:29 Duration: 1s478ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 18:40:12 Duration: 1s395ms
6 8,112 48m42s 290ms 2s710ms 360ms 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 #6
Day Hour Count Duration Avg duration Aug 26 02 116 35s530ms 306ms 03 386 1m59s 309ms 08 4 1s222ms 305ms 09 6 1s881ms 313ms 10 25 7s556ms 302ms 11 508 2m57s 349ms 12 898 6m3s 404ms 13 1,027 6m46s 395ms 14 731 4m17s 352ms 15 703 4m20s 370ms 16 930 5m16s 340ms 17 721 4m9s 346ms 18 850 4m56s 348ms 19 519 3m20s 385ms 20 543 3m2s 336ms 21 139 43s563ms 313ms 22 6 1s854ms 309ms -
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-08-26 11:57:51 Duration: 2s710ms
-
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-08-26 15:35:16 Duration: 2s409ms
-
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-08-26 12:39:14 Duration: 1s741ms
7 5,763 14m54s 139ms 885ms 155ms 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 #7
Day Hour Count Duration Avg duration Aug 26 00 240 34s647ms 144ms 01 240 34s417ms 143ms 02 240 34s586ms 144ms 03 240 34s864ms 145ms 04 240 34s228ms 142ms 05 240 34s220ms 142ms 06 240 34s185ms 142ms 07 240 34s255ms 142ms 08 240 34s192ms 142ms 09 240 34s759ms 144ms 10 240 34s341ms 143ms 11 243 41s562ms 171ms 12 240 45s263ms 188ms 13 240 44s898ms 187ms 14 240 40s304ms 167ms 15 240 41s547ms 173ms 16 240 38s449ms 160ms 17 240 38s514ms 160ms 18 240 39s66ms 162ms 19 240 42s467ms 176ms 20 240 38s185ms 159ms 21 240 35s351ms 147ms 22 240 34s765ms 144ms 23 240 34s968ms 145ms -
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_seclabels', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_constraint', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_collation', 'pg_catalog.pg_rules', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_index', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_user', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_conversion', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_group', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_attribute', 'pg_catalog.pg_amproc', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_database', 'pg_catalog.pg_locks', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_cast', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_subscription', 'pg_catalog.pg_matviews', 'pg_catalog.pg_indexes', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_trigger', 'pg_catalog.pg_enum', 'pg_catalog.pg_description', 'pg_catalog.pg_extension', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_am', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_namespace', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_proc', 'pg_catalog.pg_operator', 'pg_catalog.pg_language', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_depend', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_views', 'pg_catalog.pg_stats', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_roles', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_type', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_policy', 'pg_catalog.pg_policies', 'pg_catalog.pg_settings', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_range', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_wal_receiver', 'information_schema.routine_column_usage', 'information_schema.sql_implementation_info', 'information_schema.table_constraints', 'information_schema.triggers', 'information_schema.foreign_data_wrappers', 'information_schema.user_mapping_options', 'information_schema.check_constraints', 'information_schema.triggered_update_columns', 'information_schema.foreign_servers', 'information_schema.sql_features', 'information_schema.column_privileges', 'information_schema.sequences', 'information_schema.usage_privileges', 'information_schema.view_column_usage', 'information_schema.routines', 'information_schema.sql_sizing', 'information_schema.data_type_privileges', 'information_schema.constraint_table_usage', 'information_schema.role_table_grants', 'information_schema.role_usage_grants', 'information_schema.view_routine_usage', 'information_schema.foreign_table_options', 'information_schema.collations', 'information_schema.parameters', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.column_options', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_tables', 'information_schema.applicable_roles', 'information_schema.view_table_usage', 'information_schema.tables', 'information_schema.routine_table_usage', 'information_schema.table_privileges', 'information_schema.check_constraint_routine_usage', 'information_schema.key_column_usage', 'information_schema.domains', 'information_schema.schemata', 'information_schema.constraint_column_usage', 'information_schema.columns', 'information_schema.domain_constraints', 'information_schema.column_column_usage', 'information_schema.collation_character_set_applicability', 'information_schema.column_udt_usage', 'information_schema.referential_constraints', 'information_schema.role_udt_grants', 'information_schema.character_sets', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.role_column_grants', 'information_schema.foreign_server_options', 'information_schema.column_domain_usage', 'information_schema.domain_udt_usage', 'information_schema.role_routine_grants', 'information_schema.user_defined_types', 'information_schema.element_types', 'information_schema.information_schema_catalog_name', 'information_schema.administrable_role_authorizations', 'information_schema.routine_routine_usage', 'information_schema.routine_sequence_usage', 'information_schema.udt_privileges', 'information_schema.attributes', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-08-26 12:48:53 Duration: 885ms
-
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_publication_rel', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_user', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_locks', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_rules', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_group', 'pg_catalog.pg_type', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_am', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_operator', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_depend', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_database', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_sequences', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_trigger', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_cast', 'pg_catalog.pg_range', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_namespace', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_indexes', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_subscription', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_enum', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_constraint', 'pg_catalog.pg_amop', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_policies', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_opclass', 'pg_catalog.pg_language', 'pg_catalog.pg_views', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_extension', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_description', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_publication', 'information_schema.check_constraints', 'information_schema.user_mappings', 'information_schema.key_column_usage', 'information_schema.sql_sizing', 'information_schema.column_options', 'information_schema.information_schema_catalog_name', 'information_schema.columns', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.enabled_roles', 'information_schema.referential_constraints', 'information_schema.administrable_role_authorizations', 'information_schema.role_routine_grants', 'information_schema.triggers', 'information_schema.role_usage_grants', 'information_schema.check_constraint_routine_usage', 'information_schema.sequences', 'information_schema.column_domain_usage', 'information_schema.column_privileges', 'information_schema.constraint_table_usage', 'information_schema.attributes', 'information_schema.applicable_roles', 'information_schema.foreign_data_wrappers', 'information_schema.view_routine_usage', 'information_schema.triggered_update_columns', 'information_schema.data_type_privileges', 'information_schema.routine_routine_usage', 'information_schema.tables', 'information_schema.user_defined_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.constraint_column_usage', 'information_schema.role_udt_grants', 'information_schema.domains', 'information_schema.schemata', 'information_schema.sql_implementation_info', 'information_schema.foreign_server_options', 'information_schema.role_column_grants', 'information_schema.column_udt_usage', 'information_schema.domain_constraints', 'information_schema.domain_udt_usage', 'information_schema.parameters', 'information_schema.view_table_usage', 'information_schema.role_table_grants', 'information_schema.foreign_tables', 'information_schema.collation_character_set_applicability', 'information_schema.routines', 'information_schema.table_constraints', 'information_schema.routine_column_usage', 'information_schema.routine_sequence_usage', 'information_schema.user_mapping_options', 'information_schema.udt_privileges', 'information_schema.usage_privileges', 'information_schema.foreign_table_options', 'information_schema.character_sets', 'information_schema.view_column_usage', 'information_schema.routine_privileges', 'information_schema.routine_table_usage', 'information_schema.views', 'information_schema.element_types', 'information_schema.foreign_servers', 'information_schema.collations', 'information_schema.column_column_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-08-26 12:41:23 Duration: 800ms
-
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_transform', 'pg_catalog.pg_sequences', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_group', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_amproc', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_locks', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_amop', 'pg_catalog.pg_policy', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_user', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_matviews', 'pg_catalog.pg_depend', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_proc', 'pg_catalog.pg_cast', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_description', 'pg_catalog.pg_publication', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_range', 'pg_catalog.pg_sequence', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_opclass', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_extension', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_tables', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_collation', 'pg_catalog.pg_policies', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_conversion', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_inherits', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_database', 'pg_catalog.pg_trigger', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_enum', 'pg_catalog.pg_views', 'pg_catalog.pg_roles', 'pg_catalog.pg_language', 'pg_catalog.pg_am', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_constraint', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_subscription', 'pg_catalog.pg_ts_template', 'information_schema.administrable_role_authorizations', 'information_schema.domains', 'information_schema.applicable_roles', 'information_schema.check_constraints', 'information_schema.constraint_table_usage', 'information_schema.key_column_usage', 'information_schema.parameters', 'information_schema.sql_implementation_info', 'information_schema.udt_privileges', 'information_schema.role_usage_grants', 'information_schema.character_sets', 'information_schema.domain_udt_usage', 'information_schema.sql_features', 'information_schema.table_constraints', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.data_type_privileges', 'information_schema.domain_constraints', 'information_schema.user_mappings', 'information_schema.triggered_update_columns', 'information_schema.view_routine_usage', 'information_schema.enabled_roles', 'information_schema.collations', 'information_schema.role_udt_grants', 'information_schema.information_schema_catalog_name', 'information_schema.column_udt_usage', 'information_schema.columns', 'information_schema.table_privileges', 'information_schema.views', 'information_schema.usage_privileges', 'information_schema.column_column_usage', 'information_schema.routine_sequence_usage', 'information_schema.view_table_usage', 'information_schema.referential_constraints', 'information_schema.column_domain_usage', 'information_schema.element_types', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.schemata', 'information_schema.user_mapping_options', 'information_schema.routines', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_server_options', 'information_schema.role_column_grants', 'information_schema.user_defined_types', 'information_schema.foreign_table_options', 'information_schema.foreign_servers', 'information_schema.foreign_tables', 'information_schema.routine_table_usage', 'information_schema.constraint_column_usage', 'information_schema.sequences', 'information_schema.tables', 'information_schema.foreign_data_wrappers', 'information_schema.attributes', 'information_schema.routine_column_usage', 'information_schema.sql_sizing', 'information_schema.routine_routine_usage', 'information_schema.view_column_usage', 'information_schema.check_constraint_routine_usage', 'information_schema.role_routine_grants', 'information_schema.column_options', 'information_schema.routine_privileges', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-08-26 11:46:38 Duration: 741ms
8 5,615 17m37s 160ms 1s35ms 188ms update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Aug 26 02 4 690ms 172ms 03 30 5s57ms 168ms 09 6 1s38ms 173ms 10 8 1s369ms 171ms 11 168 30s373ms 180ms 12 633 2m5s 198ms 13 778 2m31s 194ms 14 751 2m20s 187ms 15 650 2m5s 193ms 16 577 1m43s 179ms 17 733 2m14s 182ms 18 593 1m50s 186ms 19 314 1m 193ms 20 336 59s892ms 178ms 21 33 5s650ms 171ms 22 1 168ms 168ms -
UPDATE product_warehouse_inventory SET qty_available = 2.0 WHERE product_id = 193726 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:55 Duration: 1s35ms
-
UPDATE product_warehouse_inventory SET qty_available = - 1.0 WHERE product_id = 269089 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:54 Duration: 564ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 193768 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:56 Duration: 477ms
9 5,493 15m27s 120ms 693ms 168ms 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 #9
Day Hour Count Duration Avg duration Aug 26 11 463 1m18s 169ms 12 904 2m46s 183ms 13 749 2m9s 172ms 14 617 1m39s 161ms 15 959 2m42s 169ms 16 600 1m28s 148ms 17 444 1m12s 162ms 18 274 42s745ms 156ms 19 260 46s620ms 179ms 20 223 40s729ms 182ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 208664) 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" = '46')))))) 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-08-26 12:08:15 Duration: 693ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 220868) 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-08-26 20:30:49 Duration: 531ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 254609) 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-08-26 20:30:50 Duration: 499ms
10 5,153 17m36s 166ms 980ms 205ms 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 #10
Day Hour Count Duration Avg duration Aug 26 02 152 27s241ms 179ms 03 260 46s666ms 179ms 11 7 1s734ms 247ms 12 439 1m35s 217ms 13 722 2m35s 215ms 14 696 2m19s 199ms 15 1,477 5m17s 214ms 16 201 39s362ms 195ms 17 313 1m2s 199ms 18 322 1m5s 202ms 19 107 23s373ms 218ms 20 64 12s380ms 193ms 21 393 1m10s 180ms -
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 = 49627 and fd.product_id = 209394;
Date: 2024-08-26 15:31:35 Duration: 980ms
-
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 = 49822 and fd.product_id = 174022;
Date: 2024-08-26 18:55:25 Duration: 916ms
-
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 = 49760 and fd.product_id = 209392;
Date: 2024-08-26 15:36:14 Duration: 664ms
11 3,611 8m45s 120ms 677ms 145ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where (("product_warehouse_inventory"."warehouse_id" = ?) and ("product_warehouse_inventory"."product_id" = ?)) order by "product_warehouse_inventory"."warehouse_name" limit ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Aug 26 11 136 19s200ms 141ms 12 687 1m43s 150ms 13 585 1m24s 143ms 14 308 43s116ms 139ms 15 712 1m49s 153ms 16 370 51s493ms 139ms 17 248 33s939ms 136ms 18 194 27s166ms 140ms 19 220 32s65ms 145ms 20 151 21s584ms 142ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 39) AND ("product_warehouse_inventory"."product_id" = 199059)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-08-26 12:00:25 Duration: 677ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 39) AND ("product_warehouse_inventory"."product_id" = 199061)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-08-26 12:00:26 Duration: 673ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 43) AND ("product_warehouse_inventory"."product_id" = 199634)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-08-26 19:00:31 Duration: 601ms
12 3,495 50m32s 691ms 3s131ms 867ms 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 Aug 26 10 89 1m5s 735ms 11 329 4m23s 799ms 12 454 7m13s 954ms 13 600 9m38s 963ms 14 360 5m2s 841ms 15 406 5m52s 868ms 16 255 3m29s 821ms 17 264 3m39s 832ms 18 297 4m 809ms 19 159 2m24s 908ms 20 230 3m4s 803ms 21 33 24s2ms 727ms 22 19 14s18ms 737ms -
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 ('%%N31%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%N3-1-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%N3-1-%'))) 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-08-26 13:48:12 Duration: 3s131ms
-
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 ('%%N311%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%N3-1-1%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%N3-1-1%'))) 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-08-26 13:48:12 Duration: 2s622ms
-
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 ('%%489xfa%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489xfa%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489xfa%'))) 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-08-26 12:41:25 Duration: 2s605ms
13 3,118 9m34s 155ms 1s29ms 184ms update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Aug 26 02 32 5s248ms 164ms 03 100 17s103ms 171ms 08 3 497ms 165ms 09 2 333ms 166ms 10 12 2s277ms 189ms 11 48 8s721ms 181ms 12 363 1m8s 188ms 13 437 1m23s 190ms 14 323 1m1s 191ms 15 297 55s757ms 187ms 16 296 52s536ms 177ms 17 293 53s326ms 182ms 18 314 56s785ms 180ms 19 213 40s422ms 189ms 20 360 1m3s 176ms 21 24 4s58ms 169ms 22 1 164ms 164ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 192903 AND warehouse_id = 37;
Date: 2024-08-26 14:26:24 Duration: 1s29ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 252390 AND warehouse_id = 45;
Date: 2024-08-26 17:06:43 Duration: 787ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223012 AND warehouse_id = 37;
Date: 2024-08-26 20:19:33 Duration: 773ms
14 3,018 9m16s 155ms 574ms 184ms 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 Aug 26 02 19 3s155ms 166ms 03 74 12s869ms 173ms 08 2 342ms 171ms 09 2 336ms 168ms 10 8 1s347ms 168ms 11 249 44s110ms 177ms 12 322 1m3s 197ms 13 399 1m15s 189ms 14 293 54s235ms 185ms 15 266 49s749ms 187ms 16 380 1m7s 176ms 17 301 54s898ms 182ms 18 344 1m2s 180ms 19 185 36s390ms 196ms 20 129 23s324ms 180ms 21 40 6s724ms 168ms 22 5 845ms 169ms -
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 254600 AND warehouse_id = 46;
Date: 2024-08-26 18:11:59 Duration: 574ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 185962 AND warehouse_id = 46;
Date: 2024-08-26 12:57:16 Duration: 395ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 5.0 WHERE product_id = 185662 AND warehouse_id = 41;
Date: 2024-08-26 13:21:43 Duration: 395ms
15 2,651 36m50s 343ms 1s872ms 833ms select id from product_warehouse_inventory where coalesce(loc_check_qty, ?) < coalesce(max_product_uom_qty, ?);Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Aug 26 11 1,927 27m57s 870ms 12 601 7m59s 798ms 13 42 21s565ms 513ms 16 30 11s396ms 379ms 17 13 5s38ms 387ms 18 26 9s943ms 382ms 19 9 4s386ms 487ms 20 3 1s43ms 347ms -
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s872ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s701ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s581ms
16 2,644 24m11s 462ms 1s951ms 549ms 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 #16
Day Hour Count Duration Avg duration Aug 26 01 3 1s433ms 477ms 06 4 1s862ms 465ms 09 6 2s875ms 479ms 10 24 11s276ms 469ms 11 191 1m39s 522ms 12 424 4m5s 580ms 13 411 3m57s 578ms 14 367 3m20s 546ms 15 271 2m35s 572ms 16 209 1m44s 498ms 17 238 2m2s 512ms 18 240 2m7s 530ms 19 168 1m36s 575ms 20 69 36s266ms 525ms 21 16 7s476ms 467ms 22 3 1s416ms 472ms -
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-08-26 12:00:27 Duration: 1s951ms
-
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.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-08-26 11:52:26 Duration: 1s814ms
-
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/%-922b3e6/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-08-26 15:55:04 Duration: 1s749ms
17 2,620 8m15s 164ms 337ms 189ms update product_warehouse_inventory set sft_stk_qty = ? where id = ( select id from product_warehouse_inventory where product_id = (?) and warehouse_id = (?));Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Aug 26 12 67 13s155ms 196ms 13 495 1m38s 198ms 14 1,524 4m46s 188ms 15 204 37s931ms 185ms 16 22 3s961ms 180ms 17 87 15s752ms 181ms 18 94 17s185ms 182ms 19 31 6s276ms 202ms 20 13 2s301ms 177ms 21 83 14s371ms 173ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209565) and warehouse_id = (37));
Date: 2024-08-26 14:15:21 Duration: 337ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209212) and warehouse_id = (43));
Date: 2024-08-26 14:40:02 Duration: 327ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209257) and warehouse_id = (35));
Date: 2024-08-26 13:52:38 Duration: 312ms
18 2,487 7m47s 167ms 674ms 188ms update product_warehouse_inventory set rep_loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Aug 26 02 23 3s979ms 173ms 03 244 42s52ms 172ms 09 5 864ms 172ms 10 2 342ms 171ms 11 343 1m8s 199ms 12 352 1m9s 196ms 13 215 41s261ms 191ms 14 134 25s143ms 187ms 15 172 33s541ms 195ms 16 155 28s43ms 180ms 17 122 22s195ms 181ms 18 340 1m2s 184ms 19 170 32s902ms 193ms 20 207 36s865ms 178ms 21 1 173ms 173ms 22 2 341ms 170ms -
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(0.0, 0) + COALESCE(0.0, 0) WHERE product_id = 222282 AND warehouse_id = 36 AND company_id = 1;
Date: 2024-08-26 15:17:07 Duration: 674ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(9.0, 0) + COALESCE(4.0, 0) WHERE product_id = 190563 AND warehouse_id = 36 AND company_id = 1;
Date: 2024-08-26 11:40:23 Duration: 627ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(15.0, 0) + COALESCE(0.0, 0) WHERE product_id = 199634 AND warehouse_id = 37 AND company_id = 1;
Date: 2024-08-26 12:05:02 Duration: 612ms
19 2,422 6m29s 120ms 1s78ms 160ms 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 #19
Day Hour Count Duration Avg duration Aug 26 09 2 246ms 123ms 10 1 134ms 134ms 11 54 7s659ms 141ms 12 294 47s901ms 162ms 13 524 1m25s 162ms 14 184 29s905ms 162ms 15 312 54s764ms 175ms 16 94 15s296ms 162ms 17 162 25s95ms 154ms 18 284 43s867ms 154ms 19 354 55s378ms 156ms 20 153 23s632ms 154ms 21 4 498ms 124ms -
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 204868 and sol.warehouse_id = 37 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-08-26 20:32:49 Duration: 1s78ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 222282 and sol.warehouse_id = 36 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-08-26 15:17:08 Duration: 990ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 204928 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-08-26 19:47:44 Duration: 987ms
20 2,365 5m41s 120ms 821ms 144ms select "forecasted_data".id from "forecasted_data" where ("forecasted_data"."product_id" in (...)) order by "forecasted_data"."id";Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Aug 26 11 147 26s75ms 177ms 12 906 2m8s 141ms 13 557 1m21s 145ms 15 1 142ms 142ms 16 1 129ms 129ms 18 1 143ms 143ms 19 553 1m17s 139ms 20 199 28s326ms 142ms -
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."product_id" in (215818)) ORDER BY "forecasted_data"."id";
Date: 2024-08-26 13:11:07 Duration: 821ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."product_id" in (215402)) ORDER BY "forecasted_data"."id";
Date: 2024-08-26 13:13:52 Duration: 702ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."product_id" in (213399)) ORDER BY "forecasted_data"."id";
Date: 2024-08-26 11:57:52 Duration: 612ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 6s338ms 30s223ms 10s778ms 148 26m35s delete from sale_order_line where id in (...);Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Aug 26 11 1 7s12ms 7s12ms 12 3 22s116ms 7s372ms 13 1 7s500ms 7s500ms 14 5 35s338ms 7s67ms 15 120 23m8s 11s571ms 16 3 21s47ms 7s15ms 17 5 33s32ms 6s606ms 18 4 34s533ms 8s633ms 19 1 13s344ms 13s344ms 20 5 32s632ms 6s526ms -
DELETE FROM sale_order_line WHERE id IN (465034);
Date: 2024-08-26 15:36:08 Duration: 30s223ms
-
DELETE FROM sale_order_line WHERE id IN (465042);
Date: 2024-08-26 15:36:44 Duration: 26s940ms
-
DELETE FROM sale_order_line WHERE id IN (465034);
Date: 2024-08-26 15:36:18 Duration: 26s788ms
2 2s25ms 43s137ms 6s506ms 129 13m59s delete from account_move_line where id in (...);Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Aug 26 11 2 12s274ms 6s137ms 12 1 4s317ms 4s317ms 14 5 41s163ms 8s232ms 15 1 6s512ms 6s512ms 16 2 14s788ms 7s394ms 17 7 37s268ms 5s324ms 18 2 12s915ms 6s457ms 19 5 25s13ms 5s2ms 20 1 6s810ms 6s810ms 23 103 11m18s 6s585ms -
DELETE FROM account_move_line WHERE id IN (5543936, 5543937, 5543938, 5543939, 5543940, 5543941, 5543942, 5543943, 5543944, 5543945, 5543946, 5543947, 5543948, 5543949, 5543950, 5543951, 5543952, 5543953, 5543954, 5717589, 5717590);
Date: 2024-08-26 23:30:50 Duration: 43s137ms
-
DELETE FROM account_move_line WHERE id IN (5635532, 5635533, 5635534, 5635535, 5635536, 5635537, 5635538, 5635539, 5635540, 5635541, 5635542, 5635543, 5635544, 5717449, 5717450);
Date: 2024-08-26 23:18:39 Duration: 31s23ms
-
DELETE FROM account_move_line WHERE id IN (5722814, 5722815, 5722816, 5722817, 5722818, 5722819, 5722820, 5722821, 5722822, 5722823, 5722824, 5722825, 5722826, 5722827, 5722828);
Date: 2024-08-26 23:41:19 Duration: 30s780ms
3 892ms 2s449ms 1s36ms 866 14m57s 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 #3
Day Hour Count Duration Avg duration Aug 26 11 19 17s839ms 938ms 12 72 1m16s 1s62ms 13 120 2m13s 1s116ms 14 75 1m15s 1s8ms 15 89 1m33s 1s47ms 16 74 1m12s 978ms 17 127 2m5s 989ms 18 123 2m6s 1s32ms 19 114 2m2s 1s78ms 20 53 52s639ms 993ms -
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 ('%6.5-4-5101-1%')) 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 ('%6.5-4-5101-1%'))) 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 ('%6.5-4-5101-1%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%6.5-4-5101-1%')))))) 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-08-26 15:27:28 Duration: 2s449ms
-
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 ('%99705%')) 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 ('%99705%'))) 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 ('%99705%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%99705%')))))) 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-08-26 15:39:34 Duration: 2s215ms
-
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 ('%xk3124707qp%')) 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 ('%xk3124707qp%'))) 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 ('%xk3124707qp%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%xk3124707qp%')))))) 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-08-26 13:45:24 Duration: 1s846ms
4 691ms 3s131ms 867ms 3,495 50m32s 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 Aug 26 10 89 1m5s 735ms 11 329 4m23s 799ms 12 454 7m13s 954ms 13 600 9m38s 963ms 14 360 5m2s 841ms 15 406 5m52s 868ms 16 255 3m29s 821ms 17 264 3m39s 832ms 18 297 4m 809ms 19 159 2m24s 908ms 20 230 3m4s 803ms 21 33 24s2ms 727ms 22 19 14s18ms 737ms -
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 ('%%N31%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%N3-1-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%N3-1-%'))) 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-08-26 13:48:12 Duration: 3s131ms
-
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 ('%%N311%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%N3-1-1%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%N3-1-1%'))) 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-08-26 13:48:12 Duration: 2s622ms
-
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 ('%%489xfa%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%489xfa%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%489xfa%'))) 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-08-26 12:41:25 Duration: 2s605ms
5 707ms 1s639ms 867ms 935 13m30s 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 #5
Day Hour Count Duration Avg duration Aug 26 11 11 8s64ms 733ms 12 126 1m57s 931ms 13 84 1m21s 973ms 14 10 9s735ms 973ms 15 81 1m8s 846ms 16 147 1m59s 812ms 17 73 1m2s 852ms 18 242 3m25s 848ms 19 145 2m5s 865ms 20 16 12s645ms 790ms -
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 ('%%iuj%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%iuj%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%iuj%'))) 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-08-26 12:05:00 Duration: 1s639ms
-
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 ('%%50%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%50-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%50-%'))) 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-08-26 18:42:26 Duration: 1s581ms
-
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 ('%%288753%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%288753%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%288753%'))) 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-08-26 18:24:22 Duration: 1s552ms
6 343ms 1s872ms 833ms 2,651 36m50s select id from product_warehouse_inventory where coalesce(loc_check_qty, ?) < coalesce(max_product_uom_qty, ?);Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Aug 26 11 1,927 27m57s 870ms 12 601 7m59s 798ms 13 42 21s565ms 513ms 16 30 11s396ms 379ms 17 13 5s38ms 387ms 18 26 9s943ms 382ms 19 9 4s386ms 487ms 20 3 1s43ms 347ms -
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s872ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s701ms
-
select id from product_warehouse_inventory where COALESCE(loc_check_qty, 0) < COALESCE(max_product_uom_qty, 0);
Date: 2024-08-26 11:57:53 Duration: 1s581ms
7 462ms 1s951ms 549ms 2,644 24m11s select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Aug 26 01 3 1s433ms 477ms 06 4 1s862ms 465ms 09 6 2s875ms 479ms 10 24 11s276ms 469ms 11 191 1m39s 522ms 12 424 4m5s 580ms 13 411 3m57s 578ms 14 367 3m20s 546ms 15 271 2m35s 572ms 16 209 1m44s 498ms 17 238 2m2s 512ms 18 240 2m7s 530ms 19 168 1m36s 575ms 20 69 36s266ms 525ms 21 16 7s476ms 467ms 22 3 1s416ms 472ms -
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-08-26 12:00:27 Duration: 1s951ms
-
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.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-5826980/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-08-26 11:52:26 Duration: 1s814ms
-
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/%-922b3e6/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-08-26 15:55:04 Duration: 1s749ms
8 356ms 2s113ms 395ms 8,113 53m25s select id, product_id, warehouse_id, loc_check_qty, coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Aug 26 02 116 42s361ms 365ms 03 386 2m21s 366ms 08 4 1s502ms 375ms 09 6 2s355ms 392ms 10 25 9s194ms 367ms 11 508 3m20s 393ms 12 898 6m11s 413ms 13 1,028 7m1s 409ms 14 731 4m47s 393ms 15 703 4m39s 397ms 16 930 6m 387ms 17 722 4m44s 394ms 18 849 5m32s 391ms 19 519 3m30s 405ms 20 543 3m26s 380ms 21 139 51s198ms 368ms 22 6 2s202ms 367ms -
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 12:41:24 Duration: 2s113ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 17:55:29 Duration: 1s478ms
-
select id, product_id, warehouse_id, loc_check_qty, COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) as corrected_loc_check_qty from product_warehouse_inventory where loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1;
Date: 2024-08-26 18:40:12 Duration: 1s395ms
9 290ms 2s710ms 360ms 8,112 48m42s 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 #9
Day Hour Count Duration Avg duration Aug 26 02 116 35s530ms 306ms 03 386 1m59s 309ms 08 4 1s222ms 305ms 09 6 1s881ms 313ms 10 25 7s556ms 302ms 11 508 2m57s 349ms 12 898 6m3s 404ms 13 1,027 6m46s 395ms 14 731 4m17s 352ms 15 703 4m20s 370ms 16 930 5m16s 340ms 17 721 4m9s 346ms 18 850 4m56s 348ms 19 519 3m20s 385ms 20 543 3m2s 336ms 21 139 43s563ms 313ms 22 6 1s854ms 309ms -
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-08-26 11:57:51 Duration: 2s710ms
-
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-08-26 15:35:16 Duration: 2s409ms
-
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-08-26 12:39:14 Duration: 1s741ms
10 166ms 980ms 205ms 5,153 17m36s 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 #10
Day Hour Count Duration Avg duration Aug 26 02 152 27s241ms 179ms 03 260 46s666ms 179ms 11 7 1s734ms 247ms 12 439 1m35s 217ms 13 722 2m35s 215ms 14 696 2m19s 199ms 15 1,477 5m17s 214ms 16 201 39s362ms 195ms 17 313 1m2s 199ms 18 322 1m5s 202ms 19 107 23s373ms 218ms 20 64 12s380ms 193ms 21 393 1m10s 180ms -
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 = 49627 and fd.product_id = 209394;
Date: 2024-08-26 15:31:35 Duration: 980ms
-
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 = 49822 and fd.product_id = 174022;
Date: 2024-08-26 18:55:25 Duration: 916ms
-
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 = 49760 and fd.product_id = 209392;
Date: 2024-08-26 15:36:14 Duration: 664ms
11 164ms 337ms 189ms 2,620 8m15s update product_warehouse_inventory set sft_stk_qty = ? where id = ( select id from product_warehouse_inventory where product_id = (?) and warehouse_id = (?));Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Aug 26 12 67 13s155ms 196ms 13 495 1m38s 198ms 14 1,524 4m46s 188ms 15 204 37s931ms 185ms 16 22 3s961ms 180ms 17 87 15s752ms 181ms 18 94 17s185ms 182ms 19 31 6s276ms 202ms 20 13 2s301ms 177ms 21 83 14s371ms 173ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209565) and warehouse_id = (37));
Date: 2024-08-26 14:15:21 Duration: 337ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209212) and warehouse_id = (43));
Date: 2024-08-26 14:40:02 Duration: 327ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209257) and warehouse_id = (35));
Date: 2024-08-26 13:52:38 Duration: 312ms
12 160ms 1s35ms 188ms 5,615 17m37s update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Aug 26 02 4 690ms 172ms 03 30 5s57ms 168ms 09 6 1s38ms 173ms 10 8 1s369ms 171ms 11 168 30s373ms 180ms 12 633 2m5s 198ms 13 778 2m31s 194ms 14 751 2m20s 187ms 15 650 2m5s 193ms 16 577 1m43s 179ms 17 733 2m14s 182ms 18 593 1m50s 186ms 19 314 1m 193ms 20 336 59s892ms 178ms 21 33 5s650ms 171ms 22 1 168ms 168ms -
UPDATE product_warehouse_inventory SET qty_available = 2.0 WHERE product_id = 193726 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:55 Duration: 1s35ms
-
UPDATE product_warehouse_inventory SET qty_available = - 1.0 WHERE product_id = 269089 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:54 Duration: 564ms
-
UPDATE product_warehouse_inventory SET qty_available = 1.0 WHERE product_id = 193768 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 15:48:56 Duration: 477ms
13 167ms 674ms 188ms 2,487 7m47s update product_warehouse_inventory set rep_loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Aug 26 02 23 3s979ms 173ms 03 244 42s52ms 172ms 09 5 864ms 172ms 10 2 342ms 171ms 11 343 1m8s 199ms 12 352 1m9s 196ms 13 215 41s261ms 191ms 14 134 25s143ms 187ms 15 172 33s541ms 195ms 16 155 28s43ms 180ms 17 122 22s195ms 181ms 18 340 1m2s 184ms 19 170 32s902ms 193ms 20 207 36s865ms 178ms 21 1 173ms 173ms 22 2 341ms 170ms -
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(0.0, 0) + COALESCE(0.0, 0) WHERE product_id = 222282 AND warehouse_id = 36 AND company_id = 1;
Date: 2024-08-26 15:17:07 Duration: 674ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(9.0, 0) + COALESCE(4.0, 0) WHERE product_id = 190563 AND warehouse_id = 36 AND company_id = 1;
Date: 2024-08-26 11:40:23 Duration: 627ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE(15.0, 0) + COALESCE(0.0, 0) WHERE product_id = 199634 AND warehouse_id = 37 AND company_id = 1;
Date: 2024-08-26 12:05:02 Duration: 612ms
14 120ms 2s197ms 188ms 117,711 6h9m4s 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 #14
Day Hour Count Duration Avg duration Aug 26 00 2,360 5m27s 138ms 01 2,371 5m23s 136ms 02 2,482 5m38s 136ms 03 2,380 5m35s 141ms 04 2,415 5m22s 133ms 05 2,333 5m16s 135ms 06 2,361 5m23s 137ms 07 2,693 5m52s 130ms 08 2,802 6m16s 134ms 09 2,679 6m11s 138ms 10 3,254 7m25s 136ms 11 5,042 15m29s 184ms 12 8,675 32m22s 223ms 13 9,268 38m12s 247ms 14 8,944 29m1s 194ms 15 8,445 30m4s 213ms 16 8,609 29m56s 208ms 17 9,190 27m50s 181ms 18 8,214 30m2s 219ms 19 7,375 30m14s 246ms 20 5,019 16m3s 192ms 21 3,548 8m40s 146ms 22 3,669 8m47s 143ms 23 3,583 8m23s 140ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 13:36:03') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1035"', '["pointspring_master","calendar.alarm",19573]', '["pointspring_master","mail.channel",66]', '["pointspring_master","mail.channel",432]', '["pointspring_master","mail.channel",476]', '["pointspring_master","mail.channel",570]', '["pointspring_master","mail.channel",637]', '["pointspring_master","mail.channel",640]', '["pointspring_master","res.partner",19573]', '["pointspring_master","ir.needaction",19573]'))) ORDER BY "bus_bus"."id";
Date: 2024-08-26 13:36:56 Duration: 2s197ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 15:48:03') 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-08-26 15:48:55 Duration: 2s165ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-08-26 13:36:03') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19503]', '["pointspring_master","mail.channel",148]', '["pointspring_master","mail.channel",149]', '["pointspring_master","mail.channel",150]', '["pointspring_master","mail.channel",448]', '["pointspring_master","mail.channel",546]', '["pointspring_master","mail.channel",551]', '["pointspring_master","mail.channel",569]', '["pointspring_master","res.partner",19503]', '["pointspring_master","ir.needaction",19503]'))) ORDER BY "bus_bus"."id";
Date: 2024-08-26 13:36:56 Duration: 2s164ms
15 158ms 888ms 184ms 11,547 35m35s update product_warehouse_inventory set loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) - coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Aug 26 02 222 37s653ms 169ms 03 899 2m32s 169ms 08 3 524ms 174ms 09 2 348ms 174ms 10 28 4s847ms 173ms 11 858 2m42s 189ms 12 1,249 4m1s 193ms 13 1,355 4m20s 192ms 14 866 2m39s 184ms 15 866 2m43s 188ms 16 1,303 3m55s 181ms 17 951 2m54s 183ms 18 1,286 3m55s 183ms 19 733 2m21s 192ms 20 732 2m11s 179ms 21 186 31s918ms 171ms 22 8 1s377ms 172ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(4.0, 0) + COALESCE(0.0, 0) - COALESCE(5.0, 0) WHERE product_id = 250760 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-08-26 12:56:25 Duration: 888ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(0.0, 0) + COALESCE(0.0, 0) - COALESCE(1.0, 0) WHERE product_id = 269257 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-08-26 13:13:51 Duration: 836ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(26.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 203728 AND warehouse_id = 35 AND company_id = 1;
Date: 2024-08-26 15:31:35 Duration: 780ms
16 165ms 755ms 184ms 9,849 30m21s update product_warehouse_inventory set qty_shipped_not_invoiced = case when ?.? is not null then greatest ((?.? - ?.?) + (?.? - ?.?), ?) else greatest ((?.? - ?.?), ?) end where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Aug 26 08 28 4s739ms 169ms 09 11 1s875ms 170ms 10 35 6s376ms 182ms 11 404 1m11s 176ms 12 722 2m17s 190ms 13 1,409 4m30s 191ms 14 699 2m9s 185ms 15 1,001 3m11s 191ms 16 684 2m3s 180ms 17 780 2m22s 182ms 18 1,868 5m36s 180ms 19 1,435 4m26s 185ms 20 718 2m10s 181ms 21 48 8s204ms 170ms 22 7 1s200ms 171ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 15.0 IS NOT NULL THEN GREATEST ((0.0 - 0.0) + (15.0 - 15.0), 0) ELSE GREATEST ((0.0 - 0.0), 0) END where product_id = 216173 and warehouse_id = 35 and company_id = 1;
Date: 2024-08-26 13:36:54 Duration: 755ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 18.0 IS NOT NULL THEN GREATEST ((341.0 - 341.0) + (18.0 - 18.0), 0) ELSE GREATEST ((341.0 - 341.0), 0) END where product_id = 213911 and warehouse_id = 35 and company_id = 1;
Date: 2024-08-26 13:36:56 Duration: 612ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 3.0 IS NOT NULL THEN GREATEST ((0.0 - 0.0) + (3.0 - 3.0), 0) ELSE GREATEST ((0.0 - 0.0), 0) END where product_id = 172453 and warehouse_id = 45 and company_id = 1;
Date: 2024-08-26 13:15:25 Duration: 607ms
17 155ms 574ms 184ms 3,018 9m16s 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 Aug 26 02 19 3s155ms 166ms 03 74 12s869ms 173ms 08 2 342ms 171ms 09 2 336ms 168ms 10 8 1s347ms 168ms 11 249 44s110ms 177ms 12 322 1m3s 197ms 13 399 1m15s 189ms 14 293 54s235ms 185ms 15 266 49s749ms 187ms 16 380 1m7s 176ms 17 301 54s898ms 182ms 18 344 1m2s 180ms 19 185 36s390ms 196ms 20 129 23s324ms 180ms 21 40 6s724ms 168ms 22 5 845ms 169ms -
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 254600 AND warehouse_id = 46;
Date: 2024-08-26 18:11:59 Duration: 574ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 2.0 WHERE product_id = 185962 AND warehouse_id = 46;
Date: 2024-08-26 12:57:16 Duration: 395ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 5.0 WHERE product_id = 185662 AND warehouse_id = 41;
Date: 2024-08-26 13:21:43 Duration: 395ms
18 155ms 1s29ms 184ms 3,118 9m34s update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Aug 26 02 32 5s248ms 164ms 03 100 17s103ms 171ms 08 3 497ms 165ms 09 2 333ms 166ms 10 12 2s277ms 189ms 11 48 8s721ms 181ms 12 363 1m8s 188ms 13 437 1m23s 190ms 14 323 1m1s 191ms 15 297 55s757ms 187ms 16 296 52s536ms 177ms 17 293 53s326ms 182ms 18 314 56s785ms 180ms 19 213 40s422ms 189ms 20 360 1m3s 176ms 21 24 4s58ms 169ms 22 1 164ms 164ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 192903 AND warehouse_id = 37;
Date: 2024-08-26 14:26:24 Duration: 1s29ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 252390 AND warehouse_id = 45;
Date: 2024-08-26 17:06:43 Duration: 787ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223012 AND warehouse_id = 37;
Date: 2024-08-26 20:19:33 Duration: 773ms
19 120ms 693ms 168ms 5,493 15m27s 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 #19
Day Hour Count Duration Avg duration Aug 26 11 463 1m18s 169ms 12 904 2m46s 183ms 13 749 2m9s 172ms 14 617 1m39s 161ms 15 959 2m42s 169ms 16 600 1m28s 148ms 17 444 1m12s 162ms 18 274 42s745ms 156ms 19 260 46s620ms 179ms 20 223 40s729ms 182ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 208664) 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" = '46')))))) 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-08-26 12:08:15 Duration: 693ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 220868) 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-08-26 20:30:49 Duration: 531ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 254609) 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-08-26 20:30:50 Duration: 499ms
20 120ms 1s78ms 160ms 2,422 6m29s 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 Aug 26 09 2 246ms 123ms 10 1 134ms 134ms 11 54 7s659ms 141ms 12 294 47s901ms 162ms 13 524 1m25s 162ms 14 184 29s905ms 162ms 15 312 54s764ms 175ms 16 94 15s296ms 162ms 17 162 25s95ms 154ms 18 284 43s867ms 154ms 19 354 55s378ms 156ms 20 153 23s632ms 154ms 21 4 498ms 124ms -
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 204868 and sol.warehouse_id = 37 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-08-26 20:32:49 Duration: 1s78ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 222282 and sol.warehouse_id = 36 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-08-26 15:17:08 Duration: 990ms
-
select sum(qty_delivered) as qty_delivered, sum(qty_invoiced) as qty_invoiced from sale_order_line as sol where sol.product_id = 204928 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-08-26 19:47:44 Duration: 987ms
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
- 272,437 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 1633 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 738 Max number of times the same event was reported
- 1,633 Total events found
Rank Times reported Error 1 738 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Aug 26 00 27 01 30 02 30 03 33 04 28 05 29 06 32 07 33 08 29 09 31 10 30 11 40 12 47 13 4 14 5 15 2 16 2 17 1 18 1 19 43 20 36 21 33 22 36 23 156 - 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-08-26 10:50:07
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-08-26 11:00:10
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=89 FOR UPDATE NOWAIT
Date: 2024-08-26 11:02:24
2 655 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Aug 26 01 1 05 1 08 1 09 1 10 3 11 27 12 67 13 71 14 74 15 300 16 33 17 27 18 24 19 14 20 11 - 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: SELECT * FROM website_visitor where id = 20650272 FOR NO KEY UPDATE NOWAIT
Date: 2024-08-26 11:01:54
Statement: UPDATE "bus_presence" SET "last_poll"='2024-08-26 11:02:07',"last_presence"='2024-08-26 11:02:07.929800' WHERE id IN (76)
Date: 2024-08-26 11:02:07
Statement: UPDATE "bus_presence" SET "last_poll"='2024-08-26 11:06:14',"last_presence"='2024-08-26 11:06:14.570737' WHERE id IN (69)
Date: 2024-08-26 11:06:14
3 104 LOG: process ... still waiting for ExclusiveLock on tuple (...) of relation ... of database ... after ... ms
Times Reported Most Frequent Error / Event #3
Day Hour Count Aug 26 14 1 15 102 20 1 - ERROR: process 2373614 still waiting for ExclusiveLock on tuple (18428,29) of relation 42418 of database 65946 after 1000.065 ms
- ERROR: process 1666402 still waiting for ExclusiveLock on tuple (812,31) of relation 44820 of database 65946 after 1000.045 ms
- ERROR: process 2139607 still waiting for ExclusiveLock on tuple (812,54) of relation 44820 of database 65946 after 1000.058 ms
Detail: Process holding the lock: 2841115. Wait queue: 2373614.
Statement: UPDATE "account_move" SET "message_main_attachment_id"=5656322,"write_uid"=1015,"write_date"=(now() at time zone 'UTC') WHERE id IN (1621610)Date: 2024-08-26 20:02:42
Detail: Process holding the lock: 1666222. Wait queue: 1666402.
Statement: UPDATE "sale_order" SET "carrier_id"=NULL,"write_uid"=1271,"write_date"=(now() at time zone 'UTC') WHERE id IN (159284)Date: 2024-08-26 15:34:36
Detail: Process holding the lock: 2136763. Wait queue: 1666222, 1666542, 2149122, 2139607, 1666210, 2113963.
Statement: UPDATE "sale_order" SET "core_bank_transaction"=false,"margin"='44.86',"margin_percent"=0.10060100466451381,"unpaid_amount_total"='445.92',"write_uid"=1271,"write_date"=(now() at time zone 'UTC') WHERE id IN (159284)Date: 2024-08-26 15:35:04
4 87 LOG: process ... still waiting for ShareLock on transaction ... after ... ms
Times Reported Most Frequent Error / Event #4
Day Hour Count Aug 26 12 3 13 4 14 6 15 70 17 2 20 2 - ERROR: process 1666659 still waiting for ShareLock on transaction 299044530 after 1000.052 ms
- ERROR: process 1666993 still waiting for ShareLock on transaction 299046566 after 1000.051 ms
- ERROR: process 2841115 still waiting for ShareLock on transaction 299316157 after 1000.054 ms
Detail: Process holding the lock: 1666528. Wait queue: 1666659.
Context: while updating tuple (17624,13) 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 != 1618661 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 != 1618661 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-08-26 12:47:16
Detail: Process holding the lock: 1666071. Wait queue: 1666993.
Context: while deleting tuple (4,46) in relation "monthly_statement_line"
Statement: DELETE FROM monthly_statement_line WHERE id IN (1213950, 1213871, 1213872, 1213873, 1213869, 1213868, 1213867, 1213874, 1213949, 1213948, 1213870, 1213878, 1213879, 1213875, 1213876, 1213877, 1213883, 1213884, 1213885, 1213886, 1213887, 1213880, 1213881, 1213882, 1213891, 1213888, 1213889, 1213890, 1213892, 1213893, 1213894, 1213895, 1213896, 1213897, 1213899, 1213898, 1213951, 1213900, 1213901, 1213905, 1213904, 1213903, 1213902, 1213906, 1213910, 1213907, 1213908, 1213909, 1213911, 1213912, 1213913, 1213916, 1213914, 1213915, 1213952, 1213917, 1213919, 1213920, 1213918, 1213922, 1213921, 1213923, 1213924, 1213954, 1213925, 1213926, 1213927, 1213928, 1213953, 1213929, 1213930, 1213932, 1213933, 1213931, 1213936, 1213937, 1213934, 1213935, 1213939, 1213941, 1213940, 1213938, 1213944, 1213942, 1213943, 1213946, 1213945, 1213947)Date: 2024-08-26 12:49:08
Detail: Process holding the lock: 2360969. Wait queue: 2841115.
Context: while updating tuple (18428,29) 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 != 1621608 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 != 1621608 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-08-26 20:02:40
5 25 ERROR: current transaction is aborted, commands ignored until end of transaction block
Times Reported Most Frequent Error / Event #5
Day Hour Count Aug 26 14 1 15 23 20 1 - ERROR: current transaction is aborted, commands ignored until end of transaction block
- ERROR: current transaction is aborted, commands ignored until end of transaction block
- ERROR: current transaction is aborted, commands ignored until end of transaction block
Statement: SELECT "ir_ui_view".id FROM "ir_ui_view" LEFT JOIN "website" AS "ir_ui_view__website_id" ON ("ir_ui_view"."website_id" = "ir_ui_view__website_id"."id") WHERE (("ir_ui_view"."active" = true) AND (("ir_ui_view"."key" = 'website_sale.header_cart_link') AND (("ir_ui_view"."website_id" in (1)) OR "ir_ui_view"."website_id" IS NULL))) ORDER BY "ir_ui_view__website_id"."id" LIMIT 1
Date: 2024-08-26 20:18:44
Statement: SELECT "res_lang"."id" as "id", "res_lang"."name" as "name", "res_lang"."code" as "code", "res_lang"."iso_code" as "iso_code", "res_lang"."url_code" as "url_code", "res_lang"."active" as "active", "res_lang"."direction" as "direction", "res_lang"."date_format" as "date_format", "res_lang"."time_format" as "time_format", "res_lang"."week_start" as "week_start", "res_lang"."grouping" as "grouping", "res_lang"."decimal_point" as "decimal_point", "res_lang"."thousands_sep" as "thousands_sep", "res_lang"."create_uid" as "create_uid", "res_lang"."create_date" as "create_date", "res_lang"."write_uid" as "write_uid", "res_lang"."write_date" as "write_date" FROM "res_lang" WHERE "res_lang".id IN (1)
Date: 2024-08-26 15:35:34
Statement: SELECT MAX(CASE WHEN perm_read THEN 1 ELSE 0 END) FROM ir_model_access a JOIN ir_model m ON (m.id = a.model_id) JOIN res_groups_users_rel gu ON (gu.gid = a.group_id) WHERE m.model = 'res.lang' AND gu.uid = 1271 AND a.active IS TRUE
Date: 2024-08-26 15:36:11
6 9 LOG: process ... still waiting for AccessExclusiveLock on tuple (...) of relation ... of database ... after ... ms
Times Reported Most Frequent Error / Event #6
Day Hour Count Aug 26 15 9 - ERROR: process 1666402 still waiting for AccessExclusiveLock on tuple (23275,8) of relation 44826 of database 65946 after 1000.048 ms
- ERROR: process 1666478 still waiting for AccessExclusiveLock on tuple (23275,11) of relation 44826 of database 65946 after 1000.054 ms
- ERROR: process 1666542 still waiting for AccessExclusiveLock on tuple (23275,17) of relation 44826 of database 65946 after 1000.058 ms
Detail: Process holding the lock: 2149122. Wait queue: 1666402.
Statement: DELETE FROM sale_order_line WHERE id IN (465034)Date: 2024-08-26 15:35:16
Detail: Process holding the lock: 1666662. Wait queue: 1666478.
Statement: DELETE FROM sale_order_line WHERE id IN (465035)Date: 2024-08-26 15:35:54
Detail: Process holding the lock: 1666993. Wait queue: 1666542.
Statement: DELETE FROM sale_order_line WHERE id IN (465042)Date: 2024-08-26 15:36:16
7 4 ERROR: syntax error at or near "..."
Times Reported Most Frequent Error / Event #7
Day Hour Count Aug 26 18 4 - ERROR: syntax error at or near "CB" at character 98
Statement: select max(id) from sale_history_line where (product_name is not null and product_name ilike '3' CB ANT. 16G BL' and inventory_short_vendor_name ='DAS') or (product_id=210141) group by product_name
Date: 2024-08-26 18:38:33
8 4 ERROR: null value in column "..." of relation "..." violates not-null constraint
Times Reported Most Frequent Error / Event #8
Day Hour Count Aug 26 20 4 - ERROR: null value in column "name" of relation "sale_order_line" violates not-null constraint
Detail: Failing row contains (472456, 162466, null, 2, no, 0.00, null, null, null, null, null, null, 0.00, null, 0.00, null, null, 0.00, 0.00, null, null, null, null, null, null, null, null, null, null, draft, 0, line_note, 973, 2024-08-26 20:35:01.9779, 973, 2024-08-26 20:35:01.9779, null, null, null, null, null, null, null, null, null, 0.00, f, null, f, new_product, 0, f, 0.00, t, f, null, null, null, null, null, null, null, null, null, f, null, null, null, null, null, null, null, null, null, null, 0, f, f, null, null, null, f, null, null, null, null, f).
Statement: INSERT INTO "sale_order_line" ("id", "create_uid", "create_date", "write_uid", "write_date", "core_bank_transaction", "core_qty", "customer_lead", "discount", "display_type", "exception_sale", "invoice_status", "is_call_for_price_prod", "is_delivery", "is_legacy", "is_ohio_tax_free", "is_visible_in_report", "manual_price_changed", "move_options", "name", "open_qty_fil", "order_id", "price_unit", "product_id", "product_packaging", "product_pricelist_item_id", "product_uom", "product_uom_qty", "purchase_price", "qty_delivered", "qty_delivered_manual", "rebate_amount", "return_rule_skiped", "route_id", "sequence", "so_line_id", "state", "tick") VALUES (nextval('sale_order_line_id_seq'), 973, (now() at time zone 'UTC'), 973, (now() at time zone 'UTC'), false, 0.0, 0.0, '0.00', 'line_note', false, 'no', false, false, false, false, true, false, 'new_product', NULL, 0.0, 162466, '0.00', NULL, NULL, NULL, NULL, '0.00', '0.00', '0.00', '0.00', '0.00', false, NULL, 2, NULL, 'draft', false) RETURNING idDate: 2024-08-26 20:35:02
9 4 ERROR: could not serialize access due to concurrent delete
Times Reported Most Frequent Error / Event #9
Day Hour Count Aug 26 12 1 15 2 17 1 - ERROR: could not serialize access due to concurrent delete
- ERROR: could not serialize access due to concurrent delete
- ERROR: could not serialize access due to concurrent delete
Statement: DELETE FROM monthly_statement_line WHERE id IN (1213950, 1213871, 1213872, 1213873, 1213869, 1213868, 1213867, 1213874, 1213949, 1213948, 1213870, 1213878, 1213879, 1213875, 1213876, 1213877, 1213883, 1213884, 1213885, 1213886, 1213887, 1213880, 1213881, 1213882, 1213891, 1213888, 1213889, 1213890, 1213892, 1213893, 1213894, 1213895, 1213896, 1213897, 1213899, 1213898, 1213951, 1213900, 1213901, 1213905, 1213904, 1213903, 1213902, 1213906, 1213910, 1213907, 1213908, 1213909, 1213911, 1213912, 1213913, 1213916, 1213914, 1213915, 1213952, 1213917, 1213919, 1213920, 1213918, 1213922, 1213921, 1213923, 1213924, 1213954, 1213925, 1213926, 1213927, 1213928, 1213953, 1213929, 1213930, 1213932, 1213933, 1213931, 1213936, 1213937, 1213934, 1213935, 1213939, 1213941, 1213940, 1213938, 1213944, 1213942, 1213943, 1213946, 1213945, 1213947)
Date: 2024-08-26 12:49:09
Statement: DELETE FROM sale_order_line WHERE id IN (464392)
Date: 2024-08-26 15:34:52
Statement: DELETE FROM sale_order_line WHERE id IN (472066)
Date: 2024-08-26 15:39:41
10 2 ERROR: deadlock detected
Times Reported Most Frequent Error / Event #10
Day Hour Count Aug 26 13 2 - ERROR: deadlock detected
- ERROR: deadlock detected
Detail: Process 1666476 waits for ShareLock on transaction 299112535; blocked by process 1668070. Process 1668070 waits for ShareLock on transaction 299112536; blocked by process 1666476. Process 1666476: 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 (161829) Process 1668070: 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 (470640, 471584)
Context: while updating tuple (2276,41) 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 (161829)Date: 2024-08-26 13:38:26
Detail: Process 1666659 waits for ShareLock on transaction 299121791; blocked by process 1695870. Process 1695870 waits for ShareLock on transaction 299121787; blocked by process 1666659. Process 1666659: UPDATE "product_warehouse_inventory" SET "lead_days"=11,"write_uid"=958,"write_date"=(now() at time zone 'UTC') WHERE id IN (80512) Process 1695870: UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE( -2.0, 0) + COALESCE(2.0, 0) - COALESCE(0.0, 0) WHERE product_id = 197786 AND warehouse_id = 35 AND company_id = 1
Context: while updating tuple (27158,19) in relation "product_warehouse_inventory"
Hint: See server log for query details.
Statement: UPDATE "product_warehouse_inventory" SET "lead_days"=11,"write_uid"=958,"write_date"=(now() at time zone 'UTC') WHERE id IN (80512)Date: 2024-08-26 13:54:43
11 1 ERROR: duplicate key value violates unique constraint "..."
Times Reported Most Frequent Error / Event #11
Day Hour Count Aug 26 20 1 - ERROR: duplicate key value violates unique constraint "mail_followers_mail_followers_res_partner_res_model_id_uniq"
Detail: Key (res_model, res_id, partner_id)=(stock.picking, 486307, 53471) already exists.
Statement: INSERT INTO "mail_followers" ("id", "channel_id", "partner_id", "res_id", "res_model") VALUES (nextval('mail_followers_id_seq'), NULL, 53471, 486307, 'stock.picking') RETURNING idDate: 2024-08-26 20:18:44