-
Global information
- Generated on Tue Jun 18 00:50:08 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 487,209 log entries in 6s
- Log start from 2024-06-17 00:00:11 to 2024-06-17 23:59:59
-
Overview
Global Stats
- 1,037 Number of unique normalized queries
- 143,893 Number of queries
- 12h31m37s Total query duration
- 2024-06-17 00:00:11 First query
- 2024-06-17 23:59:59 Last query
- 92 queries/s at 2024-06-17 12:59:12 Query peak
- 12h31m37s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 12h31m37s Execute total duration
- 34,405 Number of events
- 9 Number of unique normalized events
- 33,543 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
- 143,893 Average queries per session
- 12h31m37s 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
- 92 queries/s Query Peak
- 2024-06-17 12:59:12 Date
SELECT Traffic
Key values
- 92 queries/s Query Peak
- 2024-06-17 12:59:12 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 14 queries/s Query Peak
- 2024-06-17 14:35:05 Date
Queries duration
Key values
- 12h31m37s 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) Jun 17 00 246 136ms 290ms 141ms 567ms 582ms 1s424ms 01 285 136ms 1s948ms 333ms 713ms 1s860ms 34s941ms 02 243 136ms 1s18ms 148ms 556ms 562ms 2s587ms 03 4,499 120ms 6s684ms 225ms 53s67ms 56s313ms 58s988ms 04 249 136ms 1s264ms 153ms 556ms 975ms 2s897ms 05 243 136ms 1s18ms 149ms 554ms 563ms 3s615ms 06 243 135ms 1s39ms 149ms 559ms 560ms 3s624ms 07 287 136ms 433ms 141ms 1s62ms 1s539ms 2s444ms 08 279 0ms 5s118ms 194ms 1s590ms 3s897ms 9s189ms 09 632 120ms 3m51s 1s479ms 57s956ms 1m52s 3m52s 10 1,135 120ms 13s101ms 271ms 15s747ms 17s182ms 49s481ms 11 7,851 120ms 1m33s 316ms 1m18s 1m40s 1m43s 12 16,089 120ms 21s835ms 320ms 1m49s 1m58s 7m18s 13 17,443 120ms 54s390ms 275ms 1m46s 1m55s 2m4s 14 19,260 120ms 21s524ms 268ms 2m2s 2m16s 2m34s 15 15,504 120ms 1m5s 279ms 1m54s 2m7s 3m58s 16 11,246 120ms 1m6s 295ms 1m39s 1m53s 2m2s 17 11,251 120ms 24s691ms 282ms 1m23s 1m34s 1m43s 18 10,445 120ms 31s777ms 307ms 1m38s 1m46s 2m30s 19 18,016 120ms 28s289ms 394ms 3m15s 3m37s 3m48s 20 4,993 120ms 20s188ms 513ms 1m51s 2m10s 2m52s 21 1,585 120ms 5s522ms 273ms 19s505ms 29s380ms 49s329ms 22 974 120ms 5s553ms 221ms 10s929ms 18s48ms 23s664ms 23 895 120ms 49s686ms 557ms 36s880ms 48s541ms 1m21s Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Jun 17 00 246 0 141ms 564ms 567ms 991ms 01 285 0 333ms 554ms 713ms 24s881ms 02 243 0 148ms 554ms 556ms 1s570ms 03 866 0 176ms 5s732ms 6s544ms 9s158ms 04 245 0 150ms 554ms 556ms 2s102ms 05 243 0 149ms 554ms 554ms 576ms 06 243 0 149ms 554ms 559ms 573ms 07 287 0 141ms 564ms 1s62ms 1s869ms 08 276 0 191ms 558ms 691ms 5s832ms 09 337 111 2s3ms 5s820ms 57s401ms 2m1s 10 512 0 316ms 3s943ms 6s486ms 16s766ms 11 3,321 0 405ms 33s927ms 51s342ms 1m27s 12 7,315 0 415ms 52s303ms 1m6s 6m25s 13 6,264 0 330ms 46s403ms 53s626ms 1m6s 14 8,287 0 306ms 58s214ms 1m9s 1m13s 15 7,743 0 308ms 53s952ms 1m3s 2m8s 16 4,499 0 345ms 38s860ms 50s968ms 1m5s 17 4,057 0 347ms 31s824ms 38s408ms 48s154ms 18 3,740 0 426ms 39s84ms 50s67ms 1m16s 19 7,095 0 603ms 1m41s 2m25s 2m48s 20 2,489 0 781ms 1m5s 1m33s 1m52s 21 739 0 292ms 5s284ms 8s879ms 14s383ms 22 425 0 225ms 2s366ms 3s93ms 10s490ms 23 716 0 187ms 3s124ms 7s524ms 11s780ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Jun 17 00 0 0 0 0 0ms 0ms 0ms 0ms 01 0 0 0 0 0ms 0ms 0ms 0ms 02 0 0 0 0 0ms 0ms 0ms 0ms 03 0 2,045 0 0 165ms 832ms 13s857ms 25s112ms 04 0 4 0 0 357ms 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 2 0 0 570ms 0ms 0ms 0ms 09 0 140 0 0 165ms 0ms 0ms 3s126ms 10 0 375 0 0 165ms 0ms 0ms 11s10ms 11 0 2,628 21 0 192ms 9s808ms 14s343ms 19s13ms 12 0 5,507 31 0 184ms 18s273ms 22s140ms 31s506ms 13 0 7,209 29 0 192ms 23s822ms 26s974ms 36s244ms 14 0 7,244 60 0 188ms 22s261ms 27s973ms 47s95ms 15 0 4,887 54 0 195ms 16s580ms 21s376ms 31s387ms 16 0 3,909 27 0 208ms 12s634ms 18s666ms 35s125ms 17 0 4,550 51 0 196ms 16s382ms 22s325ms 32s370ms 18 0 4,388 48 0 192ms 13s774ms 21s624ms 34s316ms 19 0 6,633 50 0 190ms 21s249ms 24s718ms 33s112ms 20 0 1,573 8 0 188ms 5s288ms 9s969ms 15s853ms 21 0 412 2 0 180ms 168ms 1s589ms 5s522ms 22 0 410 3 0 182ms 0ms 2s15ms 9s137ms 23 0 73 74 0 2s409ms 0ms 6s224ms 36s761ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Jun 17 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 Jun 17 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 Jun 17 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 Jun 17 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 Jun 17 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) Jun 17 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 Jun 17 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 Jun 17 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
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 Jun 17 00 0 0 01 0 0 02 0 0 03 0 0 04 0 0 05 0 0 06 0 0 07 0 0 08 0 0 09 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 - 0 sec Highest CPU-cost vacuum
-
Locks
Locks by types
Key values
- ShareLock Main Lock Type
- 67 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query 1 35 4m1s 2s76ms 1m8s 6s913ms 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 != 1147961 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 != 1147961 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-06-17 13:25:17
-
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 != 1476212 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 != 1476212 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-06-17 13:38:07
-
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 != 1476141 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 != 1476141 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-06-17 13:25:48
2 11 34s363ms 3s250ms 6s131ms 3s123ms update "product_warehouse_inventory" set "last_used_date" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "product_warehouse_inventory" SET "last_used_date" = '2024-06-17', "write_uid" = 1021, "write_date" = (now() at time zone 'UTC') WHERE id IN (11940, 36967, 72269, 52943, 102737, 53045, 71901, 51773);
Date: 2024-06-17 13:27:05
-
UPDATE "product_warehouse_inventory" SET "last_used_date" = '2024-06-17', "write_uid" = 952, "write_date" = (now() at time zone 'UTC') WHERE id IN (80480, 45281, 63493, 63530, 45259, 45169, 76434, 63538, 45234, 76438, 63354, 78812);
Date: 2024-06-17 19:05:34
-
UPDATE "product_warehouse_inventory" SET "last_used_date" = '2024-06-17', "write_uid" = 1020, "write_date" = (now() at time zone 'UTC') WHERE id IN (8576, 7426, 330020, 98149, 329869, 7344, 327163, 103196, 98206);
Date: 2024-06-17 14:51:21
3 5 23s792ms 2s683ms 15s776ms 4s758ms update product_warehouse_inventory set loc_check_qty = coalesce(?.?, ?) + coalesce(?.?, ?) - coalesce(?.?, ?) where product_id = ? and warehouse_id = ? and company_id = ?;-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(205.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 171661 AND warehouse_id = 40 AND company_id = 1;
Date: 2024-06-17 19:38:18
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(19.0, 0) + COALESCE(10.0, 0) - COALESCE(0.0, 0) WHERE product_id = 195667 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-06-17 12:59:11
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(21.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 257434 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-06-17 17:22:36
4 8 16s707ms 1s875ms 4s124ms 2s88ms 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" = 5509595, "write_uid" = 979, "write_date" = (now() at time zone 'UTC') WHERE id IN (1478654);
Date: 2024-06-17 20:32:41
-
UPDATE "account_move" SET "message_main_attachment_id" = 5508816, "write_uid" = 1028, "write_date" = (now() at time zone 'UTC') WHERE id IN (1477721);
Date: 2024-06-17 16:57:13
-
UPDATE "account_move" SET "message_main_attachment_id" = 5507346, "write_uid" = 1021, "write_date" = (now() at time zone 'UTC') WHERE id IN (1476152);
Date: 2024-06-17 13:27:36
5 4 7s391ms 1s16ms 2s422ms 1s847ms update "account_move" set "amount_residual" = ?, "amount_residual_signed" = ?, "amount_total" = ?, "amount_total_signed" = ?, "name" = ?, "posted_before" = true, "state" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "account_move" SET "amount_residual" = '2178.72', "amount_residual_signed" = '2178.72', "amount_total" = '2178.72', "amount_total_signed" = '2178.72', "name" = 'B-INV-11868', "posted_before" = true, "state" = 'posted', "write_uid" = 952, "write_date" = (now() at time zone 'UTC') WHERE id IN (1478271);
Date: 2024-06-17 19:05:26
-
UPDATE "account_move" SET "amount_residual" = '2178.72', "amount_residual_signed" = '2178.72', "amount_total" = '2178.72', "amount_total_signed" = '2178.72', "name" = 'B-INV-11863', "posted_before" = true, "state" = 'posted', "write_uid" = 952, "write_date" = (now() at time zone 'UTC') WHERE id IN (1478271);
Date: 2024-06-17 19:04:56
-
UPDATE "account_move" SET "amount_residual" = '2178.72', "amount_residual_signed" = '2178.72', "amount_total" = '2178.72', "amount_total_signed" = '2178.72', "name" = 'B-INV-11869', "posted_before" = true, "state" = 'posted', "write_uid" = 952, "write_date" = (now() at time zone 'UTC') WHERE id IN (1478271);
Date: 2024-06-17 19:05:28
6 1 5s200ms 5s200ms 5s200ms 5s200ms update "account_move" set "email_send_eod" = false, "email_sent" = true, "message_main_attachment_id" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "account_move" SET "email_send_eod" = false, "email_sent" = true, "message_main_attachment_id" = 5507328, "write_uid" = 1021, "write_date" = (now() at time zone 'UTC') WHERE id IN (1476137);
Date: 2024-06-17 13:25:38
-
UPDATE "account_move" SET "email_send_eod" = false, "email_sent" = true, "message_main_attachment_id" = 5507328, "write_uid" = 1021, "write_date" = (now() at time zone 'UTC') WHERE id IN (1476137);
Date: 2024-06-17 13:25:38
7 2 5s139ms 2s554ms 2s584ms 2s569ms 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 2.0 IS NOT NULL THEN GREATEST ((19.0 - 19.0) + (2.0 - 1.0), 0) ELSE GREATEST ((19.0 - 19.0), 0) END where product_id = 215519 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 18:24:24
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 2.0 IS NOT NULL THEN GREATEST ((19.0 - 19.0) + (2.0 - 1.0), 0) ELSE GREATEST ((19.0 - 19.0), 0) END where product_id = 215519 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 18:24:27
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((1.0 - 1.0) + (0.0 - 0.0), 0) ELSE GREATEST ((1.0 - 1.0), 0) END where product_id = 266964 and warehouse_id = 42 and company_id = 1;
Date: 2024-06-17 16:01:00
8 1 1s546ms 1s546ms 1s546ms 1s546ms update account_move set write_date = write_date where id = ( select id from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) and sequence_prefix = ( select sequence_prefix from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) order by id desc limit ?) order by sequence_number desc limit ?) returning name;-
UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-06-17 12:17:23
Queries that waited the most
Rank Wait time Query 1 1m8s UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1477604 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1477604 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 16:30:06 ]
2 32s747ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1477605 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1477605 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 16:30:06 ]
3 28s263ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1476960 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1476960 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 15:05:47 ]
4 15s776ms UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(107.0, 0) + COALESCE(10.0, 0) - COALESCE(0.0, 0) WHERE product_id = 238912 AND warehouse_id = 36 AND company_id = 1;[ Date: 2024-06-17 12:31:05 ]
5 14s79ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1478203 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1478203 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 18:51:59 ]
6 11s390ms 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 != 1476064 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 != 1476064 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 13:11:20 ]
7 6s315ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1477169 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1477169 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 15:32:41 ]
8 6s131ms UPDATE "product_warehouse_inventory" SET "last_used_date" = '2024-06-17', "write_uid" = 1245, "write_date" = (now() at time zone 'UTC') WHERE id IN (349802, 349798);[ Date: 2024-06-17 13:30:19 ]
9 5s272ms 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 != 1147961 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 != 1147961 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 13:25:17 ]
10 5s200ms UPDATE "account_move" SET "email_send_eod" = false, "email_sent" = true, "message_main_attachment_id" = 5507328, "write_uid" = 1021, "write_date" = (now() at time zone 'UTC') WHERE id IN (1476137);[ Date: 2024-06-17 13:25:38 ]
11 5s44ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1401767 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1401767 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 12:38:02 ]
12 4s157ms UPDATE "product_warehouse_inventory" SET "last_used_date" = '2024-06-17', "write_uid" = 1025, "write_date" = (now() at time zone 'UTC') WHERE id IN (369216, 88130, 50466, 29384, 81137, 97651, 50456, 52889, 35390, 88121);[ Date: 2024-06-17 17:12:04 ]
13 4s124ms UPDATE "account_move" SET "message_main_attachment_id" = 5508535, "write_uid" = 1005, "write_date" = (now() at time zone 'UTC') WHERE id IN (1477440);[ Date: 2024-06-17 15:53:16 ]
14 4s92ms 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 != 1476212 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 != 1476212 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 13:38:07 ]
15 3s757ms UPDATE "product_warehouse_inventory" SET "last_used_date" = '2024-06-17', "write_uid" = 1020, "write_date" = (now() at time zone 'UTC') WHERE id IN (8576, 7426, 330020, 98149, 329869, 7344, 327163, 103196, 98206);[ Date: 2024-06-17 14:51:21 ]
16 3s650ms 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 != 1476141 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 != 1476141 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 13:25:48 ]
17 3s645ms UPDATE "product_warehouse_inventory" SET "last_used_date" = '2024-06-17', "write_uid" = 1021, "write_date" = (now() at time zone 'UTC') WHERE id IN (11940, 36967, 72269, 52943, 102737, 53045, 71901, 51773);[ Date: 2024-06-17 13:27:05 ]
18 3s486ms 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 != 1476732 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 != 1476732 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 18:36:23 ]
19 3s458ms 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 != 1476142 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 != 1476142 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 13:25:53 ]
20 3s441ms 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 != 1476258 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 != 1476258 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-06-17 13:42:53 ]
-
Queries
Queries by type
Key values
- 60,473 Total read queries
- 83,418 Total write queries
Queries by database
Key values
- unknown Main database
- 143,893 Requests
- 12h31m37s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 143,933 Requests
User Request type Count Duration unknown Total 143,933 12h31m43s copy to 111 13m25s cte 30,854 2h55m48s cursor 3 1s892ms delete 458 23m10s others 2 1s33ms select 60,513 6h29m58s tcl 3 751ms update 51,989 2h29m15s Duration by user
Key values
- 12h31m43s (unknown) Main time consuming user
User Request type Count Duration unknown Total 143,933 12h31m43s copy to 111 13m25s cte 30,854 2h55m48s cursor 3 1s892ms delete 458 23m10s others 2 1s33ms select 60,513 6h29m58s tcl 3 751ms update 51,989 2h29m15s Queries by host
Key values
- unknown Main host
- 143,933 Requests
- 12h31m43s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 143,893 Requests
- 12h31m37s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-06-17 14:21:45 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 131,206 100-500ms duration
Slowest individual queries
Rank Duration Query 1 3m51s 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-06-17 09:09:48 ]
2 1m58s 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-06-17 09:03:53 ]
3 1m51s 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-06-17 09:05:55 ]
4 1m33s SELECT "item_list_line".id FROM "item_list_line" WHERE ("item_list_line"."product_id" in (266992)) ORDER BY "item_list_line"."id";[ Date: 2024-06-17 11:22:51 ]
5 1m6s DELETE FROM account_move_line WHERE id IN (4871316, 4871317, 4871318, 4871319, 4871320, 4871321, 4871322, 4871323, 4871324, 4871325, 4871326, 4871327, 4871328, 4871329, 4871330, 4871331, 4871332, 4871333, 4871334, 4871335, 4871336, 4871337, 4871338, 4871339, 4871340, 4871341, 4871342, 4871343, 4871344, 4871345, 4871346, 4871347, 4871348, 4871349, 5170858, 5170859);[ Date: 2024-06-17 16:29:43 ]
6 1m5s SELECT "item_list_line".id FROM "item_list_line" WHERE ("item_list_line"."product_id" in (267014)) ORDER BY "item_list_line"."id";[ Date: 2024-06-17 15:32:12 ]
7 54s390ms DELETE FROM stock_inventory_line WHERE id IN (3047091, 3046866, 3046867, 3046868, 3046869, 3046870, 3046871, 3046872, 3047052, 3046873, 3046874, 3046875, 3047019, 3046876, 3046877, 3047104, 3047037, 3047079, 3046878, 3047009, 3046985, 3047086, 3047031, 3046879, 3047048, 3047080, 3046880, 3046881, 3046882, 3046883, 3046884, 3046885, 3046886, 3046887, 3046888, 3047081, 3047011, 3046889, 3046890, 3046998, 3047044, 3047074, 3046891, 3046991, 3047003, 3046892, 3046893, 3047082, 3047065, 3046894, 3046895, 3046896, 3046897, 3046898, 3046899, 3047008, 3046900, 3047021, 3047012, 3047010, 3047028, 3047096, 3047103, 3046901, 3047055, 3047057, 3046902, 3047002, 3046903, 3047001, 3046904, 3047004, 3047092, 3047042, 3047085, 3047006, 3046905, 3046977, 3046906, 3046907, 3046908, 3046909, 3046997, 3047084, 3047097, 3046910, 3046911, 3047090, 3046973, 3047017, 3046912, 3046913, 3047018, 3047015, 3046914, 3047073, 3046915, 3046916, 3047033, 3046917, 3046918, 3047071, 3046919, 3046920, 3047026, 3047075, 3046999, 3046921, 3047047, 3047068, 3047013, 3047069, 3047022, 3047034, 3046992, 3047046, 3046922, 3046975, 3046988, 3046923, 3047058, 3047032, 3046924, 3046925, 3046926, 3046987, 3046986, 3046927, 3046995, 3047064, 3046928, 3046929, 3047106, 3047005, 3046930, 3047045, 3046931, 3047000, 3047024, 3047093, 3046932, 3046933, 3047025, 3047043, 3047083, 3046934, 3046935, 3046936, 3046976, 3046937, 3047105, 3047059, 3046938, 3046939, 3046940, 3046941, 3047099, 3047053, 3047072, 3046942, 3046943, 3047101, 3047020, 3047036, 3046990, 3046944, 3046945, 3046946, 3046947, 3047088, 3047039, 3046948, 3047067, 3046949, 3047078, 3046950, 3046951, 3047102, 3047089, 3046974, 3047062, 3047087, 3047051, 3047029, 3047023, 3046952, 3047049, 3046989, 3047014, 3046953, 3046982, 3046954, 3046996, 3047098, 3047076, 3046955, 3046956, 3047007, 3046981, 3047040, 3047056, 3046957, 3047077, 3047070, 3046958, 3047030, 3047100, 3047016, 3046959, 3047060, 3047027, 3046960, 3047050, 3046961, 3047054, 3046962, 3046980, 3047041, 3047038, 3046983, 3047063, 3046963, 3047094, 3047066, 3046993, 3046964, 3046984, 3046965, 3046978, 3047095, 3046966, 3046967, 3047035, 3046968, 3046969, 3046979, 3046970, 3047061, 3046994, 3046971, 3046972);[ Date: 2024-06-17 13:14:23 ]
8 49s686ms DELETE FROM account_move_line WHERE id IN (5094263, 5094264, 5094265, 5094266, 5094267, 5094268, 5094269, 5094270, 5094271, 5094272, 5094273, 5094274, 5094275, 5094276, 5094277, 5094278, 5094279, 5094280, 5094281, 5094282, 5094283, 5094284, 5094285, 5094286, 5094287, 5167275, 5167276);[ Date: 2024-06-17 23:38:53 ]
9 49s555ms DELETE FROM account_move_line WHERE id IN (5163584, 5163585, 5163586, 5163587, 5163588, 5163589, 5163590, 5163591, 5163592, 5163593, 5163594, 5163595, 5163596, 5163597, 5163598, 5163599, 5163600, 5163601, 5163602, 5163603, 5163604, 5163605, 5163606, 5163607, 5163608, 5173350, 5173351);[ Date: 2024-06-17 23:37:01 ]
10 34s82ms 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-06-17 09:00:55 ]
11 31s777ms DELETE FROM account_move_line WHERE id IN (4809818, 4809819, 4809820, 4809821, 4809822, 4809823, 4809824, 4809825, 4809826, 4809827, 4809828, 4809829, 4809830, 4809831, 4809832, 5173538, 5173539);[ Date: 2024-06-17 18:51:51 ]
12 30s32ms COPY public.website_visitor (id, name, access_token, active, website_id, partner_id, country_id, lang_id, timezone, visit_count, create_date, last_connection_datetime, create_uid, write_uid, write_date) TO stdout;[ Date: 2024-06-17 09:13:36 ]
13 28s289ms SELECT count(1) FROM "account_move_line" 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" != 'cancel') OR "account_move_line"."parent_state" IS NULL)) AND (("account_move_line"."parent_state" = 'posted') AND ((((unaccent ("account_move_line"."name"::text) ilike unaccent ('%55000000%')) OR (unaccent ("account_move_line"."ref"::text) ilike unaccent ('%55000000%'))) OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" LEFT JOIN "res_company" AS "account_account__company_id" ON ("account_account"."company_id" = "account_account__company_id"."id") WHERE ((unaccent ("account_account"."code"::text) ilike unaccent ('55000000%')) OR (unaccent ("account_account"."name"::text) ilike unaccent ('%55000000%'))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) OR FALSE))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1)));[ Date: 2024-06-17 19:44:47 ]
14 27s737ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-06-17 09:28:27 ]
15 25s921ms COPY public.queue_job (id, uuid, graph_uuid, user_id, company_id, name, model_name, method_name, records, dependencies, args, kwargs, func_string, state, priority, exc_name, exc_message, exc_info, result, date_created, date_started, date_enqueued, date_done, exec_time, date_cancelled, eta, retry, max_retries, channel_method_name, job_function_id, channel, identity_key, worker_pid, sale_id, picking_id, repair_id, message_main_attachment_id) TO stdout;[ Date: 2024-06-17 09:11:33 ]
16 24s691ms DELETE FROM account_move_line WHERE id IN (4857935, 4857936, 4857937, 4857938, 4857939, 4857940, 4857941, 4857942, 4857943, 4857944, 5171853, 5171854, 5171855);[ Date: 2024-06-17 17:26:08 ]
17 23s337ms SELECT min("account_move_line".id) AS id, count("account_move_line".id) AS "branch_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"."amount_currency") AS "amount_currency", "account_move_line"."branch_id" as "branch_id" FROM "account_move_line" LEFT JOIN "res_branch" AS "account_move_line__branch_id" ON ("account_move_line"."branch_id" = "account_move_line__branch_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" != 'cancel') OR "account_move_line"."parent_state" IS NULL)) AND (("account_move_line"."parent_state" = 'posted') AND ((((unaccent ("account_move_line"."name"::text) ilike unaccent ('%55000000%')) OR (unaccent ("account_move_line"."ref"::text) ilike unaccent ('%55000000%'))) OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" LEFT JOIN "res_company" AS "account_account__company_id" ON ("account_account"."company_id" = "account_account__company_id"."id") WHERE ((unaccent ("account_account"."code"::text) ilike unaccent ('55000000%')) OR (unaccent ("account_account"."name"::text) ilike unaccent ('%55000000%'))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) OR FALSE))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY "account_move_line"."branch_id", "account_move_line__branch_id"."id" ORDER BY "account_move_line__branch_id"."id" LIMIT 80;[ Date: 2024-06-17 19:50:51 ]
18 22s607ms DELETE FROM sale_order_line WHERE id IN (426899, 426903, 426905, 426908);[ Date: 2024-06-17 13:36:24 ]
19 22s574ms DELETE FROM account_move_line WHERE id IN (4802487, 4802488, 4802489, 4802490, 4802491, 4802492, 4802493, 4802494, 4802495, 4802496, 5166317, 5166318);[ Date: 2024-06-17 17:22:52 ]
20 22s205ms COPY public.sale_history_line (id, history_data_link, company_id, customer_id, product_id, invoice_id, product_name, name, product_uom_qty, price_unit, cost_price_unit, price_subtotal, cost_subtotal, gross_profit, rebate_amount, rebate_subtotal, invoice_item_no, inventory_product_categ, inventory_part_type, inventory_short_vendor_name, currency_id, core_sales_amount, core_cost_amount, labor_amount, serial_number, labor_flag, note, under_warranty, contact_reference, contact_name, selling_branch, vehicle_unit_no, vehicle_identification_number, vehicle_odometer, customer_reference_no, sales_obtain, sale_order_no, sale_order_date, invoice_number, invoice_date, user_id, exception_sale, create_uid, create_date, write_uid, write_date, product_pricelist_item_id, history_id, history_date, history_type, so_line_id, new_user_id, gross_profit_amount, is_shipping, move_options, manufacturing_usage, technician_id, inventory_vendor_id, product_type) TO stdout;[ Date: 2024-06-17 09:12:01 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 1h31m38s 15,416 333ms 1s213ms 356ms with updated_records as ( update product_warehouse_inventory set loc_check_qty = coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ? returning id, product_id, warehouse_id ) select product_id, id as warehouse_inventory_id, warehouse_id from updated_records;Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Jun 17 03 794 4m36s 348ms 09 22 7s672ms 348ms 10 122 42s472ms 348ms 11 940 5m27s 348ms 12 1,617 9m34s 355ms 13 1,970 11m40s 355ms 14 1,832 10m54s 357ms 15 1,407 8m25s 359ms 16 1,404 8m15s 352ms 17 1,295 7m36s 352ms 18 1,134 6m39s 352ms 19 2,118 13m3s 369ms 20 461 2m47s 363ms 21 216 1m15s 348ms 22 68 23s699ms 348ms 23 16 5s555ms 347ms -
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 12:40:21 Duration: 1s213ms
-
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 13:55:07 Duration: 1s123ms
-
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 19:54:43 Duration: 1s42ms
2 1h24m 15,417 295ms 1s550ms 326ms with pwi_data as ( select pwi.id as pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty as src_loc_check_qty, pwi.rep_loc_check_qty as ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id as replenish_wh_id from product_warehouse_inventory pwi join stock_warehouse sw on sw.branch_id = pwi.replenish_branch_id where pwi.replenish_branch_id is not null ), rep_loc_data as ( select pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, coalesce(rep_pwi.loc_check_qty, ?) as rep_loc_check_qty from pwi_data left join product_warehouse_inventory rep_pwi on rep_pwi.warehouse_id = pwi_data.replenish_wh_id and rep_pwi.product_id = pwi_data.product_id ) select rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty from rep_loc_data where rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Jun 17 03 794 4m6s 310ms 09 22 6s764ms 307ms 10 123 37s637ms 305ms 11 940 4m55s 314ms 12 1,617 8m40s 322ms 13 1,970 10m36s 323ms 14 1,832 10m3s 329ms 15 1,407 7m45s 330ms 16 1,404 7m28s 319ms 17 1,296 6m51s 317ms 18 1,134 5m59s 316ms 19 2,117 12m38s 358ms 20 461 2m35s 337ms 21 216 1m6s 307ms 22 68 21s109ms 310ms 23 16 4s909ms 306ms -
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 19:49:57 Duration: 1s550ms
-
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 19:06:12 Duration: 1s510ms
-
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 15:32:56 Duration: 1s354ms
3 46m1s 3,773 635ms 1s838ms 731ms 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 Jun 17 10 8 5s480ms 685ms 11 320 3m40s 689ms 12 553 6m39s 722ms 13 636 7m52s 743ms 14 451 5m33s 738ms 15 430 5m21s 747ms 16 347 4m3s 701ms 17 354 4m8s 702ms 18 174 2m2s 701ms 19 319 4m17s 806ms 20 166 2m6s 764ms 21 10 6s622ms 662ms 22 5 3s309ms 661ms -
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 ('%%dc23%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc23%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc23%'))) 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-06-17 19:06:11 Duration: 1s838ms
-
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 ('%%dc2%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc2%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc2%'))) 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-06-17 19:06:11 Duration: 1s671ms
-
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 ('%%dc234%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc234%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc234%'))) 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-06-17 19:06:12 Duration: 1s545ms
4 45m28s 15,928 154ms 3s393ms 171ms 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 #4
Day Hour Count Duration Avg duration Jun 17 03 903 2m28s 164ms 09 20 3s366ms 168ms 10 120 19s860ms 165ms 11 998 2m47s 168ms 12 1,752 5m 171ms 13 2,047 5m49s 170ms 14 1,861 5m21s 172ms 15 1,503 4m19s 172ms 16 1,419 4m 169ms 17 1,349 3m49s 170ms 18 1,161 3m16s 169ms 19 2,012 5m57s 177ms 20 482 1m23s 173ms 21 217 36s353ms 167ms 22 68 11s474ms 168ms 23 16 2s680ms 167ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(205.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 171661 AND warehouse_id = 40 AND company_id = 1;
Date: 2024-06-17 19:38:18 Duration: 3s393ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(19.0, 0) + COALESCE(10.0, 0) - COALESCE(0.0, 0) WHERE product_id = 195667 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-06-17 12:59:11 Duration: 1s783ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(21.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 257434 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-06-17 17:22:36 Duration: 1s277ms
5 29m30s 10,328 160ms 2s754ms 171ms 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 #5
Day Hour Count Duration Avg duration Jun 17 08 1 166ms 166ms 09 40 6s617ms 165ms 10 55 9s179ms 166ms 11 556 1m33s 167ms 12 961 2m43s 170ms 13 1,578 4m28s 170ms 14 955 2m43s 171ms 15 787 2m14s 171ms 16 634 1m49s 172ms 17 1,123 3m9s 169ms 18 1,473 4m15s 173ms 19 1,607 4m40s 174ms 20 394 1m7s 170ms 21 9 1s545ms 171ms 22 141 23s456ms 166ms 23 14 2s323ms 165ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 2.0 IS NOT NULL THEN GREATEST ((19.0 - 19.0) + (2.0 - 1.0), 0) ELSE GREATEST ((19.0 - 19.0), 0) END where product_id = 215519 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 18:24:24 Duration: 2s754ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 2.0 IS NOT NULL THEN GREATEST ((19.0 - 19.0) + (2.0 - 1.0), 0) ELSE GREATEST ((19.0 - 19.0), 0) END where product_id = 215519 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 18:24:27 Duration: 2s728ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((1.0 - 1.0) + (0.0 - 0.0), 0) ELSE GREATEST ((1.0 - 1.0), 0) END where product_id = 266964 and warehouse_id = 42 and company_id = 1;
Date: 2024-06-17 16:01:00 Duration: 2s90ms
6 22m37s 413 227ms 10s191ms 3s286ms select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...));Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Jun 17 18 20 1m6s 3s304ms 19 218 12m47s 3s519ms 20 175 8m44s 2s994ms -
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39));
Date: 2024-06-17 19:16:36 Duration: 10s191ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39));
Date: 2024-06-17 19:16:27 Duration: 9s443ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39));
Date: 2024-06-17 19:16:25 Duration: 9s202ms
7 21m20s 243 244ms 10s724ms 5s271ms select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Jun 17 18 9 40s381ms 4s486ms 19 130 12m34s 5s800ms 20 104 8m6s 4s678ms -
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id;
Date: 2024-06-17 19:50:23 Duration: 10s724ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id;
Date: 2024-06-17 19:16:48 Duration: 10s580ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id;
Date: 2024-06-17 19:50:25 Duration: 10s503ms
8 20m16s 2,689 413ms 1s12ms 452ms 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 #8
Day Hour Count Duration Avg duration Jun 17 03 2 829ms 414ms 04 1 423ms 423ms 08 7 2s907ms 415ms 09 22 9s142ms 415ms 10 43 17s912ms 416ms 11 187 1m19s 427ms 12 316 2m23s 454ms 13 422 3m11s 454ms 14 410 3m8s 460ms 15 334 2m32s 456ms 16 229 1m39s 435ms 17 214 1m33s 438ms 18 203 1m29s 440ms 19 179 1m33s 522ms 20 77 34s83ms 442ms 21 12 5s159ms 429ms 22 23 9s585ms 416ms 23 8 3s350ms 418ms -
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/%-876187e/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:44:45 Duration: 1s12ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-fb6cd24/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:05:53 Duration: 946ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-fb6cd24/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:52:01 Duration: 902ms
9 15m47s 4,110 120ms 2s263ms 230ms 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 #9
Day Hour Count Duration Avg duration Jun 17 03 127 22s133ms 174ms 09 1 120ms 120ms 10 9 1s125ms 125ms 11 235 38s210ms 162ms 12 590 5m38s 573ms 13 574 1m17s 135ms 14 570 1m28s 155ms 15 704 2m17s 194ms 16 207 27s599ms 133ms 17 212 28s321ms 133ms 18 153 23s484ms 153ms 19 489 1m50s 225ms 20 213 50s551ms 237ms 21 14 1s782ms 127ms 22 12 1s490ms 124ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (242987, 227414, 227381, 227304, 227274)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:51:36 Duration: 2s263ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (223909, 222329, 221644, 221166, 221164, 250585, 222469, 263806, 222051, 221178, 222496, 222947, 222655, 223294, 224059, 221847)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:51:36 Duration: 2s214ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (223909, 222329, 221644, 221166, 221164)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:59:11 Duration: 2s176ms
10 15m30s 4,821 170ms 571ms 192ms 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 Jun 17 03 275 50s139ms 182ms 10 58 10s250ms 176ms 11 263 48s375ms 183ms 12 583 1m51s 190ms 13 341 1m8s 199ms 14 1,215 3m58s 196ms 15 1,115 3m38s 195ms 16 246 48s139ms 195ms 17 107 20s422ms 190ms 18 254 47s451ms 186ms 19 105 22s100ms 210ms 20 36 7s634ms 212ms 21 196 34s848ms 177ms 22 27 4s759ms 176ms -
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 = 44489 and fd.product_id = 173969;
Date: 2024-06-17 12:43:14 Duration: 571ms
-
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 = 44467 and fd.product_id = 209243;
Date: 2024-06-17 15:46:41 Duration: 551ms
-
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 = 44774 and fd.product_id = 186650;
Date: 2024-06-17 14:28:59 Duration: 520ms
11 14m23s 5,021 156ms 384ms 172ms 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 Jun 17 03 30 4s978ms 165ms 09 23 3s799ms 165ms 10 24 3s968ms 165ms 11 159 26s620ms 167ms 12 569 1m37s 171ms 13 741 2m7s 171ms 14 756 2m11s 173ms 15 579 1m39s 171ms 16 403 1m9s 172ms 17 452 1m17s 170ms 18 415 1m10s 170ms 19 617 1m48s 175ms 20 172 30s201ms 175ms 21 8 1s315ms 164ms 22 61 10s152ms 166ms 23 12 1s987ms 165ms -
UPDATE product_warehouse_inventory SET qty_available = 4.0 WHERE product_id = 238852 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-06-17 14:42:00 Duration: 384ms
-
UPDATE product_warehouse_inventory SET qty_available = 11.0 WHERE product_id = 195900 AND warehouse_id = 45 AND company_id = 1;
Date: 2024-06-17 12:39:37 Duration: 359ms
-
UPDATE product_warehouse_inventory SET qty_available = 9.0 WHERE product_id = 178598 AND warehouse_id = 45 AND company_id = 1;
Date: 2024-06-17 15:22:41 Duration: 340ms
12 13m52s 5,761 135ms 633ms 144ms 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 #12
Day Hour Count Duration Avg duration Jun 17 00 240 33s632ms 140ms 01 240 33s135ms 138ms 02 240 33s147ms 138ms 03 240 33s710ms 140ms 04 240 33s220ms 138ms 05 240 33s205ms 138ms 06 240 33s168ms 138ms 07 240 33s258ms 138ms 08 240 33s243ms 138ms 09 240 33s430ms 139ms 10 240 33s400ms 139ms 11 240 34s575ms 144ms 12 240 36s641ms 152ms 13 240 36s266ms 151ms 14 240 37s718ms 157ms 15 240 36s836ms 153ms 16 241 35s618ms 147ms 17 240 35s548ms 148ms 18 240 35s429ms 147ms 19 240 40s914ms 170ms 20 240 36s82ms 150ms 21 240 33s358ms 138ms 22 240 33s421ms 139ms 23 240 33s374ms 139ms -
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_available_extensions', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_operator', 'pg_catalog.pg_am', 'pg_catalog.pg_trigger', 'pg_catalog.pg_conversion', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_subscription', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_opclass', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_user', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_extension', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_settings', 'pg_catalog.pg_policy', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_description', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_range', 'pg_catalog.pg_locks', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_cast', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_constraint', 'pg_catalog.pg_policies', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_type', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_class', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_proc', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_publication', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_attribute', 'pg_catalog.pg_database', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_depend', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_amproc', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_indexes', 'pg_catalog.pg_language', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_tables', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_user_functions', 'information_schema.sequences', 'information_schema.sql_implementation_info', 'information_schema.view_table_usage', 'information_schema.character_sets', 'information_schema.routine_column_usage', 'information_schema.sql_sizing', 'information_schema.usage_privileges', 'information_schema.foreign_server_options', 'information_schema.collations', 'information_schema.table_privileges', 'information_schema.views', 'information_schema.user_mapping_options', 'information_schema.column_domain_usage', 'information_schema.routines', 'information_schema.column_udt_usage', 'information_schema.routine_routine_usage', 'information_schema.table_constraints', 'information_schema.routine_sequence_usage', 'information_schema.role_table_grants', 'information_schema.user_mappings', 'information_schema.data_type_privileges', 'information_schema.element_types', 'information_schema.view_column_usage', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_servers', 'information_schema.attributes', 'information_schema.applicable_roles', 'information_schema.column_privileges', 'information_schema.role_column_grants', 'information_schema.constraint_table_usage', 'information_schema.domain_udt_usage', 'information_schema.user_defined_types', 'information_schema.view_routine_usage', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.foreign_tables', 'information_schema.parameters', 'information_schema.tables', 'information_schema.constraint_column_usage', 'information_schema.schemata', 'information_schema.triggers', 'information_schema.role_udt_grants', 'information_schema.administrable_role_authorizations', 'information_schema.columns', 'information_schema.role_routine_grants', 'information_schema.sql_features', 'information_schema.column_options', 'information_schema.domains', 'information_schema.key_column_usage', 'information_schema.referential_constraints', 'information_schema.udt_privileges', 'information_schema.role_usage_grants', 'information_schema.check_constraints', 'information_schema.collation_character_set_applicability', 'information_schema.column_column_usage', 'information_schema.foreign_table_options', 'information_schema.triggered_update_columns', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraint_routine_usage', 'information_schema.domain_constraints', 'information_schema.routine_table_usage', 'information_schema.foreign_data_wrappers', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-06-17 19:54:14 Duration: 633ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END + 0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_settings', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_cast', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_depend', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_opclass', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_transform', 'pg_catalog.pg_locks', 'pg_catalog.pg_roles', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_database', 'pg_catalog.pg_group', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_range', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_index', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_type', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_description', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stats', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_class', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_collation', 'pg_catalog.pg_indexes', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_operator', 'pg_catalog.pg_enum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_inherits', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_extension', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_views', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_publication', 'pg_catalog.pg_attribute', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_sequences', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_sequence', 'pg_catalog.pg_subscription', 'pg_catalog.pg_language', 'pg_catalog.pg_trigger', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_policies', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_user', 'pg_catalog.pg_replication_slots', 'information_schema.udt_privileges', 'information_schema.foreign_servers', 'information_schema.role_routine_grants', 'information_schema.triggered_update_columns', 'information_schema.element_types', 'information_schema.administrable_role_authorizations', 'information_schema.routine_sequence_usage', 'information_schema.schemata', 'information_schema.view_table_usage', 'information_schema.views', 'information_schema.check_constraint_routine_usage', 'information_schema.routines', 'information_schema.character_sets', 'information_schema.table_constraints', 'information_schema.referential_constraints', 'information_schema.usage_privileges', 'information_schema.foreign_server_options', 'information_schema.foreign_tables', 'information_schema.role_column_grants', 'information_schema.constraint_table_usage', 'information_schema.parameters', 'information_schema.foreign_data_wrappers', 'information_schema.view_routine_usage', 'information_schema.check_constraints', 'information_schema.constraint_column_usage', 'information_schema.routine_privileges', 'information_schema.role_usage_grants', 'information_schema.routine_column_usage', 'information_schema.table_privileges', 'information_schema.user_defined_types', 'information_schema.column_options', 'information_schema.applicable_roles', 'information_schema.column_privileges', 'information_schema.sql_features', 'information_schema.enabled_roles', 'information_schema.key_column_usage', 'information_schema.domains', 'information_schema.triggers', 'information_schema.information_schema_catalog_name', 'information_schema.columns', 'information_schema.user_mappings', 'information_schema.role_udt_grants', 'information_schema.collations', 'information_schema.routine_table_usage', 'information_schema.domain_constraints', 'information_schema.domain_udt_usage', 'information_schema.sql_implementation_info', 'information_schema.tables', 'information_schema.data_type_privileges', 'information_schema.foreign_table_options', 'information_schema.attributes', 'information_schema.column_domain_usage', 'information_schema.role_table_grants', 'information_schema.view_column_usage', 'information_schema.user_mapping_options', 'information_schema.routine_routine_usage', 'information_schema.sql_sizing', 'information_schema.foreign_data_wrapper_options', 'information_schema.column_column_usage', 'information_schema.sequences', 'information_schema.collation_character_set_applicability', 'information_schema.column_udt_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-06-17 20:23:59 Duration: 441ms
-
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_available_extension_versions', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_views', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_transform', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_policies', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_index', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_user', 'pg_catalog.pg_type', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_rules', 'pg_catalog.pg_language', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_am', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_matviews', 'pg_catalog.pg_subscription', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_sequence', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_cast', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_indexes', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_sequences', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_class', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_depend', 'pg_catalog.pg_range', 'pg_catalog.pg_description', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_amop', 'pg_catalog.pg_trigger', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_roles', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_enum', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_group', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_conversion', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_attribute', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_namespace', 'pg_catalog.pg_database', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_extension', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_opclass', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_all_indexes', 'information_schema.sql_implementation_info', 'information_schema.data_type_privileges', 'information_schema.element_types', 'information_schema.role_column_grants', 'information_schema.constraint_column_usage', 'information_schema.enabled_roles', 'information_schema.routine_routine_usage', 'information_schema.table_constraints', 'information_schema.view_column_usage', 'information_schema.check_constraint_routine_usage', 'information_schema.referential_constraints', 'information_schema.routine_sequence_usage', 'information_schema.routine_table_usage', 'information_schema.information_schema_catalog_name', 'information_schema.view_table_usage', 'information_schema.foreign_table_options', 'information_schema.foreign_tables', 'information_schema.attributes', 'information_schema.applicable_roles', 'information_schema.domain_constraints', 'information_schema.role_routine_grants', 'information_schema.view_routine_usage', 'information_schema.collation_character_set_applicability', 'information_schema.schemata', 'information_schema.views', 'information_schema.foreign_data_wrappers', 'information_schema.collations', 'information_schema.user_mapping_options', 'information_schema.routine_column_usage', 'information_schema.domain_udt_usage', 'information_schema.routine_privileges', 'information_schema.column_options', 'information_schema.administrable_role_authorizations', 'information_schema.column_domain_usage', 'information_schema.foreign_server_options', 'information_schema.character_sets', 'information_schema.column_udt_usage', 'information_schema.triggered_update_columns', 'information_schema.check_constraints', 'information_schema.routines', 'information_schema.domains', 'information_schema.role_udt_grants', 'information_schema.column_column_usage', 'information_schema.columns', 'information_schema.constraint_table_usage', 'information_schema.parameters', 'information_schema.triggers', 'information_schema.usage_privileges', 'information_schema.foreign_servers', 'information_schema.sql_features', 'information_schema.role_table_grants', 'information_schema.tables', 'information_schema.user_mappings', 'information_schema.sequences', 'information_schema.sql_sizing', 'information_schema.user_defined_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.role_usage_grants', 'information_schema.column_privileges', 'information_schema.key_column_usage', 'information_schema.table_privileges', 'information_schema.udt_privileges', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-06-17 15:24:58 Duration: 344ms
13 13m3s 873 827ms 1s629ms 897ms 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 #13
Day Hour Count Duration Avg duration Jun 17 10 3 2s536ms 845ms 11 17 14s956ms 879ms 12 123 1m49s 893ms 13 99 1m29s 901ms 14 138 2m5s 910ms 15 98 1m27s 894ms 16 84 1m13s 872ms 17 99 1m26s 873ms 18 80 1m9s 872ms 19 104 1m37s 940ms 20 27 25s484ms 943ms 21 1 924ms 924ms -
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 ('%84-4005-3%')) 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 ('%84-4005-3%'))) 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 ('%84-4005-3%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%84-4005-3%')))))) 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-06-17 20:43:27 Duration: 1s629ms
-
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 ('%CAF24017%')) 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 ('%CAF24017%'))) 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 ('%CAF24017%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%CAF24017%')))))) 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-06-17 20:32:10 Duration: 1s607ms
-
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 ('%08-137500%')) 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 ('%08-137500%'))) 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 ('%08-137500%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%08-137500%')))))) 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-06-17 19:11:13 Duration: 1s550ms
14 12m49s 1,299 120ms 2s396ms 592ms select "forecasted_data".id from "forecasted_data" where ("forecasted_data"."item_supply_plan_id" in (...)) order by "forecasted_data"."id";Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Jun 17 03 81 19s313ms 238ms 11 93 22s436ms 241ms 12 236 6m47s 1s725ms 13 26 5s31ms 193ms 14 145 37s452ms 258ms 15 357 1m54s 321ms 17 5 842ms 168ms 18 19 7s963ms 419ms 19 218 1m40s 463ms 20 119 53s525ms 449ms -
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (44669, 44044)) ORDER BY "forecasted_data"."id";
Date: 2024-06-17 12:51:36 Duration: 2s396ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (44795, 43532)) ORDER BY "forecasted_data"."id";
Date: 2024-06-17 12:51:36 Duration: 2s393ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (44396, 43515)) ORDER BY "forecasted_data"."id";
Date: 2024-06-17 12:51:36 Duration: 2s382ms
15 11m35s 926 650ms 1s658ms 751ms 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 #15
Day Hour Count Duration Avg duration Jun 17 11 56 38s300ms 683ms 12 59 43s935ms 744ms 13 59 45s52ms 763ms 14 57 41s984ms 736ms 15 136 1m40s 736ms 16 80 57s410ms 717ms 17 116 1m24s 730ms 18 165 1m59s 723ms 19 155 2m15s 875ms 20 43 29s329ms 682ms -
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 ('%%081%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%08-1%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%08-1%'))) 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-06-17 18:19:00 Duration: 1s658ms
-
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 ('%%1r0749%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%1r0749%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%1r0749%'))) 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-06-17 19:06:12 Duration: 1s604ms
-
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 ('%%1r07%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%1r07%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%1r07%'))) 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-06-17 19:06:11 Duration: 1s570ms
16 10m52s 124 1s798ms 1m6s 5s260ms delete from account_move_line where id in (...);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Jun 17 11 1 1s869ms 1s869ms 12 10 39s661ms 3s966ms 13 4 22s600ms 5s650ms 14 4 24s659ms 6s164ms 15 12 52s785ms 4s398ms 16 8 1m21s 10s201ms 17 11 1m4s 5s831ms 18 4 39s291ms 9s822ms 19 4 14s738ms 3s684ms 23 66 5m10s 4s710ms -
DELETE FROM account_move_line WHERE id IN (4871316, 4871317, 4871318, 4871319, 4871320, 4871321, 4871322, 4871323, 4871324, 4871325, 4871326, 4871327, 4871328, 4871329, 4871330, 4871331, 4871332, 4871333, 4871334, 4871335, 4871336, 4871337, 4871338, 4871339, 4871340, 4871341, 4871342, 4871343, 4871344, 4871345, 4871346, 4871347, 4871348, 4871349, 5170858, 5170859);
Date: 2024-06-17 16:29:43 Duration: 1m6s
-
DELETE FROM account_move_line WHERE id IN (5094263, 5094264, 5094265, 5094266, 5094267, 5094268, 5094269, 5094270, 5094271, 5094272, 5094273, 5094274, 5094275, 5094276, 5094277, 5094278, 5094279, 5094280, 5094281, 5094282, 5094283, 5094284, 5094285, 5094286, 5094287, 5167275, 5167276);
Date: 2024-06-17 23:38:53 Duration: 49s686ms
-
DELETE FROM account_move_line WHERE id IN (5163584, 5163585, 5163586, 5163587, 5163588, 5163589, 5163590, 5163591, 5163592, 5163593, 5163594, 5163595, 5163596, 5163597, 5163598, 5163599, 5163600, 5163601, 5163602, 5163603, 5163604, 5163605, 5163606, 5163607, 5163608, 5173350, 5173351);
Date: 2024-06-17 23:37:01 Duration: 49s555ms
17 8m19s 2,942 152ms 462ms 169ms 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 Jun 17 03 48 7s630ms 158ms 09 11 1s821ms 165ms 10 17 2s759ms 162ms 11 82 13s695ms 167ms 12 238 40s83ms 168ms 13 529 1m30s 170ms 14 417 1m11s 171ms 15 287 49s434ms 172ms 16 223 38s272ms 171ms 17 265 44s308ms 167ms 18 224 37s250ms 166ms 19 455 1m18s 172ms 20 84 14s231ms 169ms 21 35 5s637ms 161ms 22 23 3s713ms 161ms 23 4 657ms 164ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 179976 AND warehouse_id = 38;
Date: 2024-06-17 13:15:28 Duration: 462ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 171437 AND warehouse_id = 43;
Date: 2024-06-17 13:05:16 Duration: 360ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223332 AND warehouse_id = 37;
Date: 2024-06-17 15:33:50 Duration: 337ms
18 8m2s 2,820 161ms 380ms 171ms 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 Jun 17 03 212 35s314ms 166ms 09 4 664ms 166ms 10 21 3s504ms 166ms 11 158 26s788ms 169ms 12 475 1m20s 170ms 13 504 1m25s 170ms 14 303 52s364ms 172ms 15 284 49s376ms 173ms 16 170 28s911ms 170ms 17 178 30s151ms 169ms 18 173 29s306ms 169ms 19 293 51s529ms 175ms 20 33 5s735ms 173ms 22 10 1s676ms 167ms 23 2 334ms 167ms -
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((19.0), 0) + COALESCE((3.0), 0) WHERE product_id = 171548 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-06-17 15:33:37 Duration: 380ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((123.0), 0) + COALESCE((16.0), 0) WHERE product_id = 193109 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-06-17 14:08:15 Duration: 293ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((6.0), 0) + COALESCE((2.0), 0) WHERE product_id = 203275 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-06-17 16:01:23 Duration: 248ms
19 7m50s 2,771 151ms 1s819ms 169ms 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 Jun 17 03 128 20s443ms 159ms 09 4 651ms 162ms 10 18 2s888ms 160ms 11 224 37s143ms 165ms 12 352 1m3s 179ms 13 270 45s223ms 167ms 14 269 46s241ms 171ms 15 296 50s46ms 169ms 16 274 45s623ms 166ms 17 238 39s923ms 167ms 18 213 35s888ms 168ms 19 354 1m 171ms 20 93 16s77ms 172ms 21 24 3s952ms 164ms 22 10 1s648ms 164ms 23 4 650ms 162ms -
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 211758 AND warehouse_id = 35;
Date: 2024-06-17 12:51:37 Duration: 1s819ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 211762 AND warehouse_id = 35;
Date: 2024-06-17 12:51:35 Duration: 1s679ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 172593 AND warehouse_id = 35;
Date: 2024-06-17 12:01:25 Duration: 451ms
20 5m56s 2,596 120ms 312ms 137ms 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 Jun 17 11 107 14s155ms 132ms 12 506 1m8s 135ms 13 317 42s551ms 134ms 14 279 37s298ms 133ms 15 306 42s371ms 138ms 16 304 40s511ms 133ms 17 124 16s281ms 131ms 18 136 18s365ms 135ms 19 488 1m12s 148ms 20 29 3s711ms 127ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 35) AND ("product_warehouse_inventory"."product_id" = 207945)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-06-17 12:01:25 Duration: 312ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 35) AND ("product_warehouse_inventory"."product_id" = 197865)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-06-17 12:01:25 Duration: 309ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 45) AND ("product_warehouse_inventory"."product_id" = 263046)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-06-17 19:16:33 Duration: 274ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 15,928 45m28s 154ms 3s393ms 171ms 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 #1
Day Hour Count Duration Avg duration Jun 17 03 903 2m28s 164ms 09 20 3s366ms 168ms 10 120 19s860ms 165ms 11 998 2m47s 168ms 12 1,752 5m 171ms 13 2,047 5m49s 170ms 14 1,861 5m21s 172ms 15 1,503 4m19s 172ms 16 1,419 4m 169ms 17 1,349 3m49s 170ms 18 1,161 3m16s 169ms 19 2,012 5m57s 177ms 20 482 1m23s 173ms 21 217 36s353ms 167ms 22 68 11s474ms 168ms 23 16 2s680ms 167ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(205.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 171661 AND warehouse_id = 40 AND company_id = 1;
Date: 2024-06-17 19:38:18 Duration: 3s393ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(19.0, 0) + COALESCE(10.0, 0) - COALESCE(0.0, 0) WHERE product_id = 195667 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-06-17 12:59:11 Duration: 1s783ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(21.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 257434 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-06-17 17:22:36 Duration: 1s277ms
2 15,417 1h24m 295ms 1s550ms 326ms with pwi_data as ( select pwi.id as pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty as src_loc_check_qty, pwi.rep_loc_check_qty as ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id as replenish_wh_id from product_warehouse_inventory pwi join stock_warehouse sw on sw.branch_id = pwi.replenish_branch_id where pwi.replenish_branch_id is not null ), rep_loc_data as ( select pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, coalesce(rep_pwi.loc_check_qty, ?) as rep_loc_check_qty from pwi_data left join product_warehouse_inventory rep_pwi on rep_pwi.warehouse_id = pwi_data.replenish_wh_id and rep_pwi.product_id = pwi_data.product_id ) select rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty from rep_loc_data where rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Jun 17 03 794 4m6s 310ms 09 22 6s764ms 307ms 10 123 37s637ms 305ms 11 940 4m55s 314ms 12 1,617 8m40s 322ms 13 1,970 10m36s 323ms 14 1,832 10m3s 329ms 15 1,407 7m45s 330ms 16 1,404 7m28s 319ms 17 1,296 6m51s 317ms 18 1,134 5m59s 316ms 19 2,117 12m38s 358ms 20 461 2m35s 337ms 21 216 1m6s 307ms 22 68 21s109ms 310ms 23 16 4s909ms 306ms -
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 19:49:57 Duration: 1s550ms
-
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 19:06:12 Duration: 1s510ms
-
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 15:32:56 Duration: 1s354ms
3 15,416 1h31m38s 333ms 1s213ms 356ms with updated_records as ( update product_warehouse_inventory set loc_check_qty = coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ? returning id, product_id, warehouse_id ) select product_id, id as warehouse_inventory_id, warehouse_id from updated_records;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Jun 17 03 794 4m36s 348ms 09 22 7s672ms 348ms 10 122 42s472ms 348ms 11 940 5m27s 348ms 12 1,617 9m34s 355ms 13 1,970 11m40s 355ms 14 1,832 10m54s 357ms 15 1,407 8m25s 359ms 16 1,404 8m15s 352ms 17 1,295 7m36s 352ms 18 1,134 6m39s 352ms 19 2,118 13m3s 369ms 20 461 2m47s 363ms 21 216 1m15s 348ms 22 68 23s699ms 348ms 23 16 5s555ms 347ms -
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 12:40:21 Duration: 1s213ms
-
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 13:55:07 Duration: 1s123ms
-
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 19:54:43 Duration: 1s42ms
4 10,328 29m30s 160ms 2s754ms 171ms 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 #4
Day Hour Count Duration Avg duration Jun 17 08 1 166ms 166ms 09 40 6s617ms 165ms 10 55 9s179ms 166ms 11 556 1m33s 167ms 12 961 2m43s 170ms 13 1,578 4m28s 170ms 14 955 2m43s 171ms 15 787 2m14s 171ms 16 634 1m49s 172ms 17 1,123 3m9s 169ms 18 1,473 4m15s 173ms 19 1,607 4m40s 174ms 20 394 1m7s 170ms 21 9 1s545ms 171ms 22 141 23s456ms 166ms 23 14 2s323ms 165ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 2.0 IS NOT NULL THEN GREATEST ((19.0 - 19.0) + (2.0 - 1.0), 0) ELSE GREATEST ((19.0 - 19.0), 0) END where product_id = 215519 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 18:24:24 Duration: 2s754ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 2.0 IS NOT NULL THEN GREATEST ((19.0 - 19.0) + (2.0 - 1.0), 0) ELSE GREATEST ((19.0 - 19.0), 0) END where product_id = 215519 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 18:24:27 Duration: 2s728ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((1.0 - 1.0) + (0.0 - 0.0), 0) ELSE GREATEST ((1.0 - 1.0), 0) END where product_id = 266964 and warehouse_id = 42 and company_id = 1;
Date: 2024-06-17 16:01:00 Duration: 2s90ms
5 5,761 13m52s 135ms 633ms 144ms 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 #5
Day Hour Count Duration Avg duration Jun 17 00 240 33s632ms 140ms 01 240 33s135ms 138ms 02 240 33s147ms 138ms 03 240 33s710ms 140ms 04 240 33s220ms 138ms 05 240 33s205ms 138ms 06 240 33s168ms 138ms 07 240 33s258ms 138ms 08 240 33s243ms 138ms 09 240 33s430ms 139ms 10 240 33s400ms 139ms 11 240 34s575ms 144ms 12 240 36s641ms 152ms 13 240 36s266ms 151ms 14 240 37s718ms 157ms 15 240 36s836ms 153ms 16 241 35s618ms 147ms 17 240 35s548ms 148ms 18 240 35s429ms 147ms 19 240 40s914ms 170ms 20 240 36s82ms 150ms 21 240 33s358ms 138ms 22 240 33s421ms 139ms 23 240 33s374ms 139ms -
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_available_extensions', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_operator', 'pg_catalog.pg_am', 'pg_catalog.pg_trigger', 'pg_catalog.pg_conversion', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_subscription', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_opclass', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_user', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_extension', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_settings', 'pg_catalog.pg_policy', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_description', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_range', 'pg_catalog.pg_locks', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_cast', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_group', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_constraint', 'pg_catalog.pg_policies', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_type', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_class', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_proc', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_publication', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_attribute', 'pg_catalog.pg_database', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_depend', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_amproc', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_indexes', 'pg_catalog.pg_language', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_tables', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_user_functions', 'information_schema.sequences', 'information_schema.sql_implementation_info', 'information_schema.view_table_usage', 'information_schema.character_sets', 'information_schema.routine_column_usage', 'information_schema.sql_sizing', 'information_schema.usage_privileges', 'information_schema.foreign_server_options', 'information_schema.collations', 'information_schema.table_privileges', 'information_schema.views', 'information_schema.user_mapping_options', 'information_schema.column_domain_usage', 'information_schema.routines', 'information_schema.column_udt_usage', 'information_schema.routine_routine_usage', 'information_schema.table_constraints', 'information_schema.routine_sequence_usage', 'information_schema.role_table_grants', 'information_schema.user_mappings', 'information_schema.data_type_privileges', 'information_schema.element_types', 'information_schema.view_column_usage', 'information_schema.foreign_data_wrapper_options', 'information_schema.foreign_servers', 'information_schema.attributes', 'information_schema.applicable_roles', 'information_schema.column_privileges', 'information_schema.role_column_grants', 'information_schema.constraint_table_usage', 'information_schema.domain_udt_usage', 'information_schema.user_defined_types', 'information_schema.view_routine_usage', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.foreign_tables', 'information_schema.parameters', 'information_schema.tables', 'information_schema.constraint_column_usage', 'information_schema.schemata', 'information_schema.triggers', 'information_schema.role_udt_grants', 'information_schema.administrable_role_authorizations', 'information_schema.columns', 'information_schema.role_routine_grants', 'information_schema.sql_features', 'information_schema.column_options', 'information_schema.domains', 'information_schema.key_column_usage', 'information_schema.referential_constraints', 'information_schema.udt_privileges', 'information_schema.role_usage_grants', 'information_schema.check_constraints', 'information_schema.collation_character_set_applicability', 'information_schema.column_column_usage', 'information_schema.foreign_table_options', 'information_schema.triggered_update_columns', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraint_routine_usage', 'information_schema.domain_constraints', 'information_schema.routine_table_usage', 'information_schema.foreign_data_wrappers', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-06-17 19:54:14 Duration: 633ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END + 0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_settings', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_cast', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_depend', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_opclass', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_transform', 'pg_catalog.pg_locks', 'pg_catalog.pg_roles', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_database', 'pg_catalog.pg_group', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_range', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_index', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_type', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_description', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stats', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_class', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_collation', 'pg_catalog.pg_indexes', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_operator', 'pg_catalog.pg_enum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_am', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_inherits', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_extension', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_views', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_publication', 'pg_catalog.pg_attribute', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_sequences', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_sequence', 'pg_catalog.pg_subscription', 'pg_catalog.pg_language', 'pg_catalog.pg_trigger', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_policies', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_user', 'pg_catalog.pg_replication_slots', 'information_schema.udt_privileges', 'information_schema.foreign_servers', 'information_schema.role_routine_grants', 'information_schema.triggered_update_columns', 'information_schema.element_types', 'information_schema.administrable_role_authorizations', 'information_schema.routine_sequence_usage', 'information_schema.schemata', 'information_schema.view_table_usage', 'information_schema.views', 'information_schema.check_constraint_routine_usage', 'information_schema.routines', 'information_schema.character_sets', 'information_schema.table_constraints', 'information_schema.referential_constraints', 'information_schema.usage_privileges', 'information_schema.foreign_server_options', 'information_schema.foreign_tables', 'information_schema.role_column_grants', 'information_schema.constraint_table_usage', 'information_schema.parameters', 'information_schema.foreign_data_wrappers', 'information_schema.view_routine_usage', 'information_schema.check_constraints', 'information_schema.constraint_column_usage', 'information_schema.routine_privileges', 'information_schema.role_usage_grants', 'information_schema.routine_column_usage', 'information_schema.table_privileges', 'information_schema.user_defined_types', 'information_schema.column_options', 'information_schema.applicable_roles', 'information_schema.column_privileges', 'information_schema.sql_features', 'information_schema.enabled_roles', 'information_schema.key_column_usage', 'information_schema.domains', 'information_schema.triggers', 'information_schema.information_schema_catalog_name', 'information_schema.columns', 'information_schema.user_mappings', 'information_schema.role_udt_grants', 'information_schema.collations', 'information_schema.routine_table_usage', 'information_schema.domain_constraints', 'information_schema.domain_udt_usage', 'information_schema.sql_implementation_info', 'information_schema.tables', 'information_schema.data_type_privileges', 'information_schema.foreign_table_options', 'information_schema.attributes', 'information_schema.column_domain_usage', 'information_schema.role_table_grants', 'information_schema.view_column_usage', 'information_schema.user_mapping_options', 'information_schema.routine_routine_usage', 'information_schema.sql_sizing', 'information_schema.foreign_data_wrapper_options', 'information_schema.column_column_usage', 'information_schema.sequences', 'information_schema.collation_character_set_applicability', 'information_schema.column_udt_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-06-17 20:23:59 Duration: 441ms
-
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_available_extension_versions', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_views', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_transform', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_policies', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_index', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_user', 'pg_catalog.pg_type', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_rules', 'pg_catalog.pg_language', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_am', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_matviews', 'pg_catalog.pg_subscription', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_sequence', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_cast', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_indexes', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_sequences', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_class', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_depend', 'pg_catalog.pg_range', 'pg_catalog.pg_description', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_amop', 'pg_catalog.pg_trigger', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_roles', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_enum', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_group', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_conversion', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_attribute', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_namespace', 'pg_catalog.pg_database', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_extension', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_opclass', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_all_indexes', 'information_schema.sql_implementation_info', 'information_schema.data_type_privileges', 'information_schema.element_types', 'information_schema.role_column_grants', 'information_schema.constraint_column_usage', 'information_schema.enabled_roles', 'information_schema.routine_routine_usage', 'information_schema.table_constraints', 'information_schema.view_column_usage', 'information_schema.check_constraint_routine_usage', 'information_schema.referential_constraints', 'information_schema.routine_sequence_usage', 'information_schema.routine_table_usage', 'information_schema.information_schema_catalog_name', 'information_schema.view_table_usage', 'information_schema.foreign_table_options', 'information_schema.foreign_tables', 'information_schema.attributes', 'information_schema.applicable_roles', 'information_schema.domain_constraints', 'information_schema.role_routine_grants', 'information_schema.view_routine_usage', 'information_schema.collation_character_set_applicability', 'information_schema.schemata', 'information_schema.views', 'information_schema.foreign_data_wrappers', 'information_schema.collations', 'information_schema.user_mapping_options', 'information_schema.routine_column_usage', 'information_schema.domain_udt_usage', 'information_schema.routine_privileges', 'information_schema.column_options', 'information_schema.administrable_role_authorizations', 'information_schema.column_domain_usage', 'information_schema.foreign_server_options', 'information_schema.character_sets', 'information_schema.column_udt_usage', 'information_schema.triggered_update_columns', 'information_schema.check_constraints', 'information_schema.routines', 'information_schema.domains', 'information_schema.role_udt_grants', 'information_schema.column_column_usage', 'information_schema.columns', 'information_schema.constraint_table_usage', 'information_schema.parameters', 'information_schema.triggers', 'information_schema.usage_privileges', 'information_schema.foreign_servers', 'information_schema.sql_features', 'information_schema.role_table_grants', 'information_schema.tables', 'information_schema.user_mappings', 'information_schema.sequences', 'information_schema.sql_sizing', 'information_schema.user_defined_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.role_usage_grants', 'information_schema.column_privileges', 'information_schema.key_column_usage', 'information_schema.table_privileges', 'information_schema.udt_privileges', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-06-17 15:24:58 Duration: 344ms
6 5,021 14m23s 156ms 384ms 172ms update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Jun 17 03 30 4s978ms 165ms 09 23 3s799ms 165ms 10 24 3s968ms 165ms 11 159 26s620ms 167ms 12 569 1m37s 171ms 13 741 2m7s 171ms 14 756 2m11s 173ms 15 579 1m39s 171ms 16 403 1m9s 172ms 17 452 1m17s 170ms 18 415 1m10s 170ms 19 617 1m48s 175ms 20 172 30s201ms 175ms 21 8 1s315ms 164ms 22 61 10s152ms 166ms 23 12 1s987ms 165ms -
UPDATE product_warehouse_inventory SET qty_available = 4.0 WHERE product_id = 238852 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-06-17 14:42:00 Duration: 384ms
-
UPDATE product_warehouse_inventory SET qty_available = 11.0 WHERE product_id = 195900 AND warehouse_id = 45 AND company_id = 1;
Date: 2024-06-17 12:39:37 Duration: 359ms
-
UPDATE product_warehouse_inventory SET qty_available = 9.0 WHERE product_id = 178598 AND warehouse_id = 45 AND company_id = 1;
Date: 2024-06-17 15:22:41 Duration: 340ms
7 4,821 15m30s 170ms 571ms 192ms 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 #7
Day Hour Count Duration Avg duration Jun 17 03 275 50s139ms 182ms 10 58 10s250ms 176ms 11 263 48s375ms 183ms 12 583 1m51s 190ms 13 341 1m8s 199ms 14 1,215 3m58s 196ms 15 1,115 3m38s 195ms 16 246 48s139ms 195ms 17 107 20s422ms 190ms 18 254 47s451ms 186ms 19 105 22s100ms 210ms 20 36 7s634ms 212ms 21 196 34s848ms 177ms 22 27 4s759ms 176ms -
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 = 44489 and fd.product_id = 173969;
Date: 2024-06-17 12:43:14 Duration: 571ms
-
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 = 44467 and fd.product_id = 209243;
Date: 2024-06-17 15:46:41 Duration: 551ms
-
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 = 44774 and fd.product_id = 186650;
Date: 2024-06-17 14:28:59 Duration: 520ms
8 4,110 15m47s 120ms 2s263ms 230ms 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 #8
Day Hour Count Duration Avg duration Jun 17 03 127 22s133ms 174ms 09 1 120ms 120ms 10 9 1s125ms 125ms 11 235 38s210ms 162ms 12 590 5m38s 573ms 13 574 1m17s 135ms 14 570 1m28s 155ms 15 704 2m17s 194ms 16 207 27s599ms 133ms 17 212 28s321ms 133ms 18 153 23s484ms 153ms 19 489 1m50s 225ms 20 213 50s551ms 237ms 21 14 1s782ms 127ms 22 12 1s490ms 124ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (242987, 227414, 227381, 227304, 227274)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:51:36 Duration: 2s263ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (223909, 222329, 221644, 221166, 221164, 250585, 222469, 263806, 222051, 221178, 222496, 222947, 222655, 223294, 224059, 221847)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:51:36 Duration: 2s214ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (223909, 222329, 221644, 221166, 221164)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:59:11 Duration: 2s176ms
9 3,773 46m1s 635ms 1s838ms 731ms 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 #9
Day Hour Count Duration Avg duration Jun 17 10 8 5s480ms 685ms 11 320 3m40s 689ms 12 553 6m39s 722ms 13 636 7m52s 743ms 14 451 5m33s 738ms 15 430 5m21s 747ms 16 347 4m3s 701ms 17 354 4m8s 702ms 18 174 2m2s 701ms 19 319 4m17s 806ms 20 166 2m6s 764ms 21 10 6s622ms 662ms 22 5 3s309ms 661ms -
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 ('%%dc23%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc23%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc23%'))) 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-06-17 19:06:11 Duration: 1s838ms
-
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 ('%%dc2%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc2%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc2%'))) 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-06-17 19:06:11 Duration: 1s671ms
-
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 ('%%dc234%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc234%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc234%'))) 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-06-17 19:06:12 Duration: 1s545ms
10 2,942 8m19s 152ms 462ms 169ms update product_warehouse_inventory set qty_reserve = ? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Jun 17 03 48 7s630ms 158ms 09 11 1s821ms 165ms 10 17 2s759ms 162ms 11 82 13s695ms 167ms 12 238 40s83ms 168ms 13 529 1m30s 170ms 14 417 1m11s 171ms 15 287 49s434ms 172ms 16 223 38s272ms 171ms 17 265 44s308ms 167ms 18 224 37s250ms 166ms 19 455 1m18s 172ms 20 84 14s231ms 169ms 21 35 5s637ms 161ms 22 23 3s713ms 161ms 23 4 657ms 164ms -
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 179976 AND warehouse_id = 38;
Date: 2024-06-17 13:15:28 Duration: 462ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 171437 AND warehouse_id = 43;
Date: 2024-06-17 13:05:16 Duration: 360ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 0 WHERE product_id = 223332 AND warehouse_id = 37;
Date: 2024-06-17 15:33:50 Duration: 337ms
11 2,820 8m2s 161ms 380ms 171ms 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 #11
Day Hour Count Duration Avg duration Jun 17 03 212 35s314ms 166ms 09 4 664ms 166ms 10 21 3s504ms 166ms 11 158 26s788ms 169ms 12 475 1m20s 170ms 13 504 1m25s 170ms 14 303 52s364ms 172ms 15 284 49s376ms 173ms 16 170 28s911ms 170ms 17 178 30s151ms 169ms 18 173 29s306ms 169ms 19 293 51s529ms 175ms 20 33 5s735ms 173ms 22 10 1s676ms 167ms 23 2 334ms 167ms -
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((19.0), 0) + COALESCE((3.0), 0) WHERE product_id = 171548 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-06-17 15:33:37 Duration: 380ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((123.0), 0) + COALESCE((16.0), 0) WHERE product_id = 193109 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-06-17 14:08:15 Duration: 293ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((6.0), 0) + COALESCE((2.0), 0) WHERE product_id = 203275 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-06-17 16:01:23 Duration: 248ms
12 2,771 7m50s 151ms 1s819ms 169ms update product_warehouse_inventory set qty_reserve = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Jun 17 03 128 20s443ms 159ms 09 4 651ms 162ms 10 18 2s888ms 160ms 11 224 37s143ms 165ms 12 352 1m3s 179ms 13 270 45s223ms 167ms 14 269 46s241ms 171ms 15 296 50s46ms 169ms 16 274 45s623ms 166ms 17 238 39s923ms 167ms 18 213 35s888ms 168ms 19 354 1m 171ms 20 93 16s77ms 172ms 21 24 3s952ms 164ms 22 10 1s648ms 164ms 23 4 650ms 162ms -
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 211758 AND warehouse_id = 35;
Date: 2024-06-17 12:51:37 Duration: 1s819ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 211762 AND warehouse_id = 35;
Date: 2024-06-17 12:51:35 Duration: 1s679ms
-
UPDATE product_warehouse_inventory SET qty_reserve = 1.0 WHERE product_id = 172593 AND warehouse_id = 35;
Date: 2024-06-17 12:01:25 Duration: 451ms
13 2,689 20m16s 413ms 1s12ms 452ms 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 #13
Day Hour Count Duration Avg duration Jun 17 03 2 829ms 414ms 04 1 423ms 423ms 08 7 2s907ms 415ms 09 22 9s142ms 415ms 10 43 17s912ms 416ms 11 187 1m19s 427ms 12 316 2m23s 454ms 13 422 3m11s 454ms 14 410 3m8s 460ms 15 334 2m32s 456ms 16 229 1m39s 435ms 17 214 1m33s 438ms 18 203 1m29s 440ms 19 179 1m33s 522ms 20 77 34s83ms 442ms 21 12 5s159ms 429ms 22 23 9s585ms 416ms 23 8 3s350ms 418ms -
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/%-876187e/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:44:45 Duration: 1s12ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-fb6cd24/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:05:53 Duration: 946ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-fb6cd24/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:52:01 Duration: 902ms
14 2,596 5m56s 120ms 312ms 137ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where (("product_warehouse_inventory"."warehouse_id" = ?) and ("product_warehouse_inventory"."product_id" = ?)) order by "product_warehouse_inventory"."warehouse_name" limit ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Jun 17 11 107 14s155ms 132ms 12 506 1m8s 135ms 13 317 42s551ms 134ms 14 279 37s298ms 133ms 15 306 42s371ms 138ms 16 304 40s511ms 133ms 17 124 16s281ms 131ms 18 136 18s365ms 135ms 19 488 1m12s 148ms 20 29 3s711ms 127ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 35) AND ("product_warehouse_inventory"."product_id" = 207945)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-06-17 12:01:25 Duration: 312ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 35) AND ("product_warehouse_inventory"."product_id" = 197865)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-06-17 12:01:25 Duration: 309ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE (("product_warehouse_inventory"."warehouse_id" = 45) AND ("product_warehouse_inventory"."product_id" = 263046)) ORDER BY "product_warehouse_inventory"."warehouse_name" LIMIT 1;
Date: 2024-06-17 19:16:33 Duration: 274ms
15 2,579 5m47s 120ms 1s92ms 134ms select id from product_warehouse_inventory where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Jun 17 03 9 1s274ms 141ms 09 1 122ms 122ms 10 1 121ms 121ms 11 29 3s737ms 128ms 12 227 30s580ms 134ms 13 296 38s645ms 130ms 14 316 41s470ms 131ms 15 272 37s207ms 136ms 16 158 20s857ms 132ms 17 135 17s307ms 128ms 18 118 15s761ms 133ms 19 876 2m1s 138ms 20 141 19s540ms 138ms -
select id from product_warehouse_inventory where product_id = 195992 and warehouse_id = 43 and company_id = 1;
Date: 2024-06-17 12:59:12 Duration: 1s92ms
-
select id from product_warehouse_inventory where product_id = 203862 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 12:59:13 Duration: 439ms
-
select id from product_warehouse_inventory where product_id = 177372 and warehouse_id = 43 and company_id = 1;
Date: 2024-06-17 20:26:18 Duration: 438ms
16 2,235 5m31s 120ms 318ms 148ms 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 #16
Day Hour Count Duration Avg duration Jun 17 11 203 28s938ms 142ms 12 555 1m24s 152ms 13 199 27s820ms 139ms 14 404 58s941ms 145ms 15 122 19s1ms 155ms 16 268 40s326ms 150ms 17 201 28s847ms 143ms 18 46 7s400ms 160ms 19 224 33s811ms 150ms 20 13 1s655ms 127ms -
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 184209) 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-06-17 19:42:37 Duration: 318ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 239215) 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-06-17 11:14:19 Duration: 283ms
-
SELECT "sale_order_line".id FROM "sale_order_line" WHERE (((("sale_order_line"."product_id" = 203937) 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-06-17 19:42:33 Duration: 279ms
17 1,684 4m59s 147ms 310ms 177ms 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 Jun 17 11 35 5s751ms 164ms 12 39 6s720ms 172ms 13 89 15s506ms 174ms 14 1,319 3m55s 178ms 15 32 5s878ms 183ms 17 43 7s323ms 170ms 18 57 9s819ms 172ms 19 21 4s199ms 199ms 20 5 1s45ms 209ms 21 38 6s185ms 162ms 22 6 984ms 164ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209546) and warehouse_id = (35));
Date: 2024-06-17 14:31:31 Duration: 310ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209252) and warehouse_id = (42));
Date: 2024-06-17 14:35:03 Duration: 280ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209236) and warehouse_id = (42));
Date: 2024-06-17 14:35:02 Duration: 280ms
18 1,642 4m59s 156ms 2s53ms 182ms select res_partner.id from "res_partner" where (("res_partner"."active" = true) and (((unaccent ("res_partner"."name"::text) ilike unaccent (?)) or (unaccent ("res_partner"."ref"::text) ilike unaccent (?))) or (unaccent ("res_partner"."display_name"::text) ilike unaccent (?)))) and (((("res_partner"."partner_share" is null or "res_partner"."partner_share" = false) or ("res_partner"."company_id" in (...))) or "res_partner"."company_id" is null) and (((("res_partner"."type" != ?) or "res_partner"."type" is null) or "res_partner"."type" is null) or ("res_partner"."type" = ?))) and (unaccent (res_partner.email) ilike unaccent (?) or unaccent (res_partner.display_name) ilike unaccent (?) or unaccent (res_partner.ref) ilike unaccent (?) or unaccent (res_partner.vat) ilike unaccent (?)) unaccent (res_partner.display_name);Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Jun 17 01 1 158ms 158ms 09 5 808ms 161ms 10 19 3s23ms 159ms 11 21 3s556ms 169ms 12 161 31s32ms 192ms 13 188 32s977ms 175ms 14 275 52s582ms 191ms 15 327 59s159ms 180ms 16 177 31s187ms 176ms 17 160 27s356ms 170ms 18 137 23s725ms 173ms 19 119 24s952ms 209ms 20 35 6s468ms 184ms 21 3 484ms 161ms 22 14 2s237ms 159ms -
SELECT res_partner.id FROM "res_partner" WHERE (("res_partner"."active" = true) AND (((unaccent ("res_partner"."name"::text) ilike unaccent ('%dayton%')) OR (unaccent ("res_partner"."ref"::text) ilike unaccent ('%dayton%'))) OR (unaccent ("res_partner"."display_name"::text) ilike unaccent ('%dayton%')))) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%dayton%') OR unaccent (res_partner.display_name) ilike unaccent ('%dayton%') OR unaccent (res_partner.ref) ilike unaccent ('%dayton%') OR unaccent (res_partner.vat) ilike unaccent ('dayton')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%dayton%') desc, unaccent (res_partner.display_name);
Date: 2024-06-17 12:51:36 Duration: 2s53ms
-
SELECT res_partner.id FROM "res_partner" WHERE (("res_partner"."active" = true) AND (((unaccent ("res_partner"."name"::text) ilike unaccent ('%dayton%')) OR (unaccent ("res_partner"."ref"::text) ilike unaccent ('%dayton%'))) OR (unaccent ("res_partner"."display_name"::text) ilike unaccent ('%dayton%')))) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%dayton%') OR unaccent (res_partner.display_name) ilike unaccent ('%dayton%') OR unaccent (res_partner.ref) ilike unaccent ('%dayton%') OR unaccent (res_partner.vat) ilike unaccent ('dayton')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%dayton%') desc, unaccent (res_partner.display_name);
Date: 2024-06-17 12:51:37 Duration: 886ms
-
SELECT res_partner.id FROM "res_partner" WHERE (("res_partner"."active" = true) AND (((unaccent ("res_partner"."name"::text) ilike unaccent ('%f-01794%')) OR (unaccent ("res_partner"."ref"::text) ilike unaccent ('%f-01794%'))) OR (unaccent ("res_partner"."display_name"::text) ilike unaccent ('%f-01794%')))) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%f-01794%') OR unaccent (res_partner.display_name) ilike unaccent ('%f-01794%') OR unaccent (res_partner.ref) ilike unaccent ('%f-01794%') OR unaccent (res_partner.vat) ilike unaccent ('f-01794')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%f-01794%') desc, unaccent (res_partner.display_name);
Date: 2024-06-17 15:32:26 Duration: 531ms
19 1,636 5m38s 172ms 424ms 206ms select "account_move".id from "account_move" where ((("account_move"."journal_id" in ( select "account_journal".id from "account_journal" where ("account_journal"."type" in (...)))) and ("account_move"."state" in (...))) and ("account_move"."partner_id" in (...))) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Jun 17 09 16 3s1ms 187ms 10 17 3s176ms 186ms 11 45 8s760ms 194ms 12 165 33s886ms 205ms 13 245 52s308ms 213ms 14 270 57s809ms 214ms 15 250 51s715ms 206ms 16 151 31s85ms 205ms 17 114 22s534ms 197ms 18 115 23s556ms 204ms 19 92 20s795ms 226ms 20 41 8s359ms 203ms 22 27 5s76ms 188ms 23 88 16s445ms 186ms -
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (31823))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-06-17 15:33:19 Duration: 424ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (45424))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-06-17 14:33:12 Duration: 364ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (35128))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-06-17 16:04:01 Duration: 352ms
20 1,610 4m33s 151ms 459ms 170ms update product_warehouse_inventory set qty_on_order = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Jun 17 03 53 8s803ms 166ms 10 6 988ms 164ms 11 33 5s674ms 171ms 12 193 32s414ms 167ms 13 193 32s138ms 166ms 14 195 33s207ms 170ms 15 150 25s776ms 171ms 16 219 36s624ms 167ms 17 88 14s765ms 167ms 18 153 25s732ms 168ms 19 193 35s312ms 182ms 20 57 9s776ms 171ms 21 77 12s614ms 163ms -
UPDATE product_warehouse_inventory SET qty_on_order = 2.0 WHERE product_id = 177372 AND warehouse_id = 35;
Date: 2024-06-17 19:50:19 Duration: 459ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 1.0 WHERE product_id = 177371 AND warehouse_id = 35;
Date: 2024-06-17 19:50:18 Duration: 429ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 1.0 WHERE product_id = 177371 AND warehouse_id = 35;
Date: 2024-06-17 19:50:23 Duration: 337ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 244ms 10s724ms 5s271ms 243 21m20s select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id;Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Jun 17 18 9 40s381ms 4s486ms 19 130 12m34s 5s800ms 20 104 8m6s 4s678ms -
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (41)) GROUP BY account_move_line.account_id;
Date: 2024-06-17 19:50:23 Duration: 10s724ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) GROUP BY account_move_line.account_id;
Date: 2024-06-17 19:16:48 Duration: 10s580ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (39, 41))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (39, 41)) GROUP BY account_move_line.account_id;
Date: 2024-06-17 19:50:25 Duration: 10s503ms
2 1s798ms 1m6s 5s260ms 124 10m52s delete from account_move_line where id in (...);Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Jun 17 11 1 1s869ms 1s869ms 12 10 39s661ms 3s966ms 13 4 22s600ms 5s650ms 14 4 24s659ms 6s164ms 15 12 52s785ms 4s398ms 16 8 1m21s 10s201ms 17 11 1m4s 5s831ms 18 4 39s291ms 9s822ms 19 4 14s738ms 3s684ms 23 66 5m10s 4s710ms -
DELETE FROM account_move_line WHERE id IN (4871316, 4871317, 4871318, 4871319, 4871320, 4871321, 4871322, 4871323, 4871324, 4871325, 4871326, 4871327, 4871328, 4871329, 4871330, 4871331, 4871332, 4871333, 4871334, 4871335, 4871336, 4871337, 4871338, 4871339, 4871340, 4871341, 4871342, 4871343, 4871344, 4871345, 4871346, 4871347, 4871348, 4871349, 5170858, 5170859);
Date: 2024-06-17 16:29:43 Duration: 1m6s
-
DELETE FROM account_move_line WHERE id IN (5094263, 5094264, 5094265, 5094266, 5094267, 5094268, 5094269, 5094270, 5094271, 5094272, 5094273, 5094274, 5094275, 5094276, 5094277, 5094278, 5094279, 5094280, 5094281, 5094282, 5094283, 5094284, 5094285, 5094286, 5094287, 5167275, 5167276);
Date: 2024-06-17 23:38:53 Duration: 49s686ms
-
DELETE FROM account_move_line WHERE id IN (5163584, 5163585, 5163586, 5163587, 5163588, 5163589, 5163590, 5163591, 5163592, 5163593, 5163594, 5163595, 5163596, 5163597, 5163598, 5163599, 5163600, 5163601, 5163602, 5163603, 5163604, 5163605, 5163606, 5163607, 5163608, 5173350, 5173351);
Date: 2024-06-17 23:37:01 Duration: 49s555ms
3 227ms 10s191ms 3s286ms 413 22m37s select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(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") join ( values (?, ?.?, ?)) 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 (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) 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 (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...));Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Jun 17 18 20 1m6s 3s304ms 19 218 12m47s 3s519ms 20 175 8m44s 2s994ms -
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) 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))) and ("account_move_line"."branch_id" in (40, 39));
Date: 2024-06-17 19:16:36 Duration: 10s191ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (39));
Date: 2024-06-17 19:16:27 Duration: 9s443ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-05-31')) AND (("account_move_line"."date" >= '2024-05-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-04-30')) AND (("account_move_line"."date" >= '2024-04-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-03-31')) AND (("account_move_line"."date" >= '2024-03-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-02-29')) AND (("account_move_line"."date" >= '2024-02-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) 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") 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-01-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 ("account_move_line"."branch_id" in (40, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) 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))) and ("account_move_line"."branch_id" in (40, 39));
Date: 2024-06-17 19:16:25 Duration: 9s202ms
4 827ms 1s629ms 897ms 873 13m3s 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 #4
Day Hour Count Duration Avg duration Jun 17 10 3 2s536ms 845ms 11 17 14s956ms 879ms 12 123 1m49s 893ms 13 99 1m29s 901ms 14 138 2m5s 910ms 15 98 1m27s 894ms 16 84 1m13s 872ms 17 99 1m26s 873ms 18 80 1m9s 872ms 19 104 1m37s 940ms 20 27 25s484ms 943ms 21 1 924ms 924ms -
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 ('%84-4005-3%')) 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 ('%84-4005-3%'))) 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 ('%84-4005-3%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%84-4005-3%')))))) 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-06-17 20:43:27 Duration: 1s629ms
-
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 ('%CAF24017%')) 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 ('%CAF24017%'))) 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 ('%CAF24017%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%CAF24017%')))))) 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-06-17 20:32:10 Duration: 1s607ms
-
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 ('%08-137500%')) 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 ('%08-137500%'))) 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 ('%08-137500%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%08-137500%')))))) 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-06-17 19:11:13 Duration: 1s550ms
5 650ms 1s658ms 751ms 926 11m35s 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 Jun 17 11 56 38s300ms 683ms 12 59 43s935ms 744ms 13 59 45s52ms 763ms 14 57 41s984ms 736ms 15 136 1m40s 736ms 16 80 57s410ms 717ms 17 116 1m24s 730ms 18 165 1m59s 723ms 19 155 2m15s 875ms 20 43 29s329ms 682ms -
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 ('%%081%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%08-1%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%08-1%'))) 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-06-17 18:19:00 Duration: 1s658ms
-
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 ('%%1r0749%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%1r0749%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%1r0749%'))) 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-06-17 19:06:12 Duration: 1s604ms
-
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 ('%%1r07%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%1r07%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%1r07%'))) 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-06-17 19:06:11 Duration: 1s570ms
6 635ms 1s838ms 731ms 3,773 46m1s 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 #6
Day Hour Count Duration Avg duration Jun 17 10 8 5s480ms 685ms 11 320 3m40s 689ms 12 553 6m39s 722ms 13 636 7m52s 743ms 14 451 5m33s 738ms 15 430 5m21s 747ms 16 347 4m3s 701ms 17 354 4m8s 702ms 18 174 2m2s 701ms 19 319 4m17s 806ms 20 166 2m6s 764ms 21 10 6s622ms 662ms 22 5 3s309ms 661ms -
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 ('%%dc23%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc23%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc23%'))) 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-06-17 19:06:11 Duration: 1s838ms
-
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 ('%%dc2%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc2%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc2%'))) 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-06-17 19:06:11 Duration: 1s671ms
-
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 ('%%dc234%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%dc234%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%dc234%'))) 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-06-17 19:06:12 Duration: 1s545ms
7 120ms 2s396ms 592ms 1,299 12m49s select "forecasted_data".id from "forecasted_data" where ("forecasted_data"."item_supply_plan_id" in (...)) order by "forecasted_data"."id";Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Jun 17 03 81 19s313ms 238ms 11 93 22s436ms 241ms 12 236 6m47s 1s725ms 13 26 5s31ms 193ms 14 145 37s452ms 258ms 15 357 1m54s 321ms 17 5 842ms 168ms 18 19 7s963ms 419ms 19 218 1m40s 463ms 20 119 53s525ms 449ms -
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (44669, 44044)) ORDER BY "forecasted_data"."id";
Date: 2024-06-17 12:51:36 Duration: 2s396ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (44795, 43532)) ORDER BY "forecasted_data"."id";
Date: 2024-06-17 12:51:36 Duration: 2s393ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (44396, 43515)) ORDER BY "forecasted_data"."id";
Date: 2024-06-17 12:51:36 Duration: 2s382ms
8 413ms 1s12ms 452ms 2,689 20m16s 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 #8
Day Hour Count Duration Avg duration Jun 17 03 2 829ms 414ms 04 1 423ms 423ms 08 7 2s907ms 415ms 09 22 9s142ms 415ms 10 43 17s912ms 416ms 11 187 1m19s 427ms 12 316 2m23s 454ms 13 422 3m11s 454ms 14 410 3m8s 460ms 15 334 2m32s 456ms 16 229 1m39s 435ms 17 214 1m33s 438ms 18 203 1m29s 440ms 19 179 1m33s 522ms 20 77 34s83ms 442ms 21 12 5s159ms 429ms 22 23 9s585ms 416ms 23 8 3s350ms 418ms -
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/%-876187e/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:44:45 Duration: 1s12ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-fb6cd24/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:05:53 Duration: 946ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-fb6cd24/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-06-17 19:52:01 Duration: 902ms
9 333ms 1s213ms 356ms 15,416 1h31m38s with updated_records as ( update product_warehouse_inventory set loc_check_qty = coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?) where loc_check_qty != (coalesce(qty_available, ?) + coalesce(qty_on_order, ?) - coalesce(qty_reserve, ?)) and company_id = ? returning id, product_id, warehouse_id ) select product_id, id as warehouse_inventory_id, warehouse_id from updated_records;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Jun 17 03 794 4m36s 348ms 09 22 7s672ms 348ms 10 122 42s472ms 348ms 11 940 5m27s 348ms 12 1,617 9m34s 355ms 13 1,970 11m40s 355ms 14 1,832 10m54s 357ms 15 1,407 8m25s 359ms 16 1,404 8m15s 352ms 17 1,295 7m36s 352ms 18 1,134 6m39s 352ms 19 2,118 13m3s 369ms 20 461 2m47s 363ms 21 216 1m15s 348ms 22 68 23s699ms 348ms 23 16 5s555ms 347ms -
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 12:40:21 Duration: 1s213ms
-
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 13:55:07 Duration: 1s123ms
-
WITH updated_records AS ( UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0) WHERE loc_check_qty != (COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0) - COALESCE(qty_reserve, 0)) AND company_id = 1 RETURNING id, product_id, warehouse_id ) SELECT product_id, id AS warehouse_inventory_id, warehouse_id FROM updated_records;
Date: 2024-06-17 19:54:43 Duration: 1s42ms
10 295ms 1s550ms 326ms 15,417 1h24m with pwi_data as ( select pwi.id as pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty as src_loc_check_qty, pwi.rep_loc_check_qty as ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id as replenish_wh_id from product_warehouse_inventory pwi join stock_warehouse sw on sw.branch_id = pwi.replenish_branch_id where pwi.replenish_branch_id is not null ), rep_loc_data as ( select pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, coalesce(rep_pwi.loc_check_qty, ?) as rep_loc_check_qty from pwi_data left join product_warehouse_inventory rep_pwi on rep_pwi.warehouse_id = pwi_data.replenish_wh_id and rep_pwi.product_id = pwi_data.product_id ) select rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty from rep_loc_data where rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Jun 17 03 794 4m6s 310ms 09 22 6s764ms 307ms 10 123 37s637ms 305ms 11 940 4m55s 314ms 12 1,617 8m40s 322ms 13 1,970 10m36s 323ms 14 1,832 10m3s 329ms 15 1,407 7m45s 330ms 16 1,404 7m28s 319ms 17 1,296 6m51s 317ms 18 1,134 5m59s 316ms 19 2,117 12m38s 358ms 20 461 2m35s 337ms 21 216 1m6s 307ms 22 68 21s109ms 310ms 23 16 4s909ms 306ms -
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 19:49:57 Duration: 1s550ms
-
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 19:06:12 Duration: 1s510ms
-
WITH pwi_data AS ( SELECT pwi.id AS pwi_id, pwi.warehouse_id, pwi.product_id, pwi.loc_check_qty AS src_loc_check_qty, pwi.rep_loc_check_qty AS ex_rep_loc_check_qty, pwi.replenish_branch_id, sw.id AS replenish_wh_id FROM product_warehouse_inventory pwi JOIN stock_warehouse sw ON sw.branch_id = pwi.replenish_branch_id WHERE pwi.replenish_branch_id IS NOT NULL ), rep_loc_data AS ( SELECT pwi_data.pwi_id, pwi_data.src_loc_check_qty, pwi_data.ex_rep_loc_check_qty, pwi_data.replenish_wh_id, COALESCE(rep_pwi.loc_check_qty, 0) AS rep_loc_check_qty FROM pwi_data LEFT JOIN product_warehouse_inventory rep_pwi ON rep_pwi.warehouse_id = pwi_data.replenish_wh_id AND rep_pwi.product_id = pwi_data.product_id ) SELECT rep_loc_data.pwi_id, rep_loc_data.ex_rep_loc_check_qty, (rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty) as new_rep_loc_check_qty FROM rep_loc_data WHERE rep_loc_data.ex_rep_loc_check_qty != rep_loc_data.src_loc_check_qty + rep_loc_data.rep_loc_check_qty;
Date: 2024-06-17 15:32:56 Duration: 1s354ms
11 120ms 2s263ms 230ms 4,110 15m47s 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 #11
Day Hour Count Duration Avg duration Jun 17 03 127 22s133ms 174ms 09 1 120ms 120ms 10 9 1s125ms 125ms 11 235 38s210ms 162ms 12 590 5m38s 573ms 13 574 1m17s 135ms 14 570 1m28s 155ms 15 704 2m17s 194ms 16 207 27s599ms 133ms 17 212 28s321ms 133ms 18 153 23s484ms 153ms 19 489 1m50s 225ms 20 213 50s551ms 237ms 21 14 1s782ms 127ms 22 12 1s490ms 124ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (242987, 227414, 227381, 227304, 227274)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:51:36 Duration: 2s263ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (223909, 222329, 221644, 221166, 221164, 250585, 222469, 263806, 222051, 221178, 222496, 222947, 222655, 223294, 224059, 221847)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:51:36 Duration: 2s214ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (223909, 222329, 221644, 221166, 221164)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-06-17 12:59:11 Duration: 2s176ms
12 172ms 424ms 206ms 1,636 5m38s select "account_move".id from "account_move" where ((("account_move"."journal_id" in ( select "account_journal".id from "account_journal" where ("account_journal"."type" in (...)))) and ("account_move"."state" in (...))) and ("account_move"."partner_id" in (...))) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Jun 17 09 16 3s1ms 187ms 10 17 3s176ms 186ms 11 45 8s760ms 194ms 12 165 33s886ms 205ms 13 245 52s308ms 213ms 14 270 57s809ms 214ms 15 250 51s715ms 206ms 16 151 31s85ms 205ms 17 114 22s534ms 197ms 18 115 23s556ms 204ms 19 92 20s795ms 226ms 20 41 8s359ms 203ms 22 27 5s76ms 188ms 23 88 16s445ms 186ms -
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (31823))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-06-17 15:33:19 Duration: 424ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (45424))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-06-17 14:33:12 Duration: 364ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (35128))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-06-17 16:04:01 Duration: 352ms
13 170ms 571ms 192ms 4,821 15m30s select coalesce(sum(pwi.max_product_uom_qty), ?) as tmq from forecasted_data fd inner join item_supply_plan as isp on isp.id = fd.item_supply_plan_id inner join product_warehouse_inventory pwi on fd.product_id = pwi.product_id and isp.branch_id = pwi.replenish_branch_id where isp.id = ? and fd.product_id = ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Jun 17 03 275 50s139ms 182ms 10 58 10s250ms 176ms 11 263 48s375ms 183ms 12 583 1m51s 190ms 13 341 1m8s 199ms 14 1,215 3m58s 196ms 15 1,115 3m38s 195ms 16 246 48s139ms 195ms 17 107 20s422ms 190ms 18 254 47s451ms 186ms 19 105 22s100ms 210ms 20 36 7s634ms 212ms 21 196 34s848ms 177ms 22 27 4s759ms 176ms -
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 = 44489 and fd.product_id = 173969;
Date: 2024-06-17 12:43:14 Duration: 571ms
-
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 = 44467 and fd.product_id = 209243;
Date: 2024-06-17 15:46:41 Duration: 551ms
-
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 = 44774 and fd.product_id = 186650;
Date: 2024-06-17 14:28:59 Duration: 520ms
14 156ms 2s53ms 182ms 1,642 4m59s select res_partner.id from "res_partner" where (("res_partner"."active" = true) and (((unaccent ("res_partner"."name"::text) ilike unaccent (?)) or (unaccent ("res_partner"."ref"::text) ilike unaccent (?))) or (unaccent ("res_partner"."display_name"::text) ilike unaccent (?)))) and (((("res_partner"."partner_share" is null or "res_partner"."partner_share" = false) or ("res_partner"."company_id" in (...))) or "res_partner"."company_id" is null) and (((("res_partner"."type" != ?) or "res_partner"."type" is null) or "res_partner"."type" is null) or ("res_partner"."type" = ?))) and (unaccent (res_partner.email) ilike unaccent (?) or unaccent (res_partner.display_name) ilike unaccent (?) or unaccent (res_partner.ref) ilike unaccent (?) or unaccent (res_partner.vat) ilike unaccent (?)) unaccent (res_partner.display_name);Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Jun 17 01 1 158ms 158ms 09 5 808ms 161ms 10 19 3s23ms 159ms 11 21 3s556ms 169ms 12 161 31s32ms 192ms 13 188 32s977ms 175ms 14 275 52s582ms 191ms 15 327 59s159ms 180ms 16 177 31s187ms 176ms 17 160 27s356ms 170ms 18 137 23s725ms 173ms 19 119 24s952ms 209ms 20 35 6s468ms 184ms 21 3 484ms 161ms 22 14 2s237ms 159ms -
SELECT res_partner.id FROM "res_partner" WHERE (("res_partner"."active" = true) AND (((unaccent ("res_partner"."name"::text) ilike unaccent ('%dayton%')) OR (unaccent ("res_partner"."ref"::text) ilike unaccent ('%dayton%'))) OR (unaccent ("res_partner"."display_name"::text) ilike unaccent ('%dayton%')))) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%dayton%') OR unaccent (res_partner.display_name) ilike unaccent ('%dayton%') OR unaccent (res_partner.ref) ilike unaccent ('%dayton%') OR unaccent (res_partner.vat) ilike unaccent ('dayton')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%dayton%') desc, unaccent (res_partner.display_name);
Date: 2024-06-17 12:51:36 Duration: 2s53ms
-
SELECT res_partner.id FROM "res_partner" WHERE (("res_partner"."active" = true) AND (((unaccent ("res_partner"."name"::text) ilike unaccent ('%dayton%')) OR (unaccent ("res_partner"."ref"::text) ilike unaccent ('%dayton%'))) OR (unaccent ("res_partner"."display_name"::text) ilike unaccent ('%dayton%')))) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%dayton%') OR unaccent (res_partner.display_name) ilike unaccent ('%dayton%') OR unaccent (res_partner.ref) ilike unaccent ('%dayton%') OR unaccent (res_partner.vat) ilike unaccent ('dayton')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%dayton%') desc, unaccent (res_partner.display_name);
Date: 2024-06-17 12:51:37 Duration: 886ms
-
SELECT res_partner.id FROM "res_partner" WHERE (("res_partner"."active" = true) AND (((unaccent ("res_partner"."name"::text) ilike unaccent ('%f-01794%')) OR (unaccent ("res_partner"."ref"::text) ilike unaccent ('%f-01794%'))) OR (unaccent ("res_partner"."display_name"::text) ilike unaccent ('%f-01794%')))) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%f-01794%') OR unaccent (res_partner.display_name) ilike unaccent ('%f-01794%') OR unaccent (res_partner.ref) ilike unaccent ('%f-01794%') OR unaccent (res_partner.vat) ilike unaccent ('f-01794')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%f-01794%') desc, unaccent (res_partner.display_name);
Date: 2024-06-17 15:32:26 Duration: 531ms
15 147ms 310ms 177ms 1,684 4m59s 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 #15
Day Hour Count Duration Avg duration Jun 17 11 35 5s751ms 164ms 12 39 6s720ms 172ms 13 89 15s506ms 174ms 14 1,319 3m55s 178ms 15 32 5s878ms 183ms 17 43 7s323ms 170ms 18 57 9s819ms 172ms 19 21 4s199ms 199ms 20 5 1s45ms 209ms 21 38 6s185ms 162ms 22 6 984ms 164ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209546) and warehouse_id = (35));
Date: 2024-06-17 14:31:31 Duration: 310ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209252) and warehouse_id = (42));
Date: 2024-06-17 14:35:03 Duration: 280ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209236) and warehouse_id = (42));
Date: 2024-06-17 14:35:02 Duration: 280ms
16 156ms 384ms 172ms 5,021 14m23s update product_warehouse_inventory set qty_available = ?.? where product_id = ? and warehouse_id = ? and company_id = ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Jun 17 03 30 4s978ms 165ms 09 23 3s799ms 165ms 10 24 3s968ms 165ms 11 159 26s620ms 167ms 12 569 1m37s 171ms 13 741 2m7s 171ms 14 756 2m11s 173ms 15 579 1m39s 171ms 16 403 1m9s 172ms 17 452 1m17s 170ms 18 415 1m10s 170ms 19 617 1m48s 175ms 20 172 30s201ms 175ms 21 8 1s315ms 164ms 22 61 10s152ms 166ms 23 12 1s987ms 165ms -
UPDATE product_warehouse_inventory SET qty_available = 4.0 WHERE product_id = 238852 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-06-17 14:42:00 Duration: 384ms
-
UPDATE product_warehouse_inventory SET qty_available = 11.0 WHERE product_id = 195900 AND warehouse_id = 45 AND company_id = 1;
Date: 2024-06-17 12:39:37 Duration: 359ms
-
UPDATE product_warehouse_inventory SET qty_available = 9.0 WHERE product_id = 178598 AND warehouse_id = 45 AND company_id = 1;
Date: 2024-06-17 15:22:41 Duration: 340ms
17 160ms 2s754ms 171ms 10,328 29m30s 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 #17
Day Hour Count Duration Avg duration Jun 17 08 1 166ms 166ms 09 40 6s617ms 165ms 10 55 9s179ms 166ms 11 556 1m33s 167ms 12 961 2m43s 170ms 13 1,578 4m28s 170ms 14 955 2m43s 171ms 15 787 2m14s 171ms 16 634 1m49s 172ms 17 1,123 3m9s 169ms 18 1,473 4m15s 173ms 19 1,607 4m40s 174ms 20 394 1m7s 170ms 21 9 1s545ms 171ms 22 141 23s456ms 166ms 23 14 2s323ms 165ms -
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 2.0 IS NOT NULL THEN GREATEST ((19.0 - 19.0) + (2.0 - 1.0), 0) ELSE GREATEST ((19.0 - 19.0), 0) END where product_id = 215519 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 18:24:24 Duration: 2s754ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 2.0 IS NOT NULL THEN GREATEST ((19.0 - 19.0) + (2.0 - 1.0), 0) ELSE GREATEST ((19.0 - 19.0), 0) END where product_id = 215519 and warehouse_id = 45 and company_id = 1;
Date: 2024-06-17 18:24:27 Duration: 2s728ms
-
update product_warehouse_inventory set qty_shipped_not_invoiced = CASE WHEN 0.0 IS NOT NULL THEN GREATEST ((1.0 - 1.0) + (0.0 - 0.0), 0) ELSE GREATEST ((1.0 - 1.0), 0) END where product_id = 266964 and warehouse_id = 42 and company_id = 1;
Date: 2024-06-17 16:01:00 Duration: 2s90ms
18 154ms 3s393ms 171ms 15,928 45m28s 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 #18
Day Hour Count Duration Avg duration Jun 17 03 903 2m28s 164ms 09 20 3s366ms 168ms 10 120 19s860ms 165ms 11 998 2m47s 168ms 12 1,752 5m 171ms 13 2,047 5m49s 170ms 14 1,861 5m21s 172ms 15 1,503 4m19s 172ms 16 1,419 4m 169ms 17 1,349 3m49s 170ms 18 1,161 3m16s 169ms 19 2,012 5m57s 177ms 20 482 1m23s 173ms 21 217 36s353ms 167ms 22 68 11s474ms 168ms 23 16 2s680ms 167ms -
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(205.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 171661 AND warehouse_id = 40 AND company_id = 1;
Date: 2024-06-17 19:38:18 Duration: 3s393ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(19.0, 0) + COALESCE(10.0, 0) - COALESCE(0.0, 0) WHERE product_id = 195667 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-06-17 12:59:11 Duration: 1s783ms
-
UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(21.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 257434 AND warehouse_id = 46 AND company_id = 1;
Date: 2024-06-17 17:22:36 Duration: 1s277ms
19 161ms 380ms 171ms 2,820 8m2s 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 #19
Day Hour Count Duration Avg duration Jun 17 03 212 35s314ms 166ms 09 4 664ms 166ms 10 21 3s504ms 166ms 11 158 26s788ms 169ms 12 475 1m20s 170ms 13 504 1m25s 170ms 14 303 52s364ms 172ms 15 284 49s376ms 173ms 16 170 28s911ms 170ms 17 178 30s151ms 169ms 18 173 29s306ms 169ms 19 293 51s529ms 175ms 20 33 5s735ms 173ms 22 10 1s676ms 167ms 23 2 334ms 167ms -
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((19.0), 0) + COALESCE((3.0), 0) WHERE product_id = 171548 AND warehouse_id = 42 AND company_id = 1;
Date: 2024-06-17 15:33:37 Duration: 380ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((123.0), 0) + COALESCE((16.0), 0) WHERE product_id = 193109 AND warehouse_id = 43 AND company_id = 1;
Date: 2024-06-17 14:08:15 Duration: 293ms
-
UPDATE product_warehouse_inventory SET rep_loc_check_qty = COALESCE((6.0), 0) + COALESCE((2.0), 0) WHERE product_id = 203275 AND warehouse_id = 38 AND company_id = 1;
Date: 2024-06-17 16:01:23 Duration: 248ms
20 151ms 459ms 170ms 1,610 4m33s update product_warehouse_inventory set qty_on_order = ?.? where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Jun 17 03 53 8s803ms 166ms 10 6 988ms 164ms 11 33 5s674ms 171ms 12 193 32s414ms 167ms 13 193 32s138ms 166ms 14 195 33s207ms 170ms 15 150 25s776ms 171ms 16 219 36s624ms 167ms 17 88 14s765ms 167ms 18 153 25s732ms 168ms 19 193 35s312ms 182ms 20 57 9s776ms 171ms 21 77 12s614ms 163ms -
UPDATE product_warehouse_inventory SET qty_on_order = 2.0 WHERE product_id = 177372 AND warehouse_id = 35;
Date: 2024-06-17 19:50:19 Duration: 459ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 1.0 WHERE product_id = 177371 AND warehouse_id = 35;
Date: 2024-06-17 19:50:18 Duration: 429ms
-
UPDATE product_warehouse_inventory SET qty_on_order = 1.0 WHERE product_id = 177371 AND warehouse_id = 35;
Date: 2024-06-17 19:50:23 Duration: 337ms
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
- 213,066 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 34405 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 33,543 Max number of times the same event was reported
- 34,405 Total events found
Rank Times reported Error 1 33,543 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #1
Day Hour Count Jun 17 03 1,118 08 1 09 133 10 302 11 1,846 12 3,452 13 4,229 14 3,515 15 3,517 16 2,738 17 3,013 18 2,796 19 4,896 20 1,262 21 350 22 312 23 63 - ERROR: could not serialize access due to concurrent update
Statement: SELECT state FROM queue_job WHERE uuid='4a1cbd23-2076-4e8d-80a9-fe03c3cce388' AND state='enqueued' FOR UPDATE
Date: 2024-06-17 16:50:20
2 779 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #2
Day Hour Count Jun 17 00 19 01 21 02 20 03 24 04 20 05 18 06 22 07 87 08 72 09 22 10 20 11 19 12 22 13 24 14 28 15 24 16 52 17 33 18 29 19 33 20 22 21 32 22 29 23 87 - ERROR: could not obtain lock on row in relation "ir_cron"
- ERROR: could not obtain lock on row in relation "website_visitor"
- ERROR: could not obtain lock on row in relation "res_partner"
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-06-17 16:50:17
Statement: SELECT * FROM website_visitor where id = 13487221 FOR NO KEY UPDATE NOWAIT
Date: 2024-06-17 14:07:40
Statement: SELECT "supplier_rank" FROM res_partner WHERE ID IN (33110, 30496) FOR UPDATE NOWAIT; UPDATE res_partner SET "supplier_rank" = "supplier_rank" + 1 WHERE id IN (33110, 30496)
Date: 2024-06-17 16:29:54
3 65 LOG: process ... still waiting for ShareLock on transaction ... after ... ms
Times Reported Most Frequent Error / Event #3
Day Hour Count Jun 17 12 5 13 26 14 6 15 6 16 5 17 5 18 4 19 6 20 1 22 1 - ERROR: process 731466 still waiting for ShareLock on transaction 276512746 after 1000.040 ms
- ERROR: process 733529 still waiting for ShareLock on transaction 276515599 after 1000.060 ms
- ERROR: process 731890 still waiting for ShareLock on transaction 276516126 after 1000.053 ms
Detail: Process holding the lock: 733527. Wait queue: 731466.
Context: while updating tuple (21538,40) in relation "account_move"
Statement: UPDATE "account_move" SET "message_main_attachment_id"=5508816,"write_uid"=1028,"write_date"=(now() at time zone 'UTC') WHERE id IN (1477721)Date: 2024-06-17 16:57:13
Detail: Process holding the lock: 731520. Wait queue: 733529.
Context: while updating tuple (21553,37) 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 != 1477769 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 != 1477769 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-06-17 17:04:43
Detail: Process holding the lock: 731520. Wait queue: 731890.
Context: while updating tuple (21830,67) 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 != 1477786 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 != 1477786 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-06-17 17:05:34
4 5 ERROR: duplicate key value violates unique constraint "..."
Times Reported Most Frequent Error / Event #4
Day Hour Count Jun 17 12 2 13 1 14 1 18 1 - ERROR: duplicate key value violates unique constraint "fleet_vehicle_vehicle_unit_no_driver_id_unique"
- ERROR: duplicate key value violates unique constraint "fleet_vehicle_vin_sn_unique"
- ERROR: duplicate key value violates unique constraint "mail_followers_mail_followers_res_partner_res_model_id_uniq"
Detail: Key (vehicle_unit_no, driver_id)=(020, 51173) already exists.
Statement: INSERT INTO "fleet_vehicle" ("id", "create_uid", "create_date", "write_uid", "write_date", "acquisition_date", "active", "brand_id", "car_value", "co2", "color", "company_id", "description", "doors", "driver_id", "first_contract_date", "fuel_type", "future_driver_id", "horsepower", "horsepower_tax", "license_plate", "location", "manager_id", "model_id", "model_vehicle_type", "model_year", "name", "net_car_value", "next_assignation_date", "odometer_unit", "power", "residual_value", "seats", "state_id", "transmission", "vehicle_unit_no", "vin_sn") VALUES (nextval('fleet_vehicle_id_seq'), 999, (now() at time zone 'UTC'), 999, (now() at time zone 'UTC'), '2024-06-17', true, 124, 0.0, 0.0, NULL, 1, NULL, 5, 51173, '2024-06-17', NULL, NULL, 0, 0.0, 'pwl6726', NULL, 2, 212, 21, NULL, 'Sterling', 0.0, NULL, 'miles', 0, 0.0, 0, 3, NULL, '020', NULL) RETURNING idDate: 2024-06-17 12:12:31
Detail: Key (vin_sn)=(DL160915) already exists.
Statement: INSERT INTO "fleet_vehicle" ("id", "create_uid", "create_date", "write_uid", "write_date", "acquisition_date", "active", "brand_id", "car_value", "co2", "color", "company_id", "description", "doors", "driver_id", "first_contract_date", "fuel_type", "future_driver_id", "horsepower", "horsepower_tax", "license_plate", "location", "manager_id", "model_id", "model_vehicle_type", "model_year", "name", "net_car_value", "next_assignation_date", "odometer_unit", "power", "residual_value", "seats", "state_id", "transmission", "vehicle_unit_no", "vin_sn") VALUES (nextval('fleet_vehicle_id_seq'), 978, (now() at time zone 'UTC'), 978, (now() at time zone 'UTC'), '2024-06-17', true, 127, 0.0, 0.0, NULL, 1, NULL, 5, 41693, '2024-06-17', NULL, NULL, 0, 0.0, 'XHF0484', NULL, 952, 319, 28, NULL, '206', 0.0, NULL, 'miles', 0, 0.0, 0, 3, NULL, 'TOW MASTER', 'DL160915') RETURNING idDate: 2024-06-17 13:33:03
Detail: Key (res_model, res_id, partner_id)=(sale.order, 146735, 52309) already exists.
Statement: INSERT INTO "mail_followers" ("id", "channel_id", "partner_id", "res_id", "res_model") VALUES (nextval('mail_followers_id_seq'), NULL, 52309, 146735, 'sale.order') RETURNING idDate: 2024-06-17 14:52:08
5 3 ERROR: deadlock detected
Times Reported Most Frequent Error / Event #5
Day Hour Count Jun 17 13 1 14 1 19 1 - ERROR: deadlock detected
- ERROR: deadlock detected
- ERROR: deadlock detected
Detail: Process 856073 waits for ShareLock on transaction 276557537; blocked by process 739383. Process 739383 waits for ShareLock on transaction 276557539; blocked by process 856073. Process 856073: UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(1.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 172564 AND warehouse_id = 41 AND company_id = 1 Process 739383: UPDATE "product_warehouse_inventory" SET "last_used_date"='2024-06-17',"write_uid"=952,"write_date"=(now() at time zone 'UTC') WHERE id IN (80480, 45281, 63493, 63530, 45259, 45169, 76434, 63538, 45234, 76438, 63354, 78812)
Context: while updating tuple (29375,18) in relation "product_warehouse_inventory"
Hint: See server log for query details.
Statement: UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(1.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 172564 AND warehouse_id = 41 AND company_id = 1Date: 2024-06-17 19:05:34
Detail: Process 3277197 waits for ShareLock on transaction 276419163; blocked by process 2957819. Process 2957819 waits for ShareLock on transaction 276419161; blocked by process 3277197. Process 3277197: UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(4.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 174413 AND warehouse_id = 42 AND company_id = 1 Process 2957819: UPDATE "product_warehouse_inventory" SET "last_used_date"='2024-06-17',"write_uid"=1021,"write_date"=(now() at time zone 'UTC') WHERE id IN (11940, 36967, 72269, 52943, 102737, 53045, 71901, 51773)
Context: while updating tuple (287,15) in relation "product_warehouse_inventory"
Hint: See server log for query details.
Statement: UPDATE product_warehouse_inventory SET loc_check_qty = COALESCE(4.0, 0) + COALESCE(0.0, 0) - COALESCE(0.0, 0) WHERE product_id = 174413 AND warehouse_id = 42 AND company_id = 1Date: 2024-06-17 13:27:05
Detail: Process 2857719 waits for ShareLock on transaction 276439944; blocked by process 3277210. Process 3277210 waits for ShareLock on transaction 276439945; blocked by process 2857719. Process 2857719: 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 (146567) Process 3277210: 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 (426725, 426726, 426727, 426728, 426729)
Context: while updating tuple (1239,52) 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 (146567)Date: 2024-06-17 14:06:05
6 3 ERROR: null value in column "..." of relation "..." violates not-null constraint
Times Reported Most Frequent Error / Event #6
Day Hour Count Jun 17 14 1 15 1 20 1 - ERROR: null value in column "categ_id" of relation "product_template" violates not-null constraint
Detail: Failing row contains (268642, null, 1494-828, 1, null, null, null, product, null, 1.00, null, null, t, t, 1, 1, null, t, null, null, null, null, 1007, 2024-06-17 14:34:43.99703, 1007, 2024-06-17 14:34:43.99703, manual, no-message, null, no, delivery, 0, none, null, null, null, receive, no-message, null, null, no, 0, null, null, null, null, null, null, null, null, f, null, 1, 1, null, 480480, never, 0, , 44, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 2024-06-17, null, E, 1, null, null, f, f, no, null, 1, null, null, null, null, null, null, null, null, null, none, null, null, null, f, f, null, null, null, f, rfq, null, null, null, null, null).
Statement: INSERT INTO "product_template" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "allow_journal", "available_threshold", "branch_id", "categ_id", "core_qty", "custom_message", "expense_policy", "first_active_date", "global_class_code", "inventory_availability", "invoice_policy", "is_core", "is_direct_order_product", "is_mo_product", "is_published", "is_transmission", "linked_with_existing_core", "list_price", "name", "produce_delay", "purchase_line_warn", "purchase_method", "purchase_ok", "purchase_requisition", "sale_delay", "sale_line_warn", "sale_ok", "sequence", "service_form_type", "service_tracking", "service_type", "standard_carton_quanity", "tracking", "type", "uom_id", "uom_po_id", "website_sequence", "website_size_x", "website_size_y") VALUES (nextval('product_template_id_seq'), 1007, (now() at time zone 'UTC'), 1007, (now() at time zone 'UTC'), true, false, 0.0, 44, NULL, 1, '', 'no', '2024-06-17', 'E', 'never', 'delivery', false, false, false, false, false, 'no', '1.00', '1494-828', 0.0, 'no-message', 'receive', true, 'rfq', 0.0, 'no-message', true, 1, 'none', 'no', 'manual', 1, 'none', 'product', 1, 1, 480480, 1, 1) RETURNING idDate: 2024-06-17 14:34:44
7 3 ERROR: could not serialize access due to concurrent delete
Times Reported Most Frequent Error / Event #7
Day Hour Count Jun 17 17 3 - ERROR: could not serialize access due to concurrent delete
Statement: DELETE FROM account_tax_sale_order_line_rel WHERE sale_order_line_id IN (425295) AND account_tax_id IN (1992)
Date: 2024-06-17 17:12:37
8 2 LOG: process ... still waiting for ExclusiveLock on tuple (...) of relation ... of database ... after ... ms
Times Reported Most Frequent Error / Event #8
Day Hour Count Jun 17 13 1 16 1 - ERROR: process 3277198 still waiting for ExclusiveLock on tuple (23786,50) of relation 42418 of database 65946 after 1000.046 ms
- ERROR: process 733530 still waiting for ExclusiveLock on tuple (21533,29) of relation 42418 of database 65946 after 1000.048 ms
Detail: Process holding the lock: 3277194. Wait queue: 3277198.
Statement: UPDATE "account_move" SET "message_main_attachment_id"=5507323,"write_uid"=999,"write_date"=(now() at time zone 'UTC') WHERE id IN (1476127)Date: 2024-06-17 13:25:17
Detail: Process holding the lock: 733529. Wait queue: 733530.
Statement: UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1477605 AND sequence_prefix = (SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1477605 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-06-17 16:29:34
9 2 ERROR: current transaction is aborted, commands ignored until end of transaction block
Times Reported Most Frequent Error / Event #9
Day Hour Count Jun 17 15 2 - ERROR: current transaction is aborted, commands ignored until end of transaction block
Statement: SELECT MAX(CASE WHEN perm_write 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 = 'edi.810.invoice' AND gu.uid = 975 AND a.active IS TRUE
Date: 2024-06-17 15:05:47