-
Global information
- Generated on Sat Mar 2 23:50:23 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 209,686 log entries in 22s
- Log start from 2024-03-02 00:00:02 to 2024-03-02 23:49:09
-
Overview
Global Stats
- 253 Number of unique normalized queries
- 71,730 Number of queries
- 13h38m49s Total query duration
- 2024-03-02 00:00:02 First query
- 2024-03-02 23:49:09 Last query
- 25 queries/s at 2024-03-02 09:33:04 Query peak
- 13h38m49s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 13h38m49s Execute total duration
- 1,723 Number of events
- 6 Number of unique normalized events
- 1,353 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
- 71,730 Average queries per session
- 13h38m49s 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
- 25 queries/s Query Peak
- 2024-03-02 09:33:04 Date
SELECT Traffic
Key values
- 24 queries/s Query Peak
- 2024-03-02 09:33:04 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 7 queries/s Query Peak
- 2024-03-02 15:21:33 Date
Queries duration
Key values
- 13h38m49s 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) Mar 02 00 230 0ms 539ms 199ms 3s727ms 3s855ms 4s889ms 01 310 0ms 26s827ms 389ms 4s657ms 5s789ms 56s400ms 02 235 0ms 1s517ms 232ms 2s908ms 3s797ms 14s489ms 03 220 0ms 14s967ms 299ms 3s32ms 7s52ms 20s758ms 04 2,310 0ms 16s916ms 1s506ms 1m49s 2m23s 2m25s 05 4,922 120ms 6s468ms 1s192ms 2m35s 2m54s 3m46s 06 3,353 120ms 1s175ms 604ms 37s270ms 38s739ms 42s284ms 07 2,937 120ms 6s285ms 626ms 38s845ms 40s386ms 45s963ms 08 5,653 120ms 10s136ms 613ms 1m30s 1m44s 1m49s 09 6,685 120ms 5m58s 702ms 2m14s 3m32s 7m31s 10 7,531 120ms 11s316ms 631ms 2m7s 2m38s 3m1s 11 9,739 120ms 10s593ms 622ms 2m14s 2m36s 3m36s 12 11,591 120ms 5s892ms 591ms 2m15s 2m27s 2m49s 13 5,001 120ms 10s464ms 597ms 1m23s 1m25s 1m32s 14 3,190 120ms 11s416ms 633ms 45s296ms 46s291ms 55s962ms 15 3,427 120ms 1s675ms 608ms 42s733ms 43s667ms 46s67ms 16 2,692 120ms 2s641ms 650ms 36s562ms 46s675ms 1m23s 17 1,218 120ms 3s909ms 659ms 20s438ms 23s915ms 52s106ms 18 107 0ms 1s804ms 239ms 771ms 3s805ms 4s992ms 19 131 0ms 2s593ms 457ms 5s299ms 5s425ms 7s628ms 20 47 0ms 363ms 259ms 3s330ms 3s360ms 3s360ms 21 57 0ms 549ms 307ms 3s304ms 5s850ms 5s850ms 22 43 0ms 432ms 274ms 3s673ms 3s687ms 3s687ms 23 101 0ms 457ms 170ms 2s121ms 4s965ms 4s965ms Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Mar 02 00 230 0 199ms 2s681ms 3s727ms 4s889ms 01 309 0 390ms 2s751ms 4s657ms 56s95ms 02 235 0 232ms 2s436ms 2s908ms 14s489ms 03 218 0 222ms 2s2ms 3s32ms 7s52ms 04 1,244 0 625ms 26s98ms 32s554ms 37s340ms 05 3,649 0 736ms 1m12s 1m32s 2m9s 06 2,822 0 693ms 34s388ms 35s600ms 39s40ms 07 2,529 0 706ms 34s45ms 37s751ms 41s332ms 08 4,793 0 695ms 1m18s 1m27s 1m43s 09 5,608 102 797ms 1m24s 1m39s 2m11s 10 6,365 0 720ms 1m36s 2m3s 2m35s 11 7,637 0 747ms 1m59s 2m5s 2m56s 12 8,725 0 734ms 2m 2m6s 2m19s 13 3,924 0 704ms 1m12s 1m16s 1m20s 14 2,764 0 691ms 36s766ms 40s94ms 44s136ms 15 2,777 0 719ms 35s652ms 41s84ms 43s560ms 16 2,258 0 749ms 33s487ms 34s982ms 47s334ms 17 1,139 0 692ms 17s742ms 20s209ms 39s514ms 18 54 0 336ms 0ms 638ms 4s443ms 19 131 0 457ms 4s673ms 5s299ms 7s628ms 20 46 0 262ms 1s682ms 3s330ms 3s360ms 21 57 0 307ms 2s147ms 3s304ms 5s850ms 22 43 0 274ms 3s82ms 3s673ms 3s687ms 23 101 0 170ms 2s106ms 2s121ms 4s965ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Mar 02 00 0 0 0 0 0ms 0ms 0ms 0ms 01 0 1 0 0 305ms 0ms 0ms 0ms 02 0 0 0 0 0ms 0ms 0ms 0ms 03 0 1 0 0 2s433ms 0ms 0ms 0ms 04 0 1,055 0 0 2s456ms 58s983ms 1m 1m58s 05 0 1,218 0 0 2s604ms 55s528ms 57s606ms 1m27s 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 1 0 0 309ms 0ms 0ms 0ms 08 0 1 0 0 10s136ms 0ms 0ms 0ms 09 0 0 0 0 0ms 0ms 0ms 0ms 10 1 0 0 0 1s882ms 0ms 0ms 0ms 11 0 2 0 0 10s426ms 0ms 0ms 0ms 12 0 0 0 0 0ms 0ms 0ms 0ms 13 0 7 0 0 10s261ms 0ms 0ms 10s363ms 14 0 9 0 0 5s844ms 0ms 0ms 10s92ms 15 0 40 0 0 134ms 0ms 0ms 0ms 16 0 0 0 0 0ms 0ms 0ms 0ms 17 0 1 0 0 3s909ms 0ms 0ms 0ms 18 0 2 0 0 305ms 0ms 0ms 0ms 19 0 0 0 0 0ms 0ms 0ms 0ms 20 0 0 1 0 138ms 0ms 0ms 138ms 21 0 0 0 0 0ms 0ms 0ms 0ms 22 0 0 0 0 0ms 0ms 0ms 0ms 23 0 0 0 0 0ms 0ms 0ms 0ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Mar 02 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 Mar 02 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 Mar 02 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 Mar 02 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 Mar 02 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) Mar 02 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 Mar 02 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 Mar 02 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 Mar 02 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
- 2 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query 1 1 7s117ms 7s117ms 7s117ms 7s117ms delete from ir_attachment where id in (...);-
DELETE FROM ir_attachment WHERE id IN (5124461, 5124460, 5124459, 5124458);
Date: 2024-03-02 05:49:07
2 1 1s881ms 1s881ms 1s881ms 1s881ms insert into "edi_810_invoice" ("id", "create_uid", "create_date", "write_uid", "write_date", "bill_date", "branch_id", "config_id", "cutoff_draft", "due_date", "edi_file", "errors", "has_charge_line", "inv_date", "inventory_vendor_id", "invoice_process_status", "manual_bill", "payment_term_code", "payment_term_id", "po_id", "po_reference", "pt_applicable_from", "pt_description", "pt_discount_due_date", "pt_discount_percent", "pt_net_due_date", "pt_total_discount", "ref_810", "st_branch_indicator", "system_read", "transmission_route", "v_bill_total", "vendor_id") values (nextval(?), ?, (now() at time zone ?), ?, (now() at time zone ?), ?, ?, ?, false, ?, ?, ?, false, ?, ?, ?, false, ?, ?, ?, ?, ?, ?, null, null, ?, null, ?, ?, false, ?, ?.?, ?) returning id;-
INSERT INTO "edi_810_invoice" ("id", "create_uid", "create_date", "write_uid", "write_date", "bill_date", "branch_id", "config_id", "cutoff_draft", "due_date", "edi_file", "errors", "has_charge_line", "inv_date", "inventory_vendor_id", "invoice_process_status", "manual_bill", "payment_term_code", "payment_term_id", "po_id", "po_reference", "pt_applicable_from", "pt_description", "pt_discount_due_date", "pt_discount_percent", "pt_net_due_date", "pt_total_discount", "ref_810", "st_branch_indicator", "system_read", "transmission_route", "v_bill_total", "vendor_id") VALUES (nextval('edi_810_invoice_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), '2024-02-29', 44, 1, false, '2024-03-30', '1.0" encoding="utf-8" ?> <message> <sender>063711675</sender> <receiver>004498267</receiver> <testindicator>P</testindicator> <inv_ref>5862816</inv_ref> <inv_date>2024-02-29</inv_date> <po_number>B-02193</po_number> <totalinvoiceamount>9.49</totalinvoiceamount> <payment_term_code>01</payment_term_code> <termsapplicablefrom>3</termsapplicablefrom> <termsnetduedate>2024-03-30</termsnetduedate> <termdescription>NET30</termdescription> <partys> <party> <qual>RE</qual> <DUNS>0637116750004</DUNS> <name1>HDA Truck Pride</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>VN</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>SE</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>ST</qual> <DUNS>0044982670008</DUNS> <name1>POINT SPRING & DRIVESHAFT</name1> <address1>1250 TRIPLETT BOULEVARD</address1> <city>AKRON</city> <pcode>44306</pcode> <state>OH</state> <country>USA</country> </party> <party> <qual>SF</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> </partys> <lines> <line> <buyer_part>450-4723</buyer_part> <inv_qty>1</inv_qty> <desc>KEEPER PRO-TORQ 137-004KS</desc> <unit_price>9.49</unit_price> <uom>EA</uom> </line> </lines> </message>', '', false, '2024-02-29', 3085, 'draft', false, '01', 94, 30734, 'B-02193', 'Invoice Date', 'NET30', NULL, NULL, '2024-03-30', NULL, '5862816', '0008', false, 'tie_kinetix', 9.49, 32877) RETURNING id;
Date: 2024-03-02 10:30:17
-
INSERT INTO "edi_810_invoice" ("id", "create_uid", "create_date", "write_uid", "write_date", "bill_date", "branch_id", "config_id", "cutoff_draft", "due_date", "edi_file", "errors", "has_charge_line", "inv_date", "inventory_vendor_id", "invoice_process_status", "manual_bill", "payment_term_code", "payment_term_id", "po_id", "po_reference", "pt_applicable_from", "pt_description", "pt_discount_due_date", "pt_discount_percent", "pt_net_due_date", "pt_total_discount", "ref_810", "st_branch_indicator", "system_read", "transmission_route", "v_bill_total", "vendor_id") VALUES (nextval('edi_810_invoice_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), '2024-02-29', 44, 1, false, '2024-03-30', '1.0" encoding="utf-8" ?> <message> <sender>063711675</sender> <receiver>004498267</receiver> <testindicator>P</testindicator> <inv_ref>5862816</inv_ref> <inv_date>2024-02-29</inv_date> <po_number>B-02193</po_number> <totalinvoiceamount>9.49</totalinvoiceamount> <payment_term_code>01</payment_term_code> <termsapplicablefrom>3</termsapplicablefrom> <termsnetduedate>2024-03-30</termsnetduedate> <termdescription>NET30</termdescription> <partys> <party> <qual>RE</qual> <DUNS>0637116750004</DUNS> <name1>HDA Truck Pride</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>VN</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>SE</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>ST</qual> <DUNS>0044982670008</DUNS> <name1>POINT SPRING & DRIVESHAFT</name1> <address1>1250 TRIPLETT BOULEVARD</address1> <city>AKRON</city> <pcode>44306</pcode> <state>OH</state> <country>USA</country> </party> <party> <qual>SF</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> </partys> <lines> <line> <buyer_part>450-4723</buyer_part> <inv_qty>1</inv_qty> <desc>KEEPER PRO-TORQ 137-004KS</desc> <unit_price>9.49</unit_price> <uom>EA</uom> </line> </lines> </message>', '', false, '2024-02-29', 3085, 'draft', false, '01', 94, 30734, 'B-02193', 'Invoice Date', 'NET30', NULL, NULL, '2024-03-30', NULL, '5862816', '0008', false, 'tie_kinetix', 9.49, 32877) RETURNING id;
Date: 2024-03-02 10:30:17
Queries that waited the most
Rank Wait time Query 1 7s117ms DELETE FROM ir_attachment WHERE id IN (5124461, 5124460, 5124459, 5124458);[ Date: 2024-03-02 05:49:07 ]
2 1s881ms INSERT INTO "edi_810_invoice" ("id", "create_uid", "create_date", "write_uid", "write_date", "bill_date", "branch_id", "config_id", "cutoff_draft", "due_date", "edi_file", "errors", "has_charge_line", "inv_date", "inventory_vendor_id", "invoice_process_status", "manual_bill", "payment_term_code", "payment_term_id", "po_id", "po_reference", "pt_applicable_from", "pt_description", "pt_discount_due_date", "pt_discount_percent", "pt_net_due_date", "pt_total_discount", "ref_810", "st_branch_indicator", "system_read", "transmission_route", "v_bill_total", "vendor_id") VALUES (nextval('edi_810_invoice_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), '2024-02-29', 44, 1, false, '2024-03-30', '1.0" encoding="utf-8" ?> <message> <sender>063711675</sender> <receiver>004498267</receiver> <testindicator>P</testindicator> <inv_ref>5862816</inv_ref> <inv_date>2024-02-29</inv_date> <po_number>B-02193</po_number> <totalinvoiceamount>9.49</totalinvoiceamount> <payment_term_code>01</payment_term_code> <termsapplicablefrom>3</termsapplicablefrom> <termsnetduedate>2024-03-30</termsnetduedate> <termdescription>NET30</termdescription> <partys> <party> <qual>RE</qual> <DUNS>0637116750004</DUNS> <name1>HDA Truck Pride</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>VN</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>SE</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>ST</qual> <DUNS>0044982670008</DUNS> <name1>POINT SPRING & DRIVESHAFT</name1> <address1>1250 TRIPLETT BOULEVARD</address1> <city>AKRON</city> <pcode>44306</pcode> <state>OH</state> <country>USA</country> </party> <party> <qual>SF</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> </partys> <lines> <line> <buyer_part>450-4723</buyer_part> <inv_qty>1</inv_qty> <desc>KEEPER PRO-TORQ 137-004KS</desc> <unit_price>9.49</unit_price> <uom>EA</uom> </line> </lines> </message>', '', false, '2024-02-29', 3085, 'draft', false, '01', 94, 30734, 'B-02193', 'Invoice Date', 'NET30', NULL, NULL, '2024-03-30', NULL, '5862816', '0008', false, 'tie_kinetix', 9.49, 32877) RETURNING id;[ Date: 2024-03-02 10:30:17 ]
-
Queries
Queries by type
Key values
- 57,658 Total read queries
- 14,070 Total write queries
Queries by database
Key values
- unknown Main database
- 71,730 Requests
- 13h38m49s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 71,799 Requests
User Request type Count Duration unknown Total 71,799 13h39m7s copy to 102 16m38s cte 11,626 30m26s delete 1 138ms insert 1 1s882ms select 57,716 11h13m2s tcl 2 1s401ms update 2,349 1h38m55s Duration by user
Key values
- 13h39m7s (unknown) Main time consuming user
User Request type Count Duration unknown Total 71,799 13h39m7s copy to 102 16m38s cte 11,626 30m26s delete 1 138ms insert 1 1s882ms select 57,716 11h13m2s tcl 2 1s401ms update 2,349 1h38m55s Queries by host
Key values
- unknown Main host
- 71,799 Requests
- 13h39m7s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 71,730 Requests
- 13h38m49s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-03-02 06:32:03 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 31,866 100-500ms duration
Slowest individual queries
Rank Duration Query 1 5m58s 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-03-02 09:11:45 ]
2 2m1s 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-03-02 09:03:48 ]
3 1m48s 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-03-02 09:05:46 ]
4 1m21s 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-03-02 09:16:47 ]
5 53s501ms COPY public.website_track (id, visitor_id, page_id, url, visit_datetime, product_id) TO stdout;[ Date: 2024-03-02 09:15:26 ]
6 30s546ms 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-03-02 09:00:50 ]
7 26s827ms select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;[ Date: 2024-03-02 01:00:28 ]
8 25s48ms select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;[ Date: 2024-03-02 01:00:28 ]
9 22s674ms 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-03-02 09:13:42 ]
10 17s829ms COPY public.base_import_import (id, res_model, file, file_name, file_type, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-03-02 09:01:16 ]
11 16s916ms with data as ( select distinct shl.id as record, 3847, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 45 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393) UNION ALL ( select distinct sol.id as record, 3847, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 45 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393)) UNION ALL ( select distinct sm.id as record, 3847, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 45 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3847, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 45);[ Date: 2024-03-02 04:41:04 ]
12 14s967ms with data as ( select distinct shl.id as record, 3840, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 37 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514) UNION ALL ( select distinct sol.id as record, 3840, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 37 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514)) UNION ALL ( select distinct sm.id as record, 3840, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 37 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3840, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 37);[ Date: 2024-03-02 03:59:37 ]
13 14s700ms with data as ( select distinct shl.id as record, 3849, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 48 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 05:00:00' and shl.invoice_date <= '2024-03-02 05:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263) UNION ALL ( select distinct sol.id as record, 3849, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 48 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 05:00:00' and so.date_order <= '2024-03-02 05:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263)) UNION ALL ( select distinct sm.id as record, 3849, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 48 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 05:00:00' and mrp.create_date <= '2024-03-02 05:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3849, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 48);[ Date: 2024-03-02 04:29:31 ]
14 14s141ms with data as ( select distinct shl.id as record, 3848, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 46 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209381, 209446, 209447, 209276, 209382, 209282, 209320, 209209, 209380, 209393, 209560, 209362, 209280, 209330, 209247, 209451, 209328, 209472, 209509, 209192, 209493, 209197, 209273, 209317, 209372, 209515, 209514, 197276, 209214, 209436, 209507, 209244, 209494, 209485, 209378, 209238, 209242, 209424, 209433, 209565, 209495, 209239, 179976, 209174, 209299, 209491, 202387, 209236, 209342, 209571, 209335, 209173, 209566, 209346, 209501, 209178, 209234, 209473, 209185, 209524, 209506, 209258, 193763, 209334, 209487, 209172, 209573, 209480, 209511, 209200, 209347, 193768, 209437, 209545, 209554, 209558, 209345, 209310, 209474, 209492, 209384, 209263, 209175, 209340, 209359, 209438, 209516, 209303, 209502, 209439, 209230, 209361, 173241, 209246, 209528, 209366, 209302, 209184, 209367, 209251, 209389, 209311, 209430, 209321, 209570, 209262, 209212, 209546, 209216, 209257, 209198, 209496, 209442, 209286, 209555, 209221, 209343, 209245, 209338, 209324, 209568, 209252, 209567, 204352, 209191, 209229, 209525, 209196, 209306, 209266, 209304, 209391, 253493, 209556, 209505, 209176, 209313, 209264, 209403, 188062, 209572, 209483, 209527, 209529, 197227, 209379, 209513, 209482, 209470, 209253, 209256, 209190, 209466, 209413, 209226, 180735, 209471, 209261, 209268, 209559, 209421, 209199, 209427, 209225, 209488, 180879, 209272, 209561, 209414, 209254, 209202, 209354, 209231, 209182, 209357, 209339, 209201, 190640, 209503, 209457, 209281, 209356, 209227, 209526, 209318, 209390, 209219, 209370, 209255, 228221, 180730, 209569, 209517, 209519, 209189, 209392, 209415, 209352, 173349, 209267, 209305, 209332, 209518, 209562, 209329, 209344, 238907, 209521, 209374, 209537, 209269, 209479, 239359, 209210, 193739, 209194, 209358, 209468, 209187, 209459, 209177, 209440, 209452, 209563, 209277, 209193, 209278, 209180, 209510, 203802, 180822, 209425, 209284, 209241, 209250, 209235, 209195, 209307, 209398, 209207, 209243, 209279, 209309, 209228, 209434, 209298, 209423, 209396, 209365, 209260, 209314, 209319, 209460, 209520, 209259, 209512, 209220, 209435, 209333, 209412, 209308, 209322, 209186, 209316, 209323, 190639, 209484, 209538, 209327, 209233, 209441, 209232, 209312, 209422, 209456, 209331, 209497, 209265, 209416, 209462, 209315, 209469, 209475, 209179, 209188, 209464, 209270, 209206, 209183, 209211, 209360, 209325, 209181, 209203, 209418, 209271, 209326) UNION ALL ( select distinct sol.id as record, 3848, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 46 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209381, 209446, 209447, 209276, 209382, 209282, 209320, 209209, 209380, 209393, 209560, 209362, 209280, 209330, 209247, 209451, 209328, 209472, 209509, 209192, 209493, 209197, 209273, 209317, 209372, 209515, 209514, 197276, 209214, 209436, 209507, 209244, 209494, 209485, 209378, 209238, 209242, 209424, 209433, 209565, 209495, 209239, 179976, 209174, 209299, 209491, 202387, 209236, 209342, 209571, 209335, 209173, 209566, 209346, 209501, 209178, 209234, 209473, 209185, 209524, 209506, 209258, 193763, 209334, 209487, 209172, 209573, 209480, 209511, 209200, 209347, 193768, 209437, 209545, 209554, 209558, 209345, 209310, 209474, 209492, 209384, 209263, 209175, 209340, 209359, 209438, 209516, 209303, 209502, 209439, 209230, 209361, 173241, 209246, 209528, 209366, 209302, 209184, 209367, 209251, 209389, 209311, 209430, 209321, 209570, 209262, 209212, 209546, 209216, 209257, 209198, 209496, 209442, 209286, 209555, 209221, 209343, 209245, 209338, 209324, 209568, 209252, 209567, 204352, 209191, 209229, 209525, 209196, 209306, 209266, 209304, 209391, 253493, 209556, 209505, 209176, 209313, 209264, 209403, 188062, 209572, 209483, 209527, 209529, 197227, 209379, 209513, 209482, 209470, 209253, 209256, 209190, 209466, 209413, 209226, 180735, 209471, 209261, 209268, 209559, 209421, 209199, 209427, 209225, 209488, 180879, 209272, 209561, 209414, 209254, 209202, 209354, 209231, 209182, 209357, 209339, 209201, 190640, 209503, 209457, 209281, 209356, 209227, 209526, 209318, 209390, 209219, 209370, 209255, 228221, 180730, 209569, 209517, 209519, 209189, 209392, 209415, 209352, 173349, 209267, 209305, 209332, 209518, 209562, 209329, 209344, 238907, 209521, 209374, 209537, 209269, 209479, 239359, 209210, 193739, 209194, 209358, 209468, 209187, 209459, 209177, 209440, 209452, 209563, 209277, 209193, 209278, 209180, 209510, 203802, 180822, 209425, 209284, 209241, 209250, 209235, 209195, 209307, 209398, 209207, 209243, 209279, 209309, 209228, 209434, 209298, 209423, 209396, 209365, 209260, 209314, 209319, 209460, 209520, 209259, 209512, 209220, 209435, 209333, 209412, 209308, 209322, 209186, 209316, 209323, 190639, 209484, 209538, 209327, 209233, 209441, 209232, 209312, 209422, 209456, 209331, 209497, 209265, 209416, 209462, 209315, 209469, 209475, 209179, 209188, 209464, 209270, 209206, 209183, 209211, 209360, 209325, 209181, 209203, 209418, 209271, 209326)) UNION ALL ( select distinct sm.id as record, 3848, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 46 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209381, 209446, 209447, 209276, 209382, 209282, 209320, 209209, 209380, 209393, 209560, 209362, 209280, 209330, 209247, 209451, 209328, 209472, 209509, 209192, 209493, 209197, 209273, 209317, 209372, 209515, 209514, 197276, 209214, 209436, 209507, 209244, 209494, 209485, 209378, 209238, 209242, 209424, 209433, 209565, 209495, 209239, 179976, 209174, 209299, 209491, 202387, 209236, 209342, 209571, 209335, 209173, 209566, 209346, 209501, 209178, 209234, 209473, 209185, 209524, 209506, 209258, 193763, 209334, 209487, 209172, 209573, 209480, 209511, 209200, 209347, 193768, 209437, 209545, 209554, 209558, 209345, 209310, 209474, 209492, 209384, 209263, 209175, 209340, 209359, 209438, 209516, 209303, 209502, 209439, 209230, 209361, 173241, 209246, 209528, 209366, 209302, 209184, 209367, 209251, 209389, 209311, 209430, 209321, 209570, 209262, 209212, 209546, 209216, 209257, 209198, 209496, 209442, 209286, 209555, 209221, 209343, 209245, 209338, 209324, 209568, 209252, 209567, 204352, 209191, 209229, 209525, 209196, 209306, 209266, 209304, 209391, 253493, 209556, 209505, 209176, 209313, 209264, 209403, 188062, 209572, 209483, 209527, 209529, 197227, 209379, 209513, 209482, 209470, 209253, 209256, 209190, 209466, 209413, 209226, 180735, 209471, 209261, 209268, 209559, 209421, 209199, 209427, 209225, 209488, 180879, 209272, 209561, 209414, 209254, 209202, 209354, 209231, 209182, 209357, 209339, 209201, 190640, 209503, 209457, 209281, 209356, 209227, 209526, 209318, 209390, 209219, 209370, 209255, 228221, 180730, 209569, 209517, 209519, 209189, 209392, 209415, 209352, 173349, 209267, 209305, 209332, 209518, 209562, 209329, 209344, 238907, 209521, 209374, 209537, 209269, 209479, 239359, 209210, 193739, 209194, 209358, 209468, 209187, 209459, 209177, 209440, 209452, 209563, 209277, 209193, 209278, 209180, 209510, 203802, 180822, 209425, 209284, 209241, 209250, 209235, 209195, 209307, 209398, 209207, 209243, 209279, 209309, 209228, 209434, 209298, 209423, 209396, 209365, 209260, 209314, 209319, 209460, 209520, 209259, 209512, 209220, 209435, 209333, 209412, 209308, 209322, 209186, 209316, 209323, 190639, 209484, 209538, 209327, 209233, 209441, 209232, 209312, 209422, 209456, 209331, 209497, 209265, 209416, 209462, 209315, 209469, 209475, 209179, 209188, 209464, 209270, 209206, 209183, 209211, 209360, 209325, 209181, 209203, 209418, 209271, 209326))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3848, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 46);[ Date: 2024-03-02 04:53:08 ]
15 13s139ms COPY public.account_move (id, access_token, message_main_attachment_id, name, date, ref, narration, state, posted_before, move_type, to_check, journal_id, company_id, currency_id, partner_id, commercial_partner_id, is_move_sent, partner_bank_id, payment_reference, payment_id, statement_line_id, amount_untaxed, amount_tax, amount_total, amount_residual, amount_untaxed_signed, amount_tax_signed, amount_total_signed, amount_residual_signed, payment_state, tax_cash_basis_rec_id, tax_cash_basis_move_id, auto_post, reversed_entry_id, fiscal_position_id, invoice_user_id, invoice_date, invoice_date_due, invoice_origin, invoice_payment_term_id, invoice_incoterm_id, qr_code_method, invoice_source_email, invoice_partner_display_name, invoice_cash_rounding_id, secure_sequence_number, inalterable_hash, sequence_prefix, sequence_number, create_uid, create_date, write_uid, write_date, payment_state_before_switch, duplicated_vendor_ref, extract_state, extract_status_code, extract_remote_id, transfer_model_id, tax_closing_end_date, tax_report_control_error, asset_id, asset_remaining_value, asset_depreciated_value, asset_manually_modified, asset_value_change, campaign_id, source_id, medium_id, team_id, partner_shipping_id, stock_move_id, preferred_payment_method_id, website_id, branch_id, branch_name, invoice_action, sign_amount_total, sign_amount_residual, sign_amount_untaxed, invoice_part_id, invoice_product_qty, balance_entry, to_check_negative, non_inventory_entry, direct_order, warranty_invoice, email_send_eod, email_sent, order_type, carrier_id, release_to_pay, release_to_pay_manual, force_release_to_pay, invoice_origin_new, debit_origin_id, paid_by_vc, payment_details, expense_choice, edi_810_id, cash_tendered, change_amount, sequence_generated, open_invoice, edi_split_lock, edi_billed, is_edi_bill, payment_details_compute, edi_done_date, partner_address_type, from_ar, auto_reconcile, related_payment_id, discount_amount_applied) TO stdout;[ Date: 2024-03-02 09:00:19 ]
16 11s605ms COPY public.sale_order_line (id, order_id, name, sequence, invoice_status, price_unit, price_subtotal, price_tax, price_total, price_reduce, price_reduce_taxinc, price_reduce_taxexcl, discount, product_id, product_uom_qty, product_uom, qty_delivered_method, qty_delivered, qty_delivered_manual, qty_to_invoice, qty_invoiced, untaxed_amount_invoiced, untaxed_amount_to_invoice, salesman_id, currency_id, company_id, order_partner_id, is_expense, is_downpayment, state, customer_lead, display_type, create_uid, create_date, write_uid, write_date, product_packaging, route_id, project_id, task_id, is_service, linked_line_id, warning_stock, margin, margin_percent, purchase_price, is_delivery, so_line_id, return_rule_skiped, move_options, core_qty, core_bank_transaction, rebate_amount, is_visible_in_report, is_call_for_price_prod, open_qty_fil_moved0, core_sol_id, core_bank_id, product_pricelist_item_id, branch_id, open_qty_fil_moved1, open_qty_fil_moved2, open_qty_fil_moved3, open_qty_fil_moved4, tick, open_qty_fil_moved5, open_qty_fil_moved6, open_qty_fil_moved7, open_qty_fil_moved8, open_qty_fil_moved9, open_qty_fil_moved10, open_qty_fil_moved11, open_qty_fil_moved12, open_qty_fil_moved13, open_qty_fil_moved14, open_qty_fil, exception_sale, manual_price_changed, cus_date_order, cus_user_id, cus_part_route, is_legacy, inventory_vendor_id, warehouse_id, original_price, is_core) TO stdout;[ Date: 2024-03-02 09:13:55 ]
17 11s562ms with data as ( select distinct shl.id as record, 3841, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 38 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (184051, 187659, 239056, 215685, 205015, 193113, 193222, 193529, 193272, 193111, 193109, 193170, 262494, 179972, 247333, 198187, 202388, 190639, 180822, 215413, 218722, 240896, 179400, 248947, 193114, 189237, 179406, 240724, 247338, 247337, 179402, 212760, 193717, 177435, 195790, 253712, 183366, 247331, 239135, 183353, 180735, 197269, 228221, 253709, 198585, 189250, 173641, 247340, 190963, 193569, 173241, 193055, 179973, 179980, 204562, 253481, 208960, 179416, 188954, 239344, 193120, 187678, 260655, 239179, 247335, 215301, 239148, 179405, 239127, 187724, 197277, 227968, 247332, 239142, 179417, 206454, 181401, 179978, 179977, 199634, 190990) UNION ALL ( select distinct sol.id as record, 3841, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 38 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (184051, 187659, 239056, 215685, 205015, 193113, 193222, 193529, 193272, 193111, 193109, 193170, 262494, 179972, 247333, 198187, 202388, 190639, 180822, 215413, 218722, 240896, 179400, 248947, 193114, 189237, 179406, 240724, 247338, 247337, 179402, 212760, 193717, 177435, 195790, 253712, 183366, 247331, 239135, 183353, 180735, 197269, 228221, 253709, 198585, 189250, 173641, 247340, 190963, 193569, 173241, 193055, 179973, 179980, 204562, 253481, 208960, 179416, 188954, 239344, 193120, 187678, 260655, 239179, 247335, 215301, 239148, 179405, 239127, 187724, 197277, 227968, 247332, 239142, 179417, 206454, 181401, 179978, 179977, 199634, 190990)) UNION ALL ( select distinct sm.id as record, 3841, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 38 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (184051, 187659, 239056, 215685, 205015, 193113, 193222, 193529, 193272, 193111, 193109, 193170, 262494, 179972, 247333, 198187, 202388, 190639, 180822, 215413, 218722, 240896, 179400, 248947, 193114, 189237, 179406, 240724, 247338, 247337, 179402, 212760, 193717, 177435, 195790, 253712, 183366, 247331, 239135, 183353, 180735, 197269, 228221, 253709, 198585, 189250, 173641, 247340, 190963, 193569, 173241, 193055, 179973, 179980, 204562, 253481, 208960, 179416, 188954, 239344, 193120, 187678, 260655, 239179, 247335, 215301, 239148, 179405, 239127, 187724, 197277, 227968, 247332, 239142, 179417, 206454, 181401, 179978, 179977, 199634, 190990))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3841, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 38);[ Date: 2024-03-02 04:05:40 ]
18 11s416ms update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);[ Date: 2024-03-02 14:50:51 ]
19 11s316ms SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 171891)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3849)) ORDER BY "item_list_line"."id" LIMIT 1;[ Date: 2024-03-02 10:34:09 ]
20 11s119ms with data as ( select distinct shl.id as record, 3842, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 39 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (198568, 180735, 209278, 216280, 216281, 193529, 203301, 203294, 260655, 209212, 245176, 209546, 181323, 198537, 213402, 209391, 216813, 209567, 209338, 209221, 209252, 209266, 209245, 209483, 209306, 183604, 209343, 209324, 209403, 209196, 209313, 209286, 209496, 239482, 209442, 209505, 209211, 209389, 209191, 209568, 184023, 209556, 220949, 199231, 209525, 173241, 177857, 227985, 209304, 209572, 209198, 209184, 209555, 178241, 209321, 209229, 209528, 209437, 209447, 209345, 178533, 178534, 209367, 209263, 209175, 209558, 209430, 209246, 209511, 180257, 209251, 209502, 209527, 209361, 209366, 209474, 215776, 209439, 209545, 209302, 209262, 209311, 209310, 209529, 209570, 209446, 209347, 250585, 209303, 209359, 209473, 209438, 209340, 209384, 180513, 209495, 209242, 209573, 209516, 209492, 209565, 209433, 209381, 209224, 209239, 209501, 239369, 209487, 209173, 209178, 209334, 209554, 209185, 209472, 209172, 209234, 209346, 198437, 209192, 209464, 209342, 209247, 209509, 209200, 181401, 181415, 209524, 209480, 209244, 209494, 202577, 187918, 209238, 209491, 209328, 209436, 204977, 209493, 209335, 209330, 209451, 209258, 209236, 209506, 209424, 209393, 190593, 209320, 209566, 209515, 209485, 209380, 209372, 209571, 209214, 173229, 209378, 245175, 209209, 209317, 209507, 209560, 178317, 209273, 209280, 181065, 197276, 209362, 209299, 209174, 209416, 209514, 209197, 209325, 209315, 209462, 209327, 209469, 209326, 180249, 217978, 209316, 209441, 209271, 209308, 209331, 209183, 209179, 209435, 209497, 209422, 209323, 209265, 209312, 209360, 209475, 180440, 209233, 209538, 209322, 209333, 209188, 209220, 209232, 209484, 209512, 209186, 209180, 209270, 209456, 209460, 209365, 190087, 213280, 209423, 209374, 209207, 209355, 209259, 209243, 209353, 209279, 209309, 209177, 209510, 181063, 209358, 209434, 209398, 209459, 209314, 209319, 209520, 209468, 209241, 209277, 209194, 209193, 209425, 209187, 180491, 209452, 209260, 209228, 209307, 209235, 209206, 209563, 209250, 209284, 209440, 209412, 209181, 209562, 209298, 209396, 198565, 209357, 180516, 209521, 209276, 209418, 209318, 209210, 209352, 209503, 209255, 209390, 209370, 209356, 228221, 209227, 209517, 195667, 209267, 209332, 209457, 209182, 209231, 209519, 209392, 209219, 209479, 209569, 209189, 209305, 209269, 209281, 209339, 209537, 209518, 198580, 209202, 261167, 209526, 209344, 209201, 209329, 239345, 209415, 209354, 209414, 209471, 209559, 177379, 209466, 250012, 180207, 209253, 209199, 209488, 209282, 209561, 174030, 209421, 209256, 209190, 209261, 189866, 209268, 209225, 209470, 209513, 209482, 209272, 209254, 209257, 209427, 209176, 209379, 209264, 207578, 209230, 209203, 209413, 209226, 197240, 209216, 209382, 209195, 181365) UNION ALL ( select distinct sol.id as record, 3842, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 39 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (198568, 180735, 209278, 216280, 216281, 193529, 203301, 203294, 260655, 209212, 245176, 209546, 181323, 198537, 213402, 209391, 216813, 209567, 209338, 209221, 209252, 209266, 209245, 209483, 209306, 183604, 209343, 209324, 209403, 209196, 209313, 209286, 209496, 239482, 209442, 209505, 209211, 209389, 209191, 209568, 184023, 209556, 220949, 199231, 209525, 173241, 177857, 227985, 209304, 209572, 209198, 209184, 209555, 178241, 209321, 209229, 209528, 209437, 209447, 209345, 178533, 178534, 209367, 209263, 209175, 209558, 209430, 209246, 209511, 180257, 209251, 209502, 209527, 209361, 209366, 209474, 215776, 209439, 209545, 209302, 209262, 209311, 209310, 209529, 209570, 209446, 209347, 250585, 209303, 209359, 209473, 209438, 209340, 209384, 180513, 209495, 209242, 209573, 209516, 209492, 209565, 209433, 209381, 209224, 209239, 209501, 239369, 209487, 209173, 209178, 209334, 209554, 209185, 209472, 209172, 209234, 209346, 198437, 209192, 209464, 209342, 209247, 209509, 209200, 181401, 181415, 209524, 209480, 209244, 209494, 202577, 187918, 209238, 209491, 209328, 209436, 204977, 209493, 209335, 209330, 209451, 209258, 209236, 209506, 209424, 209393, 190593, 209320, 209566, 209515, 209485, 209380, 209372, 209571, 209214, 173229, 209378, 245175, 209209, 209317, 209507, 209560, 178317, 209273, 209280, 181065, 197276, 209362, 209299, 209174, 209416, 209514, 209197, 209325, 209315, 209462, 209327, 209469, 209326, 180249, 217978, 209316, 209441, 209271, 209308, 209331, 209183, 209179, 209435, 209497, 209422, 209323, 209265, 209312, 209360, 209475, 180440, 209233, 209538, 209322, 209333, 209188, 209220, 209232, 209484, 209512, 209186, 209180, 209270, 209456, 209460, 209365, 190087, 213280, 209423, 209374, 209207, 209355, 209259, 209243, 209353, 209279, 209309, 209177, 209510, 181063, 209358, 209434, 209398, 209459, 209314, 209319, 209520, 209468, 209241, 209277, 209194, 209193, 209425, 209187, 180491, 209452, 209260, 209228, 209307, 209235, 209206, 209563, 209250, 209284, 209440, 209412, 209181, 209562, 209298, 209396, 198565, 209357, 180516, 209521, 209276, 209418, 209318, 209210, 209352, 209503, 209255, 209390, 209370, 209356, 228221, 209227, 209517, 195667, 209267, 209332, 209457, 209182, 209231, 209519, 209392, 209219, 209479, 209569, 209189, 209305, 209269, 209281, 209339, 209537, 209518, 198580, 209202, 261167, 209526, 209344, 209201, 209329, 239345, 209415, 209354, 209414, 209471, 209559, 177379, 209466, 250012, 180207, 209253, 209199, 209488, 209282, 209561, 174030, 209421, 209256, 209190, 209261, 189866, 209268, 209225, 209470, 209513, 209482, 209272, 209254, 209257, 209427, 209176, 209379, 209264, 207578, 209230, 209203, 209413, 209226, 197240, 209216, 209382, 209195, 181365)) UNION ALL ( select distinct sm.id as record, 3842, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 39 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (198568, 180735, 209278, 216280, 216281, 193529, 203301, 203294, 260655, 209212, 245176, 209546, 181323, 198537, 213402, 209391, 216813, 209567, 209338, 209221, 209252, 209266, 209245, 209483, 209306, 183604, 209343, 209324, 209403, 209196, 209313, 209286, 209496, 239482, 209442, 209505, 209211, 209389, 209191, 209568, 184023, 209556, 220949, 199231, 209525, 173241, 177857, 227985, 209304, 209572, 209198, 209184, 209555, 178241, 209321, 209229, 209528, 209437, 209447, 209345, 178533, 178534, 209367, 209263, 209175, 209558, 209430, 209246, 209511, 180257, 209251, 209502, 209527, 209361, 209366, 209474, 215776, 209439, 209545, 209302, 209262, 209311, 209310, 209529, 209570, 209446, 209347, 250585, 209303, 209359, 209473, 209438, 209340, 209384, 180513, 209495, 209242, 209573, 209516, 209492, 209565, 209433, 209381, 209224, 209239, 209501, 239369, 209487, 209173, 209178, 209334, 209554, 209185, 209472, 209172, 209234, 209346, 198437, 209192, 209464, 209342, 209247, 209509, 209200, 181401, 181415, 209524, 209480, 209244, 209494, 202577, 187918, 209238, 209491, 209328, 209436, 204977, 209493, 209335, 209330, 209451, 209258, 209236, 209506, 209424, 209393, 190593, 209320, 209566, 209515, 209485, 209380, 209372, 209571, 209214, 173229, 209378, 245175, 209209, 209317, 209507, 209560, 178317, 209273, 209280, 181065, 197276, 209362, 209299, 209174, 209416, 209514, 209197, 209325, 209315, 209462, 209327, 209469, 209326, 180249, 217978, 209316, 209441, 209271, 209308, 209331, 209183, 209179, 209435, 209497, 209422, 209323, 209265, 209312, 209360, 209475, 180440, 209233, 209538, 209322, 209333, 209188, 209220, 209232, 209484, 209512, 209186, 209180, 209270, 209456, 209460, 209365, 190087, 213280, 209423, 209374, 209207, 209355, 209259, 209243, 209353, 209279, 209309, 209177, 209510, 181063, 209358, 209434, 209398, 209459, 209314, 209319, 209520, 209468, 209241, 209277, 209194, 209193, 209425, 209187, 180491, 209452, 209260, 209228, 209307, 209235, 209206, 209563, 209250, 209284, 209440, 209412, 209181, 209562, 209298, 209396, 198565, 209357, 180516, 209521, 209276, 209418, 209318, 209210, 209352, 209503, 209255, 209390, 209370, 209356, 228221, 209227, 209517, 195667, 209267, 209332, 209457, 209182, 209231, 209519, 209392, 209219, 209479, 209569, 209189, 209305, 209269, 209281, 209339, 209537, 209518, 198580, 209202, 261167, 209526, 209344, 209201, 209329, 239345, 209415, 209354, 209414, 209471, 209559, 177379, 209466, 250012, 180207, 209253, 209199, 209488, 209282, 209561, 174030, 209421, 209256, 209190, 209261, 189866, 209268, 209225, 209470, 209513, 209482, 209272, 209254, 209257, 209427, 209176, 209379, 209264, 207578, 209230, 209203, 209413, 209226, 197240, 209216, 209382, 209195, 181365))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3842, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 39);[ Date: 2024-03-02 04:11:22 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 8h4m57s 31,423 771ms 4s274ms 926ms select date_part(?, invoice_date) as year, date_part(?, invoice_date) as month, date_part(?, invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = ? and item_demand_plan_id = ? group by product_id, date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date) order by date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date);Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Mar 02 04 333 4m29s 809ms 05 1,423 22m11s 935ms 06 2,216 30m50s 835ms 07 1,974 27m18s 830ms 08 2,446 37m38s 923ms 09 2,508 39m38s 948ms 10 2,763 45m8s 980ms 11 3,754 1h5m5s 1s40ms 12 4,561 1h19m48s 1s49ms 13 2,554 38m12s 897ms 14 1,932 26m41s 829ms 15 2,222 30m49s 832ms 16 1,896 25m52s 818ms 17 841 11m12s 799ms -
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 175081 and item_demand_plan_id = 3843 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 10:35:24 Duration: 4s274ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 187824 and item_demand_plan_id = 3841 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 09:17:10 Duration: 4s100ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 184335 and item_demand_plan_id = 3841 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 09:07:20 Duration: 4s23ms
2 1h4m7s 2,434 1s45ms 11s316ms 1s580ms select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Mar 02 08 331 8m23s 1s521ms 09 382 8m34s 1s346ms 10 627 17m32s 1s678ms 11 662 17m23s 1s576ms 12 432 12m13s 1s698ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 171891)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3849)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 10:34:09 Duration: 11s316ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 195667)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3843)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 11:30:14 Duration: 10s588ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 171768)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3849)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 10:32:26 Duration: 8s42ms
3 48m18s 1,107 2s455ms 4s273ms 2s618ms update item_list_line set method = ?, min_product_len_1 = ?, min_product_len_2 = ?, min_baseline_size = ?, seasonal_period = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Mar 02 04 22 56s683ms 2s576ms 05 1,085 47m21s 2s618ms -
update item_list_line set method = 2, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 239148 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:01 Duration: 4s273ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 242173 and item_demand_plan_id = 3849;
Date: 2024-03-02 05:20:31 Duration: 4s35ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 239208 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:25 Duration: 3s969ms
4 47m46s 1,162 2s373ms 3s267ms 2s467ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Mar 02 03 1 2s433ms 2s433ms 04 1,030 42m14s 2s460ms 05 131 5m30s 2s520ms -
update item_list_line set product_id = 248698, supercede_product_id = 216679, superceded = True where product_id = 216679 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:06:28 Duration: 3s267ms
-
update item_list_line set product_id = 172998, supercede_product_id = 172991, superceded = True where product_id = 172991 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:03:40 Duration: 2s904ms
-
update item_list_line set product_id = 216703, supercede_product_id = 216702, superceded = True where product_id = 216702 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:06:31 Duration: 2s882ms
5 31m20s 9,223 120ms 991ms 203ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Mar 02 00 42 12s789ms 304ms 01 78 24s930ms 319ms 02 40 9s525ms 238ms 03 22 6s551ms 297ms 04 167 33s62ms 197ms 05 690 2m9s 187ms 06 273 41s734ms 152ms 07 315 1m15s 238ms 08 699 2m1s 173ms 09 918 2m57s 193ms 10 1,045 3m28s 199ms 11 1,420 4m49s 203ms 12 1,724 6m10s 215ms 13 617 2m4s 201ms 14 304 58s74ms 191ms 15 322 1m2s 193ms 16 211 37s34ms 175ms 17 124 33s300ms 268ms 18 45 13s945ms 309ms 19 71 21s613ms 304ms 21 45 14s184ms 315ms 22 37 10s443ms 282ms 23 14 4s190ms 299ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 10:18:12') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_2"', '["pointspring_master","calendar.alarm",3]', '["pointspring_master","mail.channel",2]', '["pointspring_master","mail.channel",3]', '["pointspring_master","mail.channel",6]', '["pointspring_master","mail.channel",17]', '["pointspring_master","mail.channel",18]', '["pointspring_master","mail.channel",19]', '["pointspring_master","mail.channel",20]', '["pointspring_master","mail.channel",21]', '["pointspring_master","mail.channel",22]', '["pointspring_master","mail.channel",23]', '["pointspring_master","mail.channel",24]', '["pointspring_master","mail.channel",25]', '["pointspring_master","mail.channel",26]', '["pointspring_master","mail.channel",27]', '["pointspring_master","mail.channel",28]', '["pointspring_master","mail.channel",29]', '["pointspring_master","mail.channel",30]', '["pointspring_master","mail.channel",31]', '["pointspring_master","mail.channel",32]', '["pointspring_master","mail.channel",33]', '["pointspring_master","mail.channel",34]', '["pointspring_master","mail.channel",35]', '["pointspring_master","mail.channel",36]', '["pointspring_master","mail.channel",37]', '["pointspring_master","mail.channel",38]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",41]', '["pointspring_master","mail.channel",42]', '["pointspring_master","mail.channel",43]', '["pointspring_master","mail.channel",44]', '["pointspring_master","mail.channel",45]', '["pointspring_master","mail.channel",46]', '["pointspring_master","mail.channel",47]', '["pointspring_master","mail.channel",48]', '["pointspring_master","mail.channel",49]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",51]', '["pointspring_master","mail.channel",52]', '["pointspring_master","mail.channel",53]', '["pointspring_master","mail.channel",54]', '["pointspring_master","mail.channel",55]', '["pointspring_master","mail.channel",56]', '["pointspring_master","mail.channel",57]', '["pointspring_master","mail.channel",58]', '["pointspring_master","mail.channel",59]', '["pointspring_master","mail.channel",60]', '["pointspring_master","mail.channel",61]', '["pointspring_master","mail.channel",62]', '["pointspring_master","mail.channel",63]', '["pointspring_master","mail.channel",64]', '["pointspring_master","mail.channel",66]', '["pointspring_master","mail.channel",67]', '["pointspring_master","mail.channel",68]', '["pointspring_master","mail.channel",69]', '["pointspring_master","mail.channel",70]', '["pointspring_master","mail.channel",71]', '["pointspring_master","mail.channel",72]', '["pointspring_master","mail.channel",73]', '["pointspring_master","mail.channel",74]', '["pointspring_master","mail.channel",75]', '["pointspring_master","mail.channel",76]', '["pointspring_master","mail.channel",77]', '["pointspring_master","mail.channel",78]', '["pointspring_master","mail.channel",79]', '["pointspring_master","mail.channel",80]', '["pointspring_master","mail.channel",81]', '["pointspring_master","mail.channel",82]', '["pointspring_master","mail.channel",83]', '["pointspring_master","mail.channel",84]', '["pointspring_master","mail.channel",85]', '["pointspring_master","mail.channel",86]', '["pointspring_master","mail.channel",87]', '["pointspring_master","mail.channel",88]', '["pointspring_master","mail.channel",89]', '["pointspring_master","mail.channel",90]', '["pointspring_master","mail.channel",91]', '["pointspring_master","mail.channel",92]', '["pointspring_master","mail.channel",93]', '["pointspring_master","mail.channel",94]', '["pointspring_master","mail.channel",95]', '["pointspring_master","mail.channel",96]', '["pointspring_master","mail.channel",97]', '["pointspring_master","mail.channel",98]', '["pointspring_master","mail.channel",99]', '["pointspring_master","mail.channel",100]', '["pointspring_master","mail.channel",101]', '["pointspring_master","mail.channel",102]', '["pointspring_master","mail.channel",103]', '["pointspring_master","mail.channel",104]', '["pointspring_master","mail.channel",105]', '["pointspring_master","mail.channel",106]', '["pointspring_master","mail.channel",107]', '["pointspring_master","mail.channel",108]', '["pointspring_master","mail.channel",109]', '["pointspring_master","mail.channel",110]', '["pointspring_master","mail.channel",111]', '["pointspring_master","mail.channel",112]', '["pointspring_master","mail.channel",113]', '["pointspring_master","mail.channel",114]', '["pointspring_master","mail.channel",115]', '["pointspring_master","mail.channel",116]', '["pointspring_master","mail.channel",117]', '["pointspring_master","mail.channel",118]', '["pointspring_master","mail.channel",119]', '["pointspring_master","mail.channel",120]', '["pointspring_master","mail.channel",121]', '["pointspring_master","mail.channel",122]', '["pointspring_master","mail.channel",123]', '["pointspring_master","mail.channel",124]', '["pointspring_master","mail.channel",125]', '["pointspring_master","mail.channel",126]', '["pointspring_master","mail.channel",127]', '["pointspring_master","mail.channel",128]', '["pointspring_master","mail.channel",129]', '["pointspring_master","mail.channel",130]', '["pointspring_master","mail.channel",131]', '["pointspring_master","mail.channel",132]', '["pointspring_master","mail.channel",133]', '["pointspring_master","mail.channel",134]', '["pointspring_master","mail.channel",135]', '["pointspring_master","mail.channel",136]', '["pointspring_master","mail.channel",137]', '["pointspring_master","mail.channel",138]', '["pointspring_master","mail.channel",139]', '["pointspring_master","mail.channel",141]', '["pointspring_master","mail.channel",142]', '["pointspring_master","mail.channel",143]', '["pointspring_master","mail.channel",144]', '["pointspring_master","mail.channel",145]', '["pointspring_master","mail.channel",146]', '["pointspring_master","mail.channel",147]', '["pointspring_master","mail.channel",148]', '["pointspring_master","mail.channel",149]', '["pointspring_master","mail.channel",150]', '["pointspring_master","mail.channel",151]', '["pointspring_master","mail.channel",152]', '["pointspring_master","mail.channel",153]', '["pointspring_master","mail.channel",154]', '["pointspring_master","mail.channel",155]', '["pointspring_master","mail.channel",156]', '["pointspring_master","mail.channel",157]', '["pointspring_master","mail.channel",158]', '["pointspring_master","mail.channel",159]', '["pointspring_master","mail.channel",160]', '["pointspring_master","mail.channel",161]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","mail.channel",168]', '["pointspring_master","mail.channel",169]', '["pointspring_master","mail.channel",170]', '["pointspring_master","mail.channel",171]', '["pointspring_master","mail.channel",172]', '["pointspring_master","mail.channel",173]', '["pointspring_master","mail.channel",174]', '["pointspring_master","mail.channel",175]', '["pointspring_master","mail.channel",176]', '["pointspring_master","mail.channel",177]', '["pointspring_master","mail.channel",178]', '["pointspring_master","mail.channel",179]', '["pointspring_master","mail.channel",180]', '["pointspring_master","mail.channel",181]', '["pointspring_master","mail.channel",182]', '["pointspring_master","mail.channel",183]', '["pointspring_master","mail.channel",184]', '["pointspring_master","mail.channel",185]', '["pointspring_master","mail.channel",186]', '["pointspring_master","mail.channel",187]', '["pointspring_master","mail.channel",188]', '["pointspring_master","mail.channel",189]', '["pointspring_master","mail.channel",190]', '["pointspring_master","mail.channel",191]', '["pointspring_master","mail.channel",192]', '["pointspring_master","mail.channel",193]', '["pointspring_master","mail.channel",194]', '["pointspring_master","mail.channel",195]', '["pointspring_master","mail.channel",196]', '["pointspring_master","mail.channel",197]', '["pointspring_master","mail.channel",198]', '["pointspring_master","mail.channel",199]', '["pointspring_master","mail.channel",200]', '["pointspring_master","mail.channel",201]', '["pointspring_master","mail.channel",202]', '["pointspring_master","mail.channel",234]', '["pointspring_master","mail.channel",235]', '["pointspring_master","mail.channel",236]', '["pointspring_master","mail.channel",237]', '["pointspring_master","mail.channel",238]', '["pointspring_master","mail.channel",239]', '["pointspring_master","mail.channel",240]', '["pointspring_master","mail.channel",241]', '["pointspring_master","mail.channel",242]', '["pointspring_master","mail.channel",243]', '["pointspring_master","mail.channel",244]', '["pointspring_master","mail.channel",245]', '["pointspring_master","mail.channel",249]', '["pointspring_master","mail.channel",250]', '["pointspring_master","mail.channel",251]', '["pointspring_master","mail.channel",318]', '["pointspring_master","mail.channel",319]', '["pointspring_master","mail.channel",320]', '["pointspring_master","mail.channel",321]', '["pointspring_master","mail.channel",322]', '["pointspring_master","mail.channel",323]', '["pointspring_master","mail.channel",324]', '["pointspring_master","mail.channel",325]', '["pointspring_master","mail.channel",326]', '["pointspring_master","mail.channel",327]', '["pointspring_master","mail.channel",328]', '["pointspring_master","mail.channel",331]', '["pointspring_master","mail.channel",332]', '["pointspring_master","mail.channel",333]', '["pointspring_master","mail.channel",334]', '["pointspring_master","mail.channel",335]', '["pointspring_master","mail.channel",345]', '["pointspring_master","mail.channel",419]', '["pointspring_master","mail.channel",420]', '["pointspring_master","mail.channel",421]', '["pointspring_master","mail.channel",445]', '["pointspring_master","mail.channel",446]', '["pointspring_master","mail.channel",447]', '["pointspring_master","mail.channel",492]', '["pointspring_master","mail.channel",493]', '["pointspring_master","mail.channel",494]', '["pointspring_master","mail.channel",598]', '["pointspring_master","res.partner",3]', '["pointspring_master","ir.needaction",3]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 10:19:03 Duration: 991ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 10:18:12') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19575]', '["pointspring_master","mail.channel",56]', '["pointspring_master","mail.channel",57]', '["pointspring_master","mail.channel",58]', '["pointspring_master","mail.channel",65]', '["pointspring_master","mail.channel",504]', '["pointspring_master","mail.channel",605]', '["pointspring_master","res.partner",19575]', '["pointspring_master","ir.needaction",19575]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 10:19:03 Duration: 922ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 13:42:55') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19522]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",329]', '["pointspring_master","mail.channel",330]', '["pointspring_master","mail.channel",422]', '["pointspring_master","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 13:43:46 Duration: 879ms
6 27m26s 11,233 120ms 718ms 146ms with data as ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and item_demand_plan_id = ? and date::date = date ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) select id from data where rnum > ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Mar 02 05 17 2s248ms 132ms 06 476 1m2s 130ms 07 402 52s925ms 131ms 08 838 1m59s 142ms 09 969 2m19s 143ms 10 1,164 2m51s 147ms 11 2,099 5m29s 156ms 12 2,865 7m26s 155ms 13 1,067 2m28s 138ms 14 386 51s186ms 132ms 15 551 1m12s 131ms 16 375 48s876ms 130ms 17 24 3s133ms 130ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 204771 and item_demand_plan_id = 3842 AND date::date = DATE '2024-03-31' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-03-02 11:52:32 Duration: 718ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 216785 and item_demand_plan_id = 3847 AND date::date = DATE '2024-03-31' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-03-02 10:32:55 Duration: 671ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 219148 and item_demand_plan_id = 3846 AND date::date = DATE '2024-03-31' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-03-02 11:42:23 Duration: 651ms
7 14m11s 939 721ms 3s696ms 906ms select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Mar 02 04 305 3m52s 763ms 05 621 10m7s 978ms 07 1 954ms 954ms 08 1 755ms 755ms 13 5 4s271ms 854ms 14 6 5s91ms 848ms -
select id from item_list_line where product_id = 222803 and item_demand_plan_id = 3842;
Date: 2024-03-02 05:18:00 Duration: 3s696ms
-
select id from item_list_line where product_id = 244445 and item_demand_plan_id = 3842;
Date: 2024-03-02 05:18:52 Duration: 3s201ms
-
select id from item_list_line where product_id = 262263 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:29 Duration: 3s57ms
8 9m5s 3,526 120ms 432ms 154ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Mar 02 05 3 369ms 123ms 06 53 6s926ms 130ms 07 44 5s797ms 131ms 08 235 33s521ms 142ms 09 321 44s905ms 139ms 10 399 59s887ms 150ms 11 887 2m23s 162ms 12 1,127 3m8s 166ms 13 296 41s534ms 140ms 14 65 8s415ms 129ms 15 61 7s984ms 130ms 16 32 4s162ms 130ms 17 3 383ms 127ms -
select id, class_code from product_warehouse_inventory where product_id = 216174 and warehouse_id = 37;
Date: 2024-03-02 12:13:56 Duration: 432ms
-
select id, class_code from product_warehouse_inventory where product_id = 185364 and warehouse_id = 38;
Date: 2024-03-02 13:03:05 Duration: 405ms
-
select id, class_code from product_warehouse_inventory where product_id = 204082 and warehouse_id = 41;
Date: 2024-03-02 12:04:01 Duration: 373ms
9 8m24s 406 956ms 3s940ms 1s243ms select distinct ill.product_id from item_list_line as ill left join res_forecast_method as fm on fm.id = ill.method where ill.item_demand_plan_id = ? and ill.method not in (...);Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Mar 02 04 41 41s199ms 1s4ms 05 101 1m59s 1s180ms 07 5 5s163ms 1s32ms 08 43 56s815ms 1s321ms 09 39 54s66ms 1s386ms 10 66 1m29s 1s357ms 11 6 10s797ms 1s799ms 12 21 34s228ms 1s629ms 13 44 47s854ms 1s87ms 14 19 21s902ms 1s152ms 15 8 10s438ms 1s304ms 17 13 13s596ms 1s45ms -
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3847 and ill.method not in (8, 7);
Date: 2024-03-02 12:04:15 Duration: 3s940ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3842 and ill.method not in (8, 7);
Date: 2024-03-02 11:42:46 Duration: 2s664ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3842 and ill.method not in (8, 7);
Date: 2024-03-02 10:35:17 Duration: 2s599ms
10 7m48s 404 852ms 4s277ms 1s159ms select ill.item_demand_plan_id from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where ill.method is null and idp.active = true and ill.item_demand_plan_id = ? group by ill.item_demand_plan_id having count(ill.id) > ?;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Mar 02 04 41 37s658ms 918ms 05 101 1m49s 1s86ms 07 5 4s661ms 932ms 08 42 52s969ms 1s261ms 09 39 48s261ms 1s237ms 10 65 1m18s 1s213ms 11 6 11s634ms 1s939ms 12 21 35s714ms 1s700ms 13 44 49s323ms 1s120ms 14 19 18s979ms 998ms 15 8 8s210ms 1s26ms 17 13 12s304ms 946ms -
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3847 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 11:42:05 Duration: 4s277ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3842 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 12:04:16 Duration: 3s596ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3848 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 12:51:42 Duration: 3s244ms
11 7m36s 404 840ms 4s709ms 1s130ms select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Mar 02 04 41 36s573ms 892ms 05 101 1m46s 1s55ms 07 5 4s839ms 967ms 08 42 50s669ms 1s206ms 09 39 49s194ms 1s261ms 10 65 1m20s 1s240ms 11 6 12s507ms 2s84ms 12 21 32s669ms 1s555ms 13 44 42s275ms 960ms 14 19 19s7ms 1s 15 8 9s279ms 1s159ms 17 13 12s388ms 952ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3847 and active = True;
Date: 2024-03-02 10:33:29 Duration: 4s709ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3847 and active = True;
Date: 2024-03-02 12:04:08 Duration: 4s301ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3849 and active = True;
Date: 2024-03-02 11:04:36 Duration: 3s504ms
12 6m14s 404 730ms 2s621ms 927ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Mar 02 04 41 31s983ms 780ms 05 101 1m31s 906ms 07 5 3s838ms 767ms 08 42 42s343ms 1s8ms 09 39 38s492ms 986ms 10 65 1m4s 998ms 11 6 8s216ms 1s369ms 12 21 22s359ms 1s64ms 13 44 37s715ms 857ms 14 19 15s914ms 837ms 15 8 6s740ms 842ms 17 13 10s626ms 817ms -
select count(id) from item_list_line where item_demand_plan_id = 3851;
Date: 2024-03-02 05:21:28 Duration: 2s621ms
-
select count(id) from item_list_line where item_demand_plan_id = 3840;
Date: 2024-03-02 08:44:56 Duration: 2s575ms
-
select count(id) from item_list_line where item_demand_plan_id = 3849;
Date: 2024-03-02 11:41:25 Duration: 2s407ms
13 5m58s 1 5m58s 5m58s 5m58s 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;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Mar 02 09 1 5m58s 5m58s -
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-03-02 09:11:45 Duration: 5m58s
14 5m37s 2,026 120ms 383ms 166ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."website_sequence" asc, "product_template"."id" desc;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Mar 02 00 1 135ms 135ms 01 1 129ms 129ms 02 1 121ms 121ms 04 8 1s167ms 145ms 05 92 16s70ms 174ms 06 33 4s832ms 146ms 07 19 2s749ms 144ms 08 311 50s583ms 162ms 09 704 1m57s 167ms 10 397 1m6s 166ms 11 120 21s458ms 178ms 12 155 27s543ms 177ms 13 47 7s663ms 163ms 14 58 9s6ms 155ms 15 28 4s354ms 155ms 16 32 4s935ms 154ms 17 10 1s440ms 144ms 18 1 130ms 130ms 19 3 379ms 126ms 20 1 130ms 130ms 22 3 387ms 129ms 23 1 120ms 120ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 11:42:02 Duration: 383ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 09:30:30 Duration: 361ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 09:30:30 Duration: 360ms
15 4m18s 1,683 120ms 565ms 153ms select id from ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and date::date = date ?::timestamp and item_demand_plan_id = ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) t where t.rnum > ?;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Mar 02 08 197 29s214ms 148ms 09 228 33s703ms 147ms 10 415 1m4s 154ms 11 475 1m13s 154ms 12 368 57s997ms 157ms -
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 195924 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 11:31:48 Duration: 565ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 203744 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 11:41:28 Duration: 549ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 218621 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 12:25:44 Duration: 523ms
16 3m59s 1,434 128ms 807ms 167ms select "account_move".id from "account_move" where (("account_move"."edi_810_id" in (...)) and (("account_move"."id" not in (...)) or "account_move"."id" is null)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Mar 02 00 130 18s294ms 140ms 01 130 18s346ms 141ms 02 130 18s741ms 144ms 03 89 12s375ms 139ms 04 130 21s615ms 166ms 05 130 24s126ms 185ms 06 130 21s453ms 165ms 07 87 14s914ms 171ms 08 130 25s53ms 192ms 09 130 25s820ms 198ms 10 130 25s375ms 195ms 11 13 2s527ms 194ms 23 75 10s900ms 145ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46482)) AND (("account_move"."id" not in (1227784)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 08:18:10 Duration: 807ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46466)) AND (("account_move"."id" not in (1123143)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 09:12:06 Duration: 797ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46481)) AND (("account_move"."id" not in (1230701)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 08:18:06 Duration: 780ms
17 3m14s 466 345ms 786ms 418ms 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 #17
Day Hour Count Duration Avg duration Mar 02 00 8 2s814ms 351ms 01 7 2s468ms 352ms 03 18 6s388ms 354ms 04 23 8s831ms 383ms 05 15 5s927ms 395ms 08 68 30s850ms 453ms 09 51 22s214ms 435ms 10 42 20s120ms 479ms 11 17 9s552ms 561ms 12 21 10s300ms 490ms 13 76 28s443ms 374ms 14 56 22s368ms 399ms 15 42 16s347ms 389ms 17 18 6s825ms 379ms 19 4 1s459ms 364ms -
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.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-7eb3f27/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 11:41:18 Duration: 786ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-9ded8a0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 08:51:44 Duration: 765ms
-
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.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-7eb3f27/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 11:42:37 Duration: 750ms
18 2m36s 21 307ms 11s416ms 7s451ms update item_demand_plan set is_start_forecast = false where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where method in (...) and idp.fetch_data_done = true and idp.active = true group by ill.item_demand_plan_id intersect select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = true group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand left join item_demand_plan as idp2 on data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = true);Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Mar 02 04 2 667ms 333ms 05 2 617ms 308ms 07 1 309ms 309ms 08 1 10s136ms 10s136ms 11 2 20s852ms 10s426ms 13 7 1m11s 10s261ms 14 5 51s750ms 10s350ms 18 1 307ms 307ms -
update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);
Date: 2024-03-02 14:50:51 Duration: 11s416ms
-
update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);
Date: 2024-03-02 11:30:16 Duration: 10s593ms
-
update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);
Date: 2024-03-02 13:33:49 Duration: 10s464ms
19 2m11s 413 276ms 616ms 317ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Mar 02 00 17 4s881ms 287ms 01 21 5s913ms 281ms 02 15 4s245ms 283ms 03 27 7s676ms 284ms 04 12 3s366ms 280ms 05 15 5s19ms 334ms 06 54 16s680ms 308ms 07 12 3s648ms 304ms 08 42 14s104ms 335ms 09 21 6s624ms 315ms 10 33 12s799ms 387ms 11 18 7s220ms 401ms 12 21 7s444ms 354ms 13 21 6s863ms 326ms 14 30 9s92ms 303ms 15 15 4s725ms 315ms 16 3 837ms 279ms 17 18 5s80ms 282ms 20 18 5s68ms 281ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 12:20:02 Duration: 616ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 11:22:50 Duration: 608ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 10:36:43 Duration: 602ms
20 2m4s 12 3s924ms 16s916ms 10s413ms with data as ( select distinct shl.id as record, ?, shl.id as ref, ? as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone ?, true from sale_history_line as shl left join stock_warehouse as st on st.branch_id = shl.selling_branch left join product_product as pp on pp.id = shl.product_id left join product_template as pt on pt.id = pp.product_tmpl_id left join product_warehouse_inventory as pwi on pwi.product_id = pp.id left join psd_custom_inventory_vendor as inv on inv.id = pt.inventory_vendor_id where shl.selling_branch = ? and shl.sales_obtain != ? and shl.product_id is not null and shl.exception_sale is not true and pt.never_stock = false and pt.discontinued = false and pt.is_core = false and shl.invoice_date >= ? and shl.invoice_date <= ? and coalesce(pt.active, false) = true and pt.inventory_vendor_id not in (...) and pp.id not in (...) union all ( select distinct sol.id as record, ?, so.id as ref, ? as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone ?, true from sale_order_line sol left join product_product as pp on sol.product_id = pp.id left join product_template as pt on pp.product_tmpl_id = pt.id left join psd_custom_inventory_vendor as inv on inv.id = pt.inventory_vendor_id left join sale_order as so on sol.order_id = so.id left join product_warehouse_inventory as pwi on pwi.product_id = pp.id where sol.branch_id = ? and sol.product_id is not null and sol.exception_sale is not true and pt.never_stock = false and pt.discontinued = false and pt.is_core = false and so.date_order >= ? and so.date_order <= ? and so.state in (...) and coalesce(pt.active, false) = true and pt.inventory_vendor_id not in (...) and pp.id not in (...)) union all ( select distinct sm.id as record, ?, mrp.id as ref, ? as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone ?, true from mrp_production mrp left join stock_move as sm on sm.raw_material_production_id = mrp.id left join product_product as pp on sm.product_id = pp.id left join product_template as pt on pp.product_tmpl_id = pt.id left join psd_custom_inventory_vendor as inv on inv.id = pt.inventory_vendor_id left join product_warehouse_inventory as pwi on pwi.product_id = pp.id where mrp.state = ? and mrp.branch_id = ? and sm.product_id is not null and pt.never_stock = false and pt.discontinued = false and pt.is_core = false and mrp.create_date >= ? and mrp.create_date <= ? and coalesce(pt.active, false) = true and pt.inventory_vendor_id not in (...) and pp.id not in (...))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select ?, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone ?, true from data left join branch_product_method as brpm on brpm.product_id = data.product_id and brpm.branch_id = ?);Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Mar 02 03 1 14s967ms 14s967ms 04 11 1m49s 9s999ms -
with data as ( select distinct shl.id as record, 3847, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 45 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393) UNION ALL ( select distinct sol.id as record, 3847, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 45 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393)) UNION ALL ( select distinct sm.id as record, 3847, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 45 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3847, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 45);
Date: 2024-03-02 04:41:04 Duration: 16s916ms
-
with data as ( select distinct shl.id as record, 3840, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 37 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514) UNION ALL ( select distinct sol.id as record, 3840, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 37 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514)) UNION ALL ( select distinct sm.id as record, 3840, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 37 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3840, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 37);
Date: 2024-03-02 03:59:37 Duration: 14s967ms
-
with data as ( select distinct shl.id as record, 3849, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 48 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 05:00:00' and shl.invoice_date <= '2024-03-02 05:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263) UNION ALL ( select distinct sol.id as record, 3849, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 48 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 05:00:00' and so.date_order <= '2024-03-02 05:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263)) UNION ALL ( select distinct sm.id as record, 3849, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 48 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 05:00:00' and mrp.create_date <= '2024-03-02 05:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3849, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 48);
Date: 2024-03-02 04:29:31 Duration: 14s700ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 31,423 8h4m57s 771ms 4s274ms 926ms select date_part(?, invoice_date) as year, date_part(?, invoice_date) as month, date_part(?, invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = ? and item_demand_plan_id = ? group by product_id, date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date) order by date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date);Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Mar 02 04 333 4m29s 809ms 05 1,423 22m11s 935ms 06 2,216 30m50s 835ms 07 1,974 27m18s 830ms 08 2,446 37m38s 923ms 09 2,508 39m38s 948ms 10 2,763 45m8s 980ms 11 3,754 1h5m5s 1s40ms 12 4,561 1h19m48s 1s49ms 13 2,554 38m12s 897ms 14 1,932 26m41s 829ms 15 2,222 30m49s 832ms 16 1,896 25m52s 818ms 17 841 11m12s 799ms -
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 175081 and item_demand_plan_id = 3843 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 10:35:24 Duration: 4s274ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 187824 and item_demand_plan_id = 3841 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 09:17:10 Duration: 4s100ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 184335 and item_demand_plan_id = 3841 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 09:07:20 Duration: 4s23ms
2 11,233 27m26s 120ms 718ms 146ms with data as ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and item_demand_plan_id = ? and date::date = date ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) select id from data where rnum > ?;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Mar 02 05 17 2s248ms 132ms 06 476 1m2s 130ms 07 402 52s925ms 131ms 08 838 1m59s 142ms 09 969 2m19s 143ms 10 1,164 2m51s 147ms 11 2,099 5m29s 156ms 12 2,865 7m26s 155ms 13 1,067 2m28s 138ms 14 386 51s186ms 132ms 15 551 1m12s 131ms 16 375 48s876ms 130ms 17 24 3s133ms 130ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 204771 and item_demand_plan_id = 3842 AND date::date = DATE '2024-03-31' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-03-02 11:52:32 Duration: 718ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 216785 and item_demand_plan_id = 3847 AND date::date = DATE '2024-03-31' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-03-02 10:32:55 Duration: 671ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 219148 and item_demand_plan_id = 3846 AND date::date = DATE '2024-03-31' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-03-02 11:42:23 Duration: 651ms
3 9,223 31m20s 120ms 991ms 203ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Mar 02 00 42 12s789ms 304ms 01 78 24s930ms 319ms 02 40 9s525ms 238ms 03 22 6s551ms 297ms 04 167 33s62ms 197ms 05 690 2m9s 187ms 06 273 41s734ms 152ms 07 315 1m15s 238ms 08 699 2m1s 173ms 09 918 2m57s 193ms 10 1,045 3m28s 199ms 11 1,420 4m49s 203ms 12 1,724 6m10s 215ms 13 617 2m4s 201ms 14 304 58s74ms 191ms 15 322 1m2s 193ms 16 211 37s34ms 175ms 17 124 33s300ms 268ms 18 45 13s945ms 309ms 19 71 21s613ms 304ms 21 45 14s184ms 315ms 22 37 10s443ms 282ms 23 14 4s190ms 299ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 10:18:12') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_2"', '["pointspring_master","calendar.alarm",3]', '["pointspring_master","mail.channel",2]', '["pointspring_master","mail.channel",3]', '["pointspring_master","mail.channel",6]', '["pointspring_master","mail.channel",17]', '["pointspring_master","mail.channel",18]', '["pointspring_master","mail.channel",19]', '["pointspring_master","mail.channel",20]', '["pointspring_master","mail.channel",21]', '["pointspring_master","mail.channel",22]', '["pointspring_master","mail.channel",23]', '["pointspring_master","mail.channel",24]', '["pointspring_master","mail.channel",25]', '["pointspring_master","mail.channel",26]', '["pointspring_master","mail.channel",27]', '["pointspring_master","mail.channel",28]', '["pointspring_master","mail.channel",29]', '["pointspring_master","mail.channel",30]', '["pointspring_master","mail.channel",31]', '["pointspring_master","mail.channel",32]', '["pointspring_master","mail.channel",33]', '["pointspring_master","mail.channel",34]', '["pointspring_master","mail.channel",35]', '["pointspring_master","mail.channel",36]', '["pointspring_master","mail.channel",37]', '["pointspring_master","mail.channel",38]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",41]', '["pointspring_master","mail.channel",42]', '["pointspring_master","mail.channel",43]', '["pointspring_master","mail.channel",44]', '["pointspring_master","mail.channel",45]', '["pointspring_master","mail.channel",46]', '["pointspring_master","mail.channel",47]', '["pointspring_master","mail.channel",48]', '["pointspring_master","mail.channel",49]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",51]', '["pointspring_master","mail.channel",52]', '["pointspring_master","mail.channel",53]', '["pointspring_master","mail.channel",54]', '["pointspring_master","mail.channel",55]', '["pointspring_master","mail.channel",56]', '["pointspring_master","mail.channel",57]', '["pointspring_master","mail.channel",58]', '["pointspring_master","mail.channel",59]', '["pointspring_master","mail.channel",60]', '["pointspring_master","mail.channel",61]', '["pointspring_master","mail.channel",62]', '["pointspring_master","mail.channel",63]', '["pointspring_master","mail.channel",64]', '["pointspring_master","mail.channel",66]', '["pointspring_master","mail.channel",67]', '["pointspring_master","mail.channel",68]', '["pointspring_master","mail.channel",69]', '["pointspring_master","mail.channel",70]', '["pointspring_master","mail.channel",71]', '["pointspring_master","mail.channel",72]', '["pointspring_master","mail.channel",73]', '["pointspring_master","mail.channel",74]', '["pointspring_master","mail.channel",75]', '["pointspring_master","mail.channel",76]', '["pointspring_master","mail.channel",77]', '["pointspring_master","mail.channel",78]', '["pointspring_master","mail.channel",79]', '["pointspring_master","mail.channel",80]', '["pointspring_master","mail.channel",81]', '["pointspring_master","mail.channel",82]', '["pointspring_master","mail.channel",83]', '["pointspring_master","mail.channel",84]', '["pointspring_master","mail.channel",85]', '["pointspring_master","mail.channel",86]', '["pointspring_master","mail.channel",87]', '["pointspring_master","mail.channel",88]', '["pointspring_master","mail.channel",89]', '["pointspring_master","mail.channel",90]', '["pointspring_master","mail.channel",91]', '["pointspring_master","mail.channel",92]', '["pointspring_master","mail.channel",93]', '["pointspring_master","mail.channel",94]', '["pointspring_master","mail.channel",95]', '["pointspring_master","mail.channel",96]', '["pointspring_master","mail.channel",97]', '["pointspring_master","mail.channel",98]', '["pointspring_master","mail.channel",99]', '["pointspring_master","mail.channel",100]', '["pointspring_master","mail.channel",101]', '["pointspring_master","mail.channel",102]', '["pointspring_master","mail.channel",103]', '["pointspring_master","mail.channel",104]', '["pointspring_master","mail.channel",105]', '["pointspring_master","mail.channel",106]', '["pointspring_master","mail.channel",107]', '["pointspring_master","mail.channel",108]', '["pointspring_master","mail.channel",109]', '["pointspring_master","mail.channel",110]', '["pointspring_master","mail.channel",111]', '["pointspring_master","mail.channel",112]', '["pointspring_master","mail.channel",113]', '["pointspring_master","mail.channel",114]', '["pointspring_master","mail.channel",115]', '["pointspring_master","mail.channel",116]', '["pointspring_master","mail.channel",117]', '["pointspring_master","mail.channel",118]', '["pointspring_master","mail.channel",119]', '["pointspring_master","mail.channel",120]', '["pointspring_master","mail.channel",121]', '["pointspring_master","mail.channel",122]', '["pointspring_master","mail.channel",123]', '["pointspring_master","mail.channel",124]', '["pointspring_master","mail.channel",125]', '["pointspring_master","mail.channel",126]', '["pointspring_master","mail.channel",127]', '["pointspring_master","mail.channel",128]', '["pointspring_master","mail.channel",129]', '["pointspring_master","mail.channel",130]', '["pointspring_master","mail.channel",131]', '["pointspring_master","mail.channel",132]', '["pointspring_master","mail.channel",133]', '["pointspring_master","mail.channel",134]', '["pointspring_master","mail.channel",135]', '["pointspring_master","mail.channel",136]', '["pointspring_master","mail.channel",137]', '["pointspring_master","mail.channel",138]', '["pointspring_master","mail.channel",139]', '["pointspring_master","mail.channel",141]', '["pointspring_master","mail.channel",142]', '["pointspring_master","mail.channel",143]', '["pointspring_master","mail.channel",144]', '["pointspring_master","mail.channel",145]', '["pointspring_master","mail.channel",146]', '["pointspring_master","mail.channel",147]', '["pointspring_master","mail.channel",148]', '["pointspring_master","mail.channel",149]', '["pointspring_master","mail.channel",150]', '["pointspring_master","mail.channel",151]', '["pointspring_master","mail.channel",152]', '["pointspring_master","mail.channel",153]', '["pointspring_master","mail.channel",154]', '["pointspring_master","mail.channel",155]', '["pointspring_master","mail.channel",156]', '["pointspring_master","mail.channel",157]', '["pointspring_master","mail.channel",158]', '["pointspring_master","mail.channel",159]', '["pointspring_master","mail.channel",160]', '["pointspring_master","mail.channel",161]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","mail.channel",168]', '["pointspring_master","mail.channel",169]', '["pointspring_master","mail.channel",170]', '["pointspring_master","mail.channel",171]', '["pointspring_master","mail.channel",172]', '["pointspring_master","mail.channel",173]', '["pointspring_master","mail.channel",174]', '["pointspring_master","mail.channel",175]', '["pointspring_master","mail.channel",176]', '["pointspring_master","mail.channel",177]', '["pointspring_master","mail.channel",178]', '["pointspring_master","mail.channel",179]', '["pointspring_master","mail.channel",180]', '["pointspring_master","mail.channel",181]', '["pointspring_master","mail.channel",182]', '["pointspring_master","mail.channel",183]', '["pointspring_master","mail.channel",184]', '["pointspring_master","mail.channel",185]', '["pointspring_master","mail.channel",186]', '["pointspring_master","mail.channel",187]', '["pointspring_master","mail.channel",188]', '["pointspring_master","mail.channel",189]', '["pointspring_master","mail.channel",190]', '["pointspring_master","mail.channel",191]', '["pointspring_master","mail.channel",192]', '["pointspring_master","mail.channel",193]', '["pointspring_master","mail.channel",194]', '["pointspring_master","mail.channel",195]', '["pointspring_master","mail.channel",196]', '["pointspring_master","mail.channel",197]', '["pointspring_master","mail.channel",198]', '["pointspring_master","mail.channel",199]', '["pointspring_master","mail.channel",200]', '["pointspring_master","mail.channel",201]', '["pointspring_master","mail.channel",202]', '["pointspring_master","mail.channel",234]', '["pointspring_master","mail.channel",235]', '["pointspring_master","mail.channel",236]', '["pointspring_master","mail.channel",237]', '["pointspring_master","mail.channel",238]', '["pointspring_master","mail.channel",239]', '["pointspring_master","mail.channel",240]', '["pointspring_master","mail.channel",241]', '["pointspring_master","mail.channel",242]', '["pointspring_master","mail.channel",243]', '["pointspring_master","mail.channel",244]', '["pointspring_master","mail.channel",245]', '["pointspring_master","mail.channel",249]', '["pointspring_master","mail.channel",250]', '["pointspring_master","mail.channel",251]', '["pointspring_master","mail.channel",318]', '["pointspring_master","mail.channel",319]', '["pointspring_master","mail.channel",320]', '["pointspring_master","mail.channel",321]', '["pointspring_master","mail.channel",322]', '["pointspring_master","mail.channel",323]', '["pointspring_master","mail.channel",324]', '["pointspring_master","mail.channel",325]', '["pointspring_master","mail.channel",326]', '["pointspring_master","mail.channel",327]', '["pointspring_master","mail.channel",328]', '["pointspring_master","mail.channel",331]', '["pointspring_master","mail.channel",332]', '["pointspring_master","mail.channel",333]', '["pointspring_master","mail.channel",334]', '["pointspring_master","mail.channel",335]', '["pointspring_master","mail.channel",345]', '["pointspring_master","mail.channel",419]', '["pointspring_master","mail.channel",420]', '["pointspring_master","mail.channel",421]', '["pointspring_master","mail.channel",445]', '["pointspring_master","mail.channel",446]', '["pointspring_master","mail.channel",447]', '["pointspring_master","mail.channel",492]', '["pointspring_master","mail.channel",493]', '["pointspring_master","mail.channel",494]', '["pointspring_master","mail.channel",598]', '["pointspring_master","res.partner",3]', '["pointspring_master","ir.needaction",3]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 10:19:03 Duration: 991ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 10:18:12') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19575]', '["pointspring_master","mail.channel",56]', '["pointspring_master","mail.channel",57]', '["pointspring_master","mail.channel",58]', '["pointspring_master","mail.channel",65]', '["pointspring_master","mail.channel",504]', '["pointspring_master","mail.channel",605]', '["pointspring_master","res.partner",19575]', '["pointspring_master","ir.needaction",19575]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 10:19:03 Duration: 922ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 13:42:55') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19522]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",329]', '["pointspring_master","mail.channel",330]', '["pointspring_master","mail.channel",422]', '["pointspring_master","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 13:43:46 Duration: 879ms
4 3,526 9m5s 120ms 432ms 154ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Mar 02 05 3 369ms 123ms 06 53 6s926ms 130ms 07 44 5s797ms 131ms 08 235 33s521ms 142ms 09 321 44s905ms 139ms 10 399 59s887ms 150ms 11 887 2m23s 162ms 12 1,127 3m8s 166ms 13 296 41s534ms 140ms 14 65 8s415ms 129ms 15 61 7s984ms 130ms 16 32 4s162ms 130ms 17 3 383ms 127ms -
select id, class_code from product_warehouse_inventory where product_id = 216174 and warehouse_id = 37;
Date: 2024-03-02 12:13:56 Duration: 432ms
-
select id, class_code from product_warehouse_inventory where product_id = 185364 and warehouse_id = 38;
Date: 2024-03-02 13:03:05 Duration: 405ms
-
select id, class_code from product_warehouse_inventory where product_id = 204082 and warehouse_id = 41;
Date: 2024-03-02 12:04:01 Duration: 373ms
5 2,434 1h4m7s 1s45ms 11s316ms 1s580ms select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Mar 02 08 331 8m23s 1s521ms 09 382 8m34s 1s346ms 10 627 17m32s 1s678ms 11 662 17m23s 1s576ms 12 432 12m13s 1s698ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 171891)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3849)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 10:34:09 Duration: 11s316ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 195667)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3843)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 11:30:14 Duration: 10s588ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 171768)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3849)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 10:32:26 Duration: 8s42ms
6 2,026 5m37s 120ms 383ms 166ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."website_sequence" asc, "product_template"."id" desc;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Mar 02 00 1 135ms 135ms 01 1 129ms 129ms 02 1 121ms 121ms 04 8 1s167ms 145ms 05 92 16s70ms 174ms 06 33 4s832ms 146ms 07 19 2s749ms 144ms 08 311 50s583ms 162ms 09 704 1m57s 167ms 10 397 1m6s 166ms 11 120 21s458ms 178ms 12 155 27s543ms 177ms 13 47 7s663ms 163ms 14 58 9s6ms 155ms 15 28 4s354ms 155ms 16 32 4s935ms 154ms 17 10 1s440ms 144ms 18 1 130ms 130ms 19 3 379ms 126ms 20 1 130ms 130ms 22 3 387ms 129ms 23 1 120ms 120ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 11:42:02 Duration: 383ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 09:30:30 Duration: 361ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 09:30:30 Duration: 360ms
7 1,683 4m18s 120ms 565ms 153ms select id from ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and date::date = date ?::timestamp and item_demand_plan_id = ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) t where t.rnum > ?;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Mar 02 08 197 29s214ms 148ms 09 228 33s703ms 147ms 10 415 1m4s 154ms 11 475 1m13s 154ms 12 368 57s997ms 157ms -
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 195924 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 11:31:48 Duration: 565ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 203744 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 11:41:28 Duration: 549ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 218621 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 12:25:44 Duration: 523ms
8 1,434 3m59s 128ms 807ms 167ms select "account_move".id from "account_move" where (("account_move"."edi_810_id" in (...)) and (("account_move"."id" not in (...)) or "account_move"."id" is null)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Mar 02 00 130 18s294ms 140ms 01 130 18s346ms 141ms 02 130 18s741ms 144ms 03 89 12s375ms 139ms 04 130 21s615ms 166ms 05 130 24s126ms 185ms 06 130 21s453ms 165ms 07 87 14s914ms 171ms 08 130 25s53ms 192ms 09 130 25s820ms 198ms 10 130 25s375ms 195ms 11 13 2s527ms 194ms 23 75 10s900ms 145ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46482)) AND (("account_move"."id" not in (1227784)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 08:18:10 Duration: 807ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46466)) AND (("account_move"."id" not in (1123143)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 09:12:06 Duration: 797ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46481)) AND (("account_move"."id" not in (1230701)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 08:18:06 Duration: 780ms
9 1,162 47m46s 2s373ms 3s267ms 2s467ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Mar 02 03 1 2s433ms 2s433ms 04 1,030 42m14s 2s460ms 05 131 5m30s 2s520ms -
update item_list_line set product_id = 248698, supercede_product_id = 216679, superceded = True where product_id = 216679 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:06:28 Duration: 3s267ms
-
update item_list_line set product_id = 172998, supercede_product_id = 172991, superceded = True where product_id = 172991 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:03:40 Duration: 2s904ms
-
update item_list_line set product_id = 216703, supercede_product_id = 216702, superceded = True where product_id = 216702 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:06:31 Duration: 2s882ms
10 1,107 48m18s 2s455ms 4s273ms 2s618ms update item_list_line set method = ?, min_product_len_1 = ?, min_product_len_2 = ?, min_baseline_size = ?, seasonal_period = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Mar 02 04 22 56s683ms 2s576ms 05 1,085 47m21s 2s618ms -
update item_list_line set method = 2, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 239148 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:01 Duration: 4s273ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 242173 and item_demand_plan_id = 3849;
Date: 2024-03-02 05:20:31 Duration: 4s35ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 239208 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:25 Duration: 3s969ms
11 939 14m11s 721ms 3s696ms 906ms select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Mar 02 04 305 3m52s 763ms 05 621 10m7s 978ms 07 1 954ms 954ms 08 1 755ms 755ms 13 5 4s271ms 854ms 14 6 5s91ms 848ms -
select id from item_list_line where product_id = 222803 and item_demand_plan_id = 3842;
Date: 2024-03-02 05:18:00 Duration: 3s696ms
-
select id from item_list_line where product_id = 244445 and item_demand_plan_id = 3842;
Date: 2024-03-02 05:18:52 Duration: 3s201ms
-
select id from item_list_line where product_id = 262263 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:29 Duration: 3s57ms
12 466 3m14s 345ms 786ms 418ms 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 #12
Day Hour Count Duration Avg duration Mar 02 00 8 2s814ms 351ms 01 7 2s468ms 352ms 03 18 6s388ms 354ms 04 23 8s831ms 383ms 05 15 5s927ms 395ms 08 68 30s850ms 453ms 09 51 22s214ms 435ms 10 42 20s120ms 479ms 11 17 9s552ms 561ms 12 21 10s300ms 490ms 13 76 28s443ms 374ms 14 56 22s368ms 399ms 15 42 16s347ms 389ms 17 18 6s825ms 379ms 19 4 1s459ms 364ms -
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.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-7eb3f27/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 11:41:18 Duration: 786ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-9ded8a0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 08:51:44 Duration: 765ms
-
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.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-7eb3f27/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 11:42:37 Duration: 750ms
13 444 1m1s 120ms 380ms 139ms 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 #13
Day Hour Count Duration Avg duration Mar 02 05 4 951ms 237ms 08 30 3s932ms 131ms 09 59 8s125ms 137ms 10 116 15s462ms 133ms 11 124 17s700ms 142ms 12 108 15s395ms 142ms 13 2 247ms 123ms 14 1 124ms 124ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (243243)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-03-02 05:16:26 Duration: 380ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (203796, 199611, 199613, 199620, 199629, 199630, 199634, 201958, 203223, 203275, 203728, 203741, 203744, 203749, 203751, 203759, 203763, 203772, 203778, 203780, 203784, 203802, 203803, 203804, 203805, 203811, 203812, 203813, 203814, 203820, 203821, 203822, 203827, 203831, 203836, 203847, 203851, 203856, 203859, 203862, 203863, 203867, 203873, 203877, 203880, 203882, 203899, 203904, 203924, 203931, 203937, 203968, 203973, 203976, 203981, 203982, 203986, 203989, 203990, 203994, 203999, 204018, 204028, 204030, 204035, 204041, 204054, 204055, 204057, 204059, 204077, 204078, 204082, 204084, 204086, 204088, 204089, 204092, 204094, 204098, 204099, 204111, 204112, 204120, 204121, 204122, 204123, 204128, 204129, 204134, 204135, 204162, 204206, 204208, 204250, 204252, 204285, 204301, 204308, 204333, 204352, 204363, 204364, 204388, 204389, 204409, 204448, 204490, 204515, 204516, 204588, 204696, 204972, 204988, 205128, 205350, 205401, 205525, 205537, 205573, 205584, 205585, 205588, 205591, 205620, 205621, 205622, 205636, 205756, 205768, 205994, 206036, 206077, 206211, 206226, 206272, 206276, 206278, 206284, 206289, 206328, 206357, 206362, 206508, 206534, 206538, 206560, 206561, 206596, 206623, 206624, 207682, 207719, 207784, 207805, 207840, 207881, 207925, 207926, 207966, 208004, 208010, 208021, 208090, 208092, 208094, 208166, 208215, 208227, 208253, 208348, 208389, 208415, 208483, 208539, 208540, 208590, 208652, 208653, 208958, 208960, 208998, 209027, 209030, 209039, 209044, 209045, 209162, 209168, 209371, 209373, 209375, 209397, 209605, 209617, 209730, 209767, 209801, 209857, 209909, 209913, 209921, 209922, 210021, 210041, 210121, 210132, 210193, 210620, 210622, 210625, 210626, 211200, 211201, 211202, 211204, 211212, 211215, 211216, 211217, 211221, 211225, 211233, 211236, 211238, 211634, 211661, 211673, 211674, 211751, 211842, 211843, 212443, 212496, 212516, 212973, 213405, 213410, 213422, 213423, 213424, 213425, 213426, 213427, 213428, 213429, 213430, 213431, 213432, 213433, 213434, 213435, 213436, 213440, 213442, 213443, 213444, 213462, 213467, 213493, 213559, 213564, 213566, 213567, 213568, 213569, 213570, 213571, 213573, 213574, 213575, 213576, 213577, 213578, 213579, 213584, 213586, 213587, 213588, 213590, 213597, 213598, 213599, 213600, 213619, 213683, 213684, 213687, 213688, 213728, 213729, 213899, 213903, 213904, 213905, 213906, 213907, 213908, 213909, 213910, 213911, 213912, 213913, 213914, 213915, 213916, 213923, 213949, 213985, 213986, 214028, 214030, 214035, 214036, 214037, 214038, 214039, 214040, 214041, 214042, 214043, 214044, 214045, 214046, 214047, 214052, 214056, 214058, 214059, 214064, 214065, 214066, 214067, 214068, 214069, 214135, 214153, 214158, 214159, 214168, 214171, 214172, 214173, 214174, 214175, 214176, 214177, 214178, 214179, 214180, 214181, 214185, 214189, 214379, 214385, 214389, 214390, 214455, 214461, 214496, 214527, 214532, 214559, 214702, 214723, 214730, 214759, 214807, 214824, 214846, 214966, 214996, 215016, 215018, 215020, 215021, 215023, 215055, 215070, 215076, 215082, 215083, 215085, 215088, 215099, 215103, 215194, 215278, 215301, 215327, 215335, 215344, 215429, 215486, 215519, 215534, 215612, 215636, 215652, 215659, 215661, 215663, 215692, 215703, 215733, 215775, 215809, 215909, 215925, 215954, 215959, 216001, 216040, 216042, 216043, 216044, 216068, 216159, 216165, 216169, 216172, 216252, 216254, 216280, 216281, 216288, 216289, 216353, 216425, 216507, 216554, 216556, 216593, 216597, 216701, 216703, 216738, 216744, 216785, 216792, 216793, 216794, 216795, 216798, 216800, 216802, 216848, 216880, 216887, 216898, 216899, 216907, 216965, 217066, 217067, 217068, 217069, 217076, 217095, 217096, 217097, 217233, 217331, 217375, 217377, 217398, 217442, 217594, 217752, 217919, 217926, 217936, 217937, 217938, 217980, 218237, 218288, 218295, 218302, 218396, 218491, 218512, 218550, 218570, 218603, 218621, 218679, 218722, 218819, 218970, 219281, 219294, 219317, 219318, 219320, 219328, 219362, 219386, 219414, 219441, 219458, 219485, 219614, 219703, 219711, 219716, 219747, 219784, 219858, 219899, 220009, 220011, 220096, 220099, 220110, 220112, 220178, 220179, 220183, 220428, 220433, 220873, 220949, 221164, 221173, 221182, 221431, 222028, 222533, 222844, 223037, 223038, 223164, 223294, 223425, 224007, 227024, 227034, 227045, 238846, 238848, 238852, 238865, 238867, 238869, 238870, 238875, 238877, 238880, 238882, 238884, 238892, 238893, 238896, 238904, 238905, 238907, 238909, 238917, 238919, 238921, 238932, 238940, 238944, 238947, 238952, 238958, 238963, 238968, 238971, 238988, 238992, 238994, 238997, 239013, 239024, 239037, 239041, 239049, 239056, 239077, 239079, 239120, 239121, 239131, 239138, 239140, 239141, 239148, 239164, 239173, 239179, 239204, 239215, 239226, 239229, 239268, 239301, 239340, 239344, 239345, 239372, 239393, 239405, 239415, 239469, 239470, 239475, 239480, 239482, 239628, 239635, 239731, 239732, 240464, 240810, 241008, 241100, 241879, 245872, 247069, 247266, 247692, 248952, 249334, 249476, 250999, 251212, 252378, 252390, 252439, 252600, 252601, 253083, 253084, 253299, 254211, 254227, 254592, 255135, 258374, 259053, 259877, 260030, 260479)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-03-02 11:42:22 Duration: 240ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (215809, 199611, 199613, 199620, 199629, 199630, 199634, 201958, 203223, 203275, 203728, 203741, 203744, 203749, 203751, 203759, 203763, 203772, 203778, 203780, 203784, 203796, 203802, 203803, 203804, 203805, 203811, 203812, 203813, 203814, 203820, 203821, 203822, 203827, 203831, 203836, 203847, 203851, 203856, 203859, 203862, 203863, 203867, 203873, 203877, 203880, 203882, 203899, 203904, 203924, 203931, 203937, 203968, 203973, 203976, 203981, 203982, 203986, 203989, 203990, 203994, 203999, 204018, 204028, 204030, 204035, 204041, 204054, 204055, 204057, 204059, 204077, 204078, 204082, 204084, 204086, 204088, 204089, 204092, 204094, 204098, 204099, 204111, 204112, 204120, 204121, 204122, 204123, 204128, 204129, 204134, 204135, 204162, 204206, 204208, 204250, 204252, 204285, 204301, 204308, 204333, 204352, 204363, 204364, 204388, 204389, 204409, 204448, 204490, 204515, 204516, 204588, 204696, 204972, 204988, 205128, 205350, 205401, 205525, 205537, 205573, 205584, 205585, 205588, 205591, 205620, 205621, 205622, 205636, 205756, 205768, 205994, 206036, 206077, 206211, 206226, 206272, 206276, 206278, 206284, 206289, 206328, 206357, 206362, 206508, 206534, 206538, 206560, 206561, 206596, 206623, 206624, 207682, 207719, 207784, 207805, 207840, 207881, 207925, 207926, 207966, 208004, 208010, 208021, 208090, 208092, 208094, 208166, 208215, 208227, 208253, 208348, 208389, 208415, 208483, 208539, 208540, 208590, 208652, 208653, 208958, 208960, 208998, 209027, 209030, 209039, 209044, 209045, 209162, 209168, 209371, 209373, 209375, 209397, 209605, 209617, 209730, 209767, 209801, 209857, 209909, 209913, 209921, 209922, 210021, 210041, 210121, 210132, 210193, 210620, 210622, 210625, 210626, 211200, 211201, 211202, 211204, 211212, 211215, 211216, 211217, 211221, 211225, 211233, 211236, 211238, 211634, 211661, 211673, 211674, 211751, 211842, 211843, 212443, 212496, 212516, 212973, 213405, 213410, 213422, 213423, 213424, 213425, 213426, 213427, 213428, 213429, 213430, 213431, 213432, 213433, 213434, 213435, 213436, 213440, 213442, 213443, 213444, 213462, 213467, 213493, 213559, 213564, 213566, 213567, 213568, 213569, 213570, 213571, 213573, 213574, 213575, 213576, 213577, 213578, 213579, 213584, 213586, 213587, 213588, 213590, 213597, 213598, 213599, 213600, 213619, 213683, 213684, 213687, 213688, 213728, 213729, 213899, 213903, 213904, 213905, 213906, 213907, 213908, 213909, 213910, 213911, 213912, 213913, 213914, 213915, 213916, 213923, 213949, 213985, 213986, 214028, 214030, 214035, 214036, 214037, 214038, 214039, 214040, 214041, 214042, 214043, 214044, 214045, 214046, 214047, 214052, 214056, 214058, 214059, 214064, 214065, 214066, 214067, 214068, 214069, 214135, 214153, 214158, 214159, 214168, 214171, 214172, 214173, 214174, 214175, 214176, 214177, 214178, 214179, 214180, 214181, 214185, 214189, 214379, 214385, 214389, 214390, 214455, 214461, 214496, 214527, 214532, 214559, 214702, 214723, 214730, 214759, 214807, 214824, 214846, 214966, 214996, 215016, 215018, 215020, 215021, 215023, 215055, 215070, 215076, 215082, 215083, 215085, 215088, 215099, 215103, 215194, 215278, 215301, 215327, 215335, 215344, 215429, 215486, 215519, 215534, 215612, 215636, 215652, 215659, 215661, 215663, 215692, 215703, 215733, 215775, 215909, 215925, 215954, 215959, 216001, 216040, 216042, 216043, 216044, 216068, 216159, 216165, 216169, 216172, 216252, 216254, 216280, 216281, 216288, 216289, 216353, 216425, 216507, 216554, 216556, 216593, 216597, 216701, 216703, 216738, 216744, 216785, 216792, 216793, 216794, 216795, 216798, 216800, 216802, 216848, 216880, 216887, 216898, 216899, 216907, 216965, 217066, 217067, 217068, 217069, 217076, 217095, 217096, 217097, 217233, 217331, 217375, 217377, 217398, 217442, 217594, 217752, 217919, 217926, 217936, 217937, 217938, 217980, 218237, 218288, 218295, 218302, 218396, 218491, 218512, 218550, 218570, 218603, 218621, 218679, 218722, 218819, 218970, 219281, 219294, 219317, 219318, 219320, 219328, 219362, 219386, 219414, 219441, 219458, 219485, 219614, 219703, 219711, 219716, 219747, 219784, 219858, 219899, 220009, 220011, 220096, 220099, 220110, 220112, 220178, 220179, 220183, 220428, 220433, 220873, 220949, 221164, 221173, 221182, 221431, 222028, 222533, 222844, 223037, 223038, 223164, 223294, 223425, 224007, 227024, 227034, 227045, 238846, 238848, 238852, 238865, 238867, 238869, 238870, 238875, 238877, 238880, 238882, 238884, 238892, 238893, 238896, 238904, 238905, 238907, 238909, 238917, 238919, 238921, 238932, 238940, 238944, 238947, 238952, 238958, 238963, 238968, 238971, 238988, 238992, 238994, 238997, 239013, 239024, 239037, 239041, 239049, 239056, 239077, 239079, 239120, 239121, 239131, 239138, 239140, 239141, 239148, 239164, 239173, 239179, 239204, 239215, 239226, 239229, 239268, 239301, 239340, 239344, 239345, 239372, 239393, 239405, 239415, 239469, 239470, 239475, 239480, 239482, 239628, 239635, 239731, 239732, 240464, 240810, 241008, 241100, 241879, 245872, 247069, 247266, 247692, 248952, 249334, 249476, 250999, 251212, 252378, 252390, 252439, 252600, 252601, 253083, 253084, 253299, 254211, 254227, 254592, 255135, 258374, 259053, 259877, 260030, 260479)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-03-02 12:18:15 Duration: 239ms
14 413 2m11s 276ms 616ms 317ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Mar 02 00 17 4s881ms 287ms 01 21 5s913ms 281ms 02 15 4s245ms 283ms 03 27 7s676ms 284ms 04 12 3s366ms 280ms 05 15 5s19ms 334ms 06 54 16s680ms 308ms 07 12 3s648ms 304ms 08 42 14s104ms 335ms 09 21 6s624ms 315ms 10 33 12s799ms 387ms 11 18 7s220ms 401ms 12 21 7s444ms 354ms 13 21 6s863ms 326ms 14 30 9s92ms 303ms 15 15 4s725ms 315ms 16 3 837ms 279ms 17 18 5s80ms 282ms 20 18 5s68ms 281ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 12:20:02 Duration: 616ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 11:22:50 Duration: 608ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 10:36:43 Duration: 602ms
15 406 8m24s 956ms 3s940ms 1s243ms select distinct ill.product_id from item_list_line as ill left join res_forecast_method as fm on fm.id = ill.method where ill.item_demand_plan_id = ? and ill.method not in (...);Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Mar 02 04 41 41s199ms 1s4ms 05 101 1m59s 1s180ms 07 5 5s163ms 1s32ms 08 43 56s815ms 1s321ms 09 39 54s66ms 1s386ms 10 66 1m29s 1s357ms 11 6 10s797ms 1s799ms 12 21 34s228ms 1s629ms 13 44 47s854ms 1s87ms 14 19 21s902ms 1s152ms 15 8 10s438ms 1s304ms 17 13 13s596ms 1s45ms -
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3847 and ill.method not in (8, 7);
Date: 2024-03-02 12:04:15 Duration: 3s940ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3842 and ill.method not in (8, 7);
Date: 2024-03-02 11:42:46 Duration: 2s664ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3842 and ill.method not in (8, 7);
Date: 2024-03-02 10:35:17 Duration: 2s599ms
16 404 7m48s 852ms 4s277ms 1s159ms select ill.item_demand_plan_id from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where ill.method is null and idp.active = true and ill.item_demand_plan_id = ? group by ill.item_demand_plan_id having count(ill.id) > ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Mar 02 04 41 37s658ms 918ms 05 101 1m49s 1s86ms 07 5 4s661ms 932ms 08 42 52s969ms 1s261ms 09 39 48s261ms 1s237ms 10 65 1m18s 1s213ms 11 6 11s634ms 1s939ms 12 21 35s714ms 1s700ms 13 44 49s323ms 1s120ms 14 19 18s979ms 998ms 15 8 8s210ms 1s26ms 17 13 12s304ms 946ms -
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3847 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 11:42:05 Duration: 4s277ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3842 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 12:04:16 Duration: 3s596ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3848 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 12:51:42 Duration: 3s244ms
17 404 7m36s 840ms 4s709ms 1s130ms select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Mar 02 04 41 36s573ms 892ms 05 101 1m46s 1s55ms 07 5 4s839ms 967ms 08 42 50s669ms 1s206ms 09 39 49s194ms 1s261ms 10 65 1m20s 1s240ms 11 6 12s507ms 2s84ms 12 21 32s669ms 1s555ms 13 44 42s275ms 960ms 14 19 19s7ms 1s 15 8 9s279ms 1s159ms 17 13 12s388ms 952ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3847 and active = True;
Date: 2024-03-02 10:33:29 Duration: 4s709ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3847 and active = True;
Date: 2024-03-02 12:04:08 Duration: 4s301ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3849 and active = True;
Date: 2024-03-02 11:04:36 Duration: 3s504ms
18 404 6m14s 730ms 2s621ms 927ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Mar 02 04 41 31s983ms 780ms 05 101 1m31s 906ms 07 5 3s838ms 767ms 08 42 42s343ms 1s8ms 09 39 38s492ms 986ms 10 65 1m4s 998ms 11 6 8s216ms 1s369ms 12 21 22s359ms 1s64ms 13 44 37s715ms 857ms 14 19 15s914ms 837ms 15 8 6s740ms 842ms 17 13 10s626ms 817ms -
select count(id) from item_list_line where item_demand_plan_id = 3851;
Date: 2024-03-02 05:21:28 Duration: 2s621ms
-
select count(id) from item_list_line where item_demand_plan_id = 3840;
Date: 2024-03-02 08:44:56 Duration: 2s575ms
-
select count(id) from item_list_line where item_demand_plan_id = 3849;
Date: 2024-03-02 11:41:25 Duration: 2s407ms
19 379 54s530ms 120ms 278ms 143ms with t as ( select db.datname, coalesce(t.query, ?) query, coalesce(t.queryid, ?) queryid, coalesce(t.calls, ?) calls, coalesce(t.total_time, ?) total_time, coalesce(t.mean_time, ?) mean_time, coalesce(t.percentage, ?) percentage from pg_database db natural right join ( select query, queryid, calls, round(total_exec_time::numeric, ?) as total_time, round(mean_exec_time::numeric, ?) as mean_time, round((? * total_exec_time / sum(total_exec_time) over ())::numeric, ?) as percentage from pg_stat_statements order by mean_time desc limit ?) t where not db.datistemplate ) select json_object_agg(datname, row_to_json(t)) from t;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Mar 02 05 38 5s643ms 148ms 06 54 7s357ms 136ms 07 5 683ms 136ms 08 19 2s779ms 146ms 09 6 958ms 159ms 10 1 138ms 138ms 11 1 123ms 123ms 12 1 129ms 129ms 13 2 245ms 122ms 14 30 4s566ms 152ms 15 59 9s646ms 163ms 16 59 8s503ms 144ms 17 54 7s71ms 130ms 18 50 6s683ms 133ms -
WITH T AS ( SELECT db.datname, coalesce(T.query, '') query, coalesce(T.queryid, 0) queryid, coalesce(T.calls, 0) calls, coalesce(T.total_time, 0) total_time, coalesce(T.mean_time, 0) mean_time, coalesce(T.percentage, 0) percentage FROM pg_database db NATURAL RIGHT JOIN ( SELECT query, queryid, calls, round(total_exec_time::numeric, 2) AS total_time, round(mean_exec_time::numeric, 2) AS mean_time, round((100 * total_exec_time / sum(total_exec_time) OVER ())::numeric, 2) AS percentage FROM pg_stat_statements ORDER BY mean_time DESC LIMIT 3) T WHERE NOT db.datistemplate ) SELECT json_object_agg(datname, row_to_json(T)) FROM T;
Date: 2024-03-02 09:04:18 Duration: 278ms
-
WITH T AS ( SELECT db.datname, coalesce(T.query, '') query, coalesce(T.queryid, 0) queryid, coalesce(T.calls, 0) calls, coalesce(T.total_time, 0) total_time, coalesce(T.mean_time, 0) mean_time, coalesce(T.percentage, 0) percentage FROM pg_database db NATURAL RIGHT JOIN ( SELECT query, queryid, calls, round(total_exec_time::numeric, 2) AS total_time, round(mean_exec_time::numeric, 2) AS mean_time, round((100 * total_exec_time / sum(total_exec_time) OVER ())::numeric, 2) AS percentage FROM pg_stat_statements ORDER BY mean_time DESC LIMIT 3) T WHERE NOT db.datistemplate ) SELECT json_object_agg(datname, row_to_json(T)) FROM T;
Date: 2024-03-02 05:27:17 Duration: 240ms
-
WITH T AS ( SELECT db.datname, coalesce(T.query, '') query, coalesce(T.queryid, 0) queryid, coalesce(T.calls, 0) calls, coalesce(T.total_time, 0) total_time, coalesce(T.mean_time, 0) mean_time, coalesce(T.percentage, 0) percentage FROM pg_database db NATURAL RIGHT JOIN ( SELECT query, queryid, calls, round(total_exec_time::numeric, 2) AS total_time, round(mean_exec_time::numeric, 2) AS mean_time, round((100 * total_exec_time / sum(total_exec_time) OVER ())::numeric, 2) AS percentage FROM pg_stat_statements ORDER BY mean_time DESC LIMIT 3) T WHERE NOT db.datistemplate ) SELECT json_object_agg(datname, row_to_json(T)) FROM T;
Date: 2024-03-02 15:11:18 Duration: 228ms
20 273 1m3s 202ms 562ms 232ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Mar 02 00 12 2s476ms 206ms 01 15 3s105ms 207ms 02 9 1s887ms 209ms 03 15 3s131ms 208ms 04 18 3s762ms 209ms 05 27 6s603ms 244ms 06 21 4s548ms 216ms 07 12 2s540ms 211ms 08 15 4s305ms 287ms 09 9 2s615ms 290ms 10 18 4s192ms 232ms 11 9 2s718ms 302ms 12 12 3s852ms 321ms 13 12 3s98ms 258ms 14 24 5s117ms 213ms 15 18 3s827ms 212ms 16 3 636ms 212ms 17 18 3s818ms 212ms 20 6 1s245ms 207ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-03-02 12:08:20 Duration: 562ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-03-02 09:33:04 Duration: 553ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-03-02 08:27:46 Duration: 471ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 5m58s 5m58s 5m58s 1 5m58s 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;Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Mar 02 09 1 5m58s 5m58s -
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-03-02 09:11:45 Duration: 5m58s
2 3s924ms 16s916ms 10s413ms 12 2m4s with data as ( select distinct shl.id as record, ?, shl.id as ref, ? as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone ?, true from sale_history_line as shl left join stock_warehouse as st on st.branch_id = shl.selling_branch left join product_product as pp on pp.id = shl.product_id left join product_template as pt on pt.id = pp.product_tmpl_id left join product_warehouse_inventory as pwi on pwi.product_id = pp.id left join psd_custom_inventory_vendor as inv on inv.id = pt.inventory_vendor_id where shl.selling_branch = ? and shl.sales_obtain != ? and shl.product_id is not null and shl.exception_sale is not true and pt.never_stock = false and pt.discontinued = false and pt.is_core = false and shl.invoice_date >= ? and shl.invoice_date <= ? and coalesce(pt.active, false) = true and pt.inventory_vendor_id not in (...) and pp.id not in (...) union all ( select distinct sol.id as record, ?, so.id as ref, ? as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone ?, true from sale_order_line sol left join product_product as pp on sol.product_id = pp.id left join product_template as pt on pp.product_tmpl_id = pt.id left join psd_custom_inventory_vendor as inv on inv.id = pt.inventory_vendor_id left join sale_order as so on sol.order_id = so.id left join product_warehouse_inventory as pwi on pwi.product_id = pp.id where sol.branch_id = ? and sol.product_id is not null and sol.exception_sale is not true and pt.never_stock = false and pt.discontinued = false and pt.is_core = false and so.date_order >= ? and so.date_order <= ? and so.state in (...) and coalesce(pt.active, false) = true and pt.inventory_vendor_id not in (...) and pp.id not in (...)) union all ( select distinct sm.id as record, ?, mrp.id as ref, ? as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone ?, true from mrp_production mrp left join stock_move as sm on sm.raw_material_production_id = mrp.id left join product_product as pp on sm.product_id = pp.id left join product_template as pt on pp.product_tmpl_id = pt.id left join psd_custom_inventory_vendor as inv on inv.id = pt.inventory_vendor_id left join product_warehouse_inventory as pwi on pwi.product_id = pp.id where mrp.state = ? and mrp.branch_id = ? and sm.product_id is not null and pt.never_stock = false and pt.discontinued = false and pt.is_core = false and mrp.create_date >= ? and mrp.create_date <= ? and coalesce(pt.active, false) = true and pt.inventory_vendor_id not in (...) and pp.id not in (...))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select ?, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone ?, true from data left join branch_product_method as brpm on brpm.product_id = data.product_id and brpm.branch_id = ?);Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Mar 02 03 1 14s967ms 14s967ms 04 11 1m49s 9s999ms -
with data as ( select distinct shl.id as record, 3847, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 45 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393) UNION ALL ( select distinct sol.id as record, 3847, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 45 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393)) UNION ALL ( select distinct sm.id as record, 3847, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 45 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (190979, 190568, 190640, 203493, 202632, 181401, 184051, 215085, 220159, 193509, 189318, 183353, 189018, 188425, 209573, 219982, 216252, 215132, 219750, 213768, 215288, 217993, 216761, 242323, 209271, 209255, 209438, 209250, 209487, 209231, 209430, 209510, 209378, 193411, 202653, 181419, 204056, 208831, 193239, 253947, 193215, 193330, 193332, 193359, 193113, 193114, 193565, 192904, 193110, 193111, 258628, 203674, 203642, 203637, 203194, 261675, 202577, 262499, 203681, 258629, 202635, 261130, 261331, 209318, 209517, 183350, 203645, 209370, 209276, 215693, 209357, 209227, 209356, 209305, 209390, 209210, 172771, 209479, 209569, 209503, 209332, 209344, 209329, 209182, 209339, 209281, 209219, 206656, 183351, 180730, 209518, 216289, 202640, 199582, 209269, 209392, 209352, 209537, 209316, 189042, 209201, 184449, 209457, 209521, 209519, 209267, 183363, 209562, 209268, 199584, 209414, 209418, 209415, 209189, 209466, 209199, 209421, 209526, 248827, 209203, 209488, 209282, 209379, 216830, 206498, 239388, 187791, 209272, 209561, 209256, 203634, 209225, 209413, 209513, 188461, 209261, 172604, 209202, 244119, 209226, 209427, 209482, 209176, 188430, 247413, 209470, 209354, 209254, 196255, 209471, 209264, 197240, 209253, 184136, 209190, 181014, 209497, 209475, 209270, 209183, 209232, 209462, 209456, 209512, 209412, 209441, 209312, 209326, 209422, 209186, 175955, 181409, 213767, 209484, 209327, 175953, 184038, 189041, 209331, 209435, 209233, 209333, 177747, 209469, 209325, 209265, 209188, 209322, 209323, 209360, 209220, 209181, 209538, 209179, 188924, 209416, 209452, 209241, 209206, 209396, 209425, 209279, 209235, 209259, 209284, 209193, 209520, 209319, 209398, 216254, 209207, 176822, 186294, 217980, 193529, 209228, 209260, 209307, 209309, 209434, 209277, 209187, 209195, 209180, 209358, 209194, 209365, 209298, 209243, 209314, 209440, 209459, 215733, 209468, 223745, 213509, 209563, 209423, 202477, 209177, 262287, 209278, 209381, 209200, 209495, 203223, 209242, 209480, 209258, 209185, 209506, 209374, 209524, 183364, 215083, 209424, 186297, 209433, 209234, 186233, 209565, 209346, 209172, 209178, 186232, 249176, 209239, 209224, 209436, 190525, 261330, 209173, 209334, 204975, 203690, 209236, 209501, 209473, 209554, 209494, 209451, 259262, 209509, 209209, 209299, 209320, 209776, 209244, 209280, 209380, 209214, 250980, 209372, 190984, 186845, 209507, 193508, 184040, 209273, 209197, 209335, 209560, 209485, 209464, 209247, 209238, 209566, 209174, 209493, 209571, 209342, 209515, 209491, 187918, 209362, 209330, 209328, 209317, 209472, 197273, 187848, 181349, 219448, 209192, 209338, 209572, 209555, 209556, 209567, 216504, 209505, 209221, 209525, 209257, 186295, 209496, 238976, 209514, 220144, 186298, 209324, 209211, 209198, 217801, 216568, 209306, 202652, 209546, 209391, 209229, 202687, 181351, 209216, 197918, 209343, 209568, 209483, 209321, 209191, 209252, 209245, 209266, 209394, 209442, 209304, 176416, 209286, 209447, 209212, 209313, 209196, 209382, 173580, 209403, 209389, 193209, 209439, 240858, 209384, 209184, 209528, 209366, 173241, 214111, 216967, 209516, 193109, 202634, 209311, 216288, 209262, 209437, 209502, 209302, 209340, 209315, 209359, 209345, 209230, 209246, 209251, 209175, 217925, 209347, 193055, 253188, 209303, 209492, 209527, 209474, 218167, 209529, 176679, 209446, 209558, 209367, 209570, 209545, 209263, 209310, 209511, 209361, 193569, 209308, 209559, 209460, 209393))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3847, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 45);
Date: 2024-03-02 04:41:04 Duration: 16s916ms
-
with data as ( select distinct shl.id as record, 3840, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 37 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 00:00:00' and shl.invoice_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514) UNION ALL ( select distinct sol.id as record, 3840, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 37 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 00:00:00' and so.date_order <= '2024-03-02 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514)) UNION ALL ( select distinct sm.id as record, 3840, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 37 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 00:00:00' and mrp.create_date <= '2024-03-02 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (238904, 184675, 238921, 209276, 203756, 203750, 203735, 203723, 203787, 203730, 203809, 203794, 198387, 186099, 193529, 203231, 209469, 175893, 209312, 209327, 178710, 209512, 209333, 180400, 209325, 175876, 175890, 209271, 209326, 173771, 209270, 188456, 209220, 209233, 209475, 209188, 209183, 209316, 209265, 209331, 209422, 209308, 209186, 209456, 209497, 209484, 209441, 209360, 209435, 209462, 209179, 209322, 187994, 209416, 209412, 209315, 209549, 209323, 209532, 209374, 209468, 209510, 209243, 209232, 209423, 209365, 209241, 209195, 209319, 209278, 209260, 209309, 209307, 209520, 209434, 209358, 209398, 209181, 209425, 189098, 209563, 209314, 209277, 209279, 209207, 209460, 180397, 209452, 203752, 209193, 209180, 209339, 209177, 209284, 209235, 209396, 209521, 209250, 209194, 189036, 209537, 209415, 209189, 209390, 209519, 209517, 203860, 209187, 209298, 209440, 209459, 209228, 209445, 209206, 209259, 209357, 209418, 209305, 209352, 209210, 209457, 209356, 209526, 209479, 209281, 209392, 209318, 228221, 209569, 209329, 209344, 209332, 177173, 209182, 209370, 209518, 209255, 209227, 209267, 209201, 209231, 209503, 209562, 209256, 209219, 209559, 209414, 209176, 209471, 209269, 209254, 209482, 209379, 209421, 239268, 209513, 209354, 209202, 199082, 209561, 238911, 209226, 209190, 209203, 209470, 209199, 209264, 209261, 209282, 209272, 209488, 209413, 209427, 209466, 209253, 197240, 197227, 209478, 209225, 209483, 209498, 209555, 209268, 209321, 209382, 209266, 209525, 209245, 209324, 209304, 209496, 209403, 222244, 209338, 209198, 209313, 209572, 209505, 209191, 209306, 209229, 209546, 209556, 209286, 209196, 209391, 209212, 209442, 209343, 209211, 181336, 209567, 209252, 209221, 209447, 209216, 239344, 177857, 209257, 209389, 209275, 209474, 209529, 209516, 209437, 173241, 209384, 209347, 209545, 209251, 209361, 209558, 209367, 209262, 209430, 209175, 209439, 209303, 209302, 209310, 209527, 209205, 209263, 209340, 209230, 209184, 209345, 209511, 209258, 209311, 209492, 209246, 209528, 209502, 209366, 209438, 209346, 209573, 209495, 209381, 209506, 209570, 209239, 209359, 209446, 209524, 209531, 209487, 178625, 209200, 209242, 222245, 197258, 209565, 185856, 209334, 209236, 209234, 209378, 209554, 209172, 209185, 209424, 209433, 209173, 209501, 239141, 184509, 209178, 197276, 209214, 209342, 209209, 209330, 209197, 209299, 209317, 209566, 209328, 181363, 209372, 209509, 209560, 209192, 209273, 209280, 209436, 209485, 209494, 209493, 209238, 209247, 209335, 209499, 209571, 209464, 209515, 209472, 209174, 209244, 209507, 209491, 209628, 209393, 209380, 209451, 204971, 209362, 209538, 209568, 209480, 209320, 209473, 209477, 209514))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3840, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 37);
Date: 2024-03-02 03:59:37 Duration: 14s967ms
-
with data as ( select distinct shl.id as record, 3849, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 48 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-03-02 05:00:00' and shl.invoice_date <= '2024-03-02 05:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263) UNION ALL ( select distinct sol.id as record, 3849, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 48 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-03-02 05:00:00' and so.date_order <= '2024-03-02 05:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263)) UNION ALL ( select distinct sm.id as record, 3849, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 48 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-03-02 05:00:00' and mrp.create_date <= '2024-03-02 05:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209372, 209379, 209231, 209241, 209276, 209433, 209446, 209447, 209487, 209506, 209510, 245563, 209250, 209255, 209271, 209381, 209418, 209430, 209438, 209527, 209556, 260360, 260359, 209323, 209282, 209378, 209333, 209273, 209334, 209354, 193239, 193387, 209210, 209211, 210625, 209332, 209352, 209267, 209356, 209392, 209518, 209370, 209329, 209219, 186249, 209269, 209227, 209479, 209344, 209457, 209537, 209503, 228221, 217253, 213290, 209521, 209562, 209415, 206548, 209519, 209339, 209318, 176066, 209390, 209182, 209569, 216961, 209305, 209357, 197240, 209202, 207553, 209188, 244601, 209559, 209414, 209176, 209488, 209199, 209466, 209256, 180821, 209225, 207368, 209190, 209272, 209232, 250940, 209512, 209201, 209189, 209469, 213330, 209326, 209538, 209270, 186184, 209312, 209316, 183563, 209497, 209412, 209416, 209422, 209322, 209327, 209233, 209203, 183566, 209264, 209413, 209482, 180952, 209441, 209179, 209532, 221328, 185979, 209421, 209268, 209561, 209470, 209253, 209513, 209254, 209226, 209427, 209261, 209360, 209183, 209325, 209456, 209462, 209265, 240896, 209319, 209220, 209186, 210622, 209484, 209475, 209398, 193734, 209435, 209331, 209308, 209315, 209425, 209358, 209563, 209284, 209243, 209445, 209460, 209468, 209298, 209307, 209520, 209228, 209314, 186294, 209309, 209396, 209195, 209177, 209423, 209277, 209434, 209193, 209365, 209235, 209278, 214527, 209452, 209187, 209206, 209181, 209180, 209279, 209459, 209260, 209440, 209194, 209374, 209207, 218035, 209259, 209495, 246016, 209565, 210620, 176058, 176205, 209473, 209346, 209480, 209200, 209531, 209573, 171850, 209554, 209239, 209258, 209242, 209236, 209501, 209173, 209424, 209178, 209244, 209299, 209380, 209560, 209247, 209174, 209185, 252547, 209172, 184010, 209238, 209464, 209342, 209362, 209451, 206519, 209209, 209330, 209335, 209328, 209509, 209393, 217072, 209320, 209571, 209566, 209197, 209485, 209192, 209493, 209436, 209514, 209472, 217254, 209494, 209280, 209317, 209491, 209214, 209216, 209567, 209338, 209221, 190636, 209257, 209555, 186295, 209229, 246017, 209572, 209212, 209198, 209252, 209403, 209313, 209196, 209525, 209478, 209499, 209568, 185978, 209266, 186186, 209391, 209496, 209304, 209505, 209477, 209245, 209498, 209321, 209324, 209343, 209306, 172690, 209191, 209483, 209389, 209366, 209286, 209442, 209546, 209382, 209570, 209367, 209516, 209384, 209437, 209492, 209439, 209528, 209502, 209529, 209246, 173241, 209361, 209511, 209310, 209175, 209262, 209345, 209474, 209359, 209558, 209184, 209303, 209515, 209230, 209311, 209251, 209517, 209340, 211671, 209507, 209302, 209347, 209545, 209526, 209524, 209234, 209263))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3849, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 48);
Date: 2024-03-02 04:29:31 Duration: 14s700ms
3 307ms 11s416ms 7s451ms 21 2m36s update item_demand_plan set is_start_forecast = false where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where method in (...) and idp.fetch_data_done = true and idp.active = true group by ill.item_demand_plan_id intersect select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = true group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand left join item_demand_plan as idp2 on data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = true);Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Mar 02 04 2 667ms 333ms 05 2 617ms 308ms 07 1 309ms 309ms 08 1 10s136ms 10s136ms 11 2 20s852ms 10s426ms 13 7 1m11s 10s261ms 14 5 51s750ms 10s350ms 18 1 307ms 307ms -
update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);
Date: 2024-03-02 14:50:51 Duration: 11s416ms
-
update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);
Date: 2024-03-02 11:30:16 Duration: 10s593ms
-
update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);
Date: 2024-03-02 13:33:49 Duration: 10s464ms
4 2s455ms 4s273ms 2s618ms 1,107 48m18s update item_list_line set method = ?, min_product_len_1 = ?, min_product_len_2 = ?, min_baseline_size = ?, seasonal_period = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Mar 02 04 22 56s683ms 2s576ms 05 1,085 47m21s 2s618ms -
update item_list_line set method = 2, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 239148 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:01 Duration: 4s273ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 242173 and item_demand_plan_id = 3849;
Date: 2024-03-02 05:20:31 Duration: 4s35ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 239208 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:25 Duration: 3s969ms
5 2s373ms 3s267ms 2s467ms 1,162 47m46s update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Mar 02 03 1 2s433ms 2s433ms 04 1,030 42m14s 2s460ms 05 131 5m30s 2s520ms -
update item_list_line set product_id = 248698, supercede_product_id = 216679, superceded = True where product_id = 216679 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:06:28 Duration: 3s267ms
-
update item_list_line set product_id = 172998, supercede_product_id = 172991, superceded = True where product_id = 172991 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:03:40 Duration: 2s904ms
-
update item_list_line set product_id = 216703, supercede_product_id = 216702, superceded = True where product_id = 216702 and item_demand_plan_id = 3848;
Date: 2024-03-02 05:06:31 Duration: 2s882ms
6 1s45ms 11s316ms 1s580ms 2,434 1h4m7s select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Mar 02 08 331 8m23s 1s521ms 09 382 8m34s 1s346ms 10 627 17m32s 1s678ms 11 662 17m23s 1s576ms 12 432 12m13s 1s698ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 171891)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3849)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 10:34:09 Duration: 11s316ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 195667)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3843)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 11:30:14 Duration: 10s588ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 171768)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3849)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-03-02 10:32:26 Duration: 8s42ms
7 956ms 3s940ms 1s243ms 406 8m24s select distinct ill.product_id from item_list_line as ill left join res_forecast_method as fm on fm.id = ill.method where ill.item_demand_plan_id = ? and ill.method not in (...);Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Mar 02 04 41 41s199ms 1s4ms 05 101 1m59s 1s180ms 07 5 5s163ms 1s32ms 08 43 56s815ms 1s321ms 09 39 54s66ms 1s386ms 10 66 1m29s 1s357ms 11 6 10s797ms 1s799ms 12 21 34s228ms 1s629ms 13 44 47s854ms 1s87ms 14 19 21s902ms 1s152ms 15 8 10s438ms 1s304ms 17 13 13s596ms 1s45ms -
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3847 and ill.method not in (8, 7);
Date: 2024-03-02 12:04:15 Duration: 3s940ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3842 and ill.method not in (8, 7);
Date: 2024-03-02 11:42:46 Duration: 2s664ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3842 and ill.method not in (8, 7);
Date: 2024-03-02 10:35:17 Duration: 2s599ms
8 852ms 4s277ms 1s159ms 404 7m48s select ill.item_demand_plan_id from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where ill.method is null and idp.active = true and ill.item_demand_plan_id = ? group by ill.item_demand_plan_id having count(ill.id) > ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Mar 02 04 41 37s658ms 918ms 05 101 1m49s 1s86ms 07 5 4s661ms 932ms 08 42 52s969ms 1s261ms 09 39 48s261ms 1s237ms 10 65 1m18s 1s213ms 11 6 11s634ms 1s939ms 12 21 35s714ms 1s700ms 13 44 49s323ms 1s120ms 14 19 18s979ms 998ms 15 8 8s210ms 1s26ms 17 13 12s304ms 946ms -
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3847 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 11:42:05 Duration: 4s277ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3842 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 12:04:16 Duration: 3s596ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3848 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-03-02 12:51:42 Duration: 3s244ms
9 840ms 4s709ms 1s130ms 404 7m36s select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Mar 02 04 41 36s573ms 892ms 05 101 1m46s 1s55ms 07 5 4s839ms 967ms 08 42 50s669ms 1s206ms 09 39 49s194ms 1s261ms 10 65 1m20s 1s240ms 11 6 12s507ms 2s84ms 12 21 32s669ms 1s555ms 13 44 42s275ms 960ms 14 19 19s7ms 1s 15 8 9s279ms 1s159ms 17 13 12s388ms 952ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3847 and active = True;
Date: 2024-03-02 10:33:29 Duration: 4s709ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3847 and active = True;
Date: 2024-03-02 12:04:08 Duration: 4s301ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3849 and active = True;
Date: 2024-03-02 11:04:36 Duration: 3s504ms
10 730ms 2s621ms 927ms 404 6m14s select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Mar 02 04 41 31s983ms 780ms 05 101 1m31s 906ms 07 5 3s838ms 767ms 08 42 42s343ms 1s8ms 09 39 38s492ms 986ms 10 65 1m4s 998ms 11 6 8s216ms 1s369ms 12 21 22s359ms 1s64ms 13 44 37s715ms 857ms 14 19 15s914ms 837ms 15 8 6s740ms 842ms 17 13 10s626ms 817ms -
select count(id) from item_list_line where item_demand_plan_id = 3851;
Date: 2024-03-02 05:21:28 Duration: 2s621ms
-
select count(id) from item_list_line where item_demand_plan_id = 3840;
Date: 2024-03-02 08:44:56 Duration: 2s575ms
-
select count(id) from item_list_line where item_demand_plan_id = 3849;
Date: 2024-03-02 11:41:25 Duration: 2s407ms
11 771ms 4s274ms 926ms 31,423 8h4m57s select date_part(?, invoice_date) as year, date_part(?, invoice_date) as month, date_part(?, invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = ? and item_demand_plan_id = ? group by product_id, date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date) order by date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date);Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Mar 02 04 333 4m29s 809ms 05 1,423 22m11s 935ms 06 2,216 30m50s 835ms 07 1,974 27m18s 830ms 08 2,446 37m38s 923ms 09 2,508 39m38s 948ms 10 2,763 45m8s 980ms 11 3,754 1h5m5s 1s40ms 12 4,561 1h19m48s 1s49ms 13 2,554 38m12s 897ms 14 1,932 26m41s 829ms 15 2,222 30m49s 832ms 16 1,896 25m52s 818ms 17 841 11m12s 799ms -
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 175081 and item_demand_plan_id = 3843 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 10:35:24 Duration: 4s274ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 187824 and item_demand_plan_id = 3841 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 09:17:10 Duration: 4s100ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 184335 and item_demand_plan_id = 3841 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-03-02 09:07:20 Duration: 4s23ms
12 721ms 3s696ms 906ms 939 14m11s select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Mar 02 04 305 3m52s 763ms 05 621 10m7s 978ms 07 1 954ms 954ms 08 1 755ms 755ms 13 5 4s271ms 854ms 14 6 5s91ms 848ms -
select id from item_list_line where product_id = 222803 and item_demand_plan_id = 3842;
Date: 2024-03-02 05:18:00 Duration: 3s696ms
-
select id from item_list_line where product_id = 244445 and item_demand_plan_id = 3842;
Date: 2024-03-02 05:18:52 Duration: 3s201ms
-
select id from item_list_line where product_id = 262263 and item_demand_plan_id = 3841;
Date: 2024-03-02 05:18:29 Duration: 3s57ms
13 345ms 786ms 418ms 466 3m14s 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 Mar 02 00 8 2s814ms 351ms 01 7 2s468ms 352ms 03 18 6s388ms 354ms 04 23 8s831ms 383ms 05 15 5s927ms 395ms 08 68 30s850ms 453ms 09 51 22s214ms 435ms 10 42 20s120ms 479ms 11 17 9s552ms 561ms 12 21 10s300ms 490ms 13 76 28s443ms 374ms 14 56 22s368ms 399ms 15 42 16s347ms 389ms 17 18 6s825ms 379ms 19 4 1s459ms 364ms -
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.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-7eb3f27/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 11:41:18 Duration: 786ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-9ded8a0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 08:51:44 Duration: 765ms
-
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.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-7eb3f27/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-03-02 11:42:37 Duration: 750ms
14 276ms 616ms 317ms 413 2m11s select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Mar 02 00 17 4s881ms 287ms 01 21 5s913ms 281ms 02 15 4s245ms 283ms 03 27 7s676ms 284ms 04 12 3s366ms 280ms 05 15 5s19ms 334ms 06 54 16s680ms 308ms 07 12 3s648ms 304ms 08 42 14s104ms 335ms 09 21 6s624ms 315ms 10 33 12s799ms 387ms 11 18 7s220ms 401ms 12 21 7s444ms 354ms 13 21 6s863ms 326ms 14 30 9s92ms 303ms 15 15 4s725ms 315ms 16 3 837ms 279ms 17 18 5s80ms 282ms 20 18 5s68ms 281ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 12:20:02 Duration: 616ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 11:22:50 Duration: 608ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-03-02 10:36:43 Duration: 602ms
15 202ms 562ms 232ms 273 1m3s select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Mar 02 00 12 2s476ms 206ms 01 15 3s105ms 207ms 02 9 1s887ms 209ms 03 15 3s131ms 208ms 04 18 3s762ms 209ms 05 27 6s603ms 244ms 06 21 4s548ms 216ms 07 12 2s540ms 211ms 08 15 4s305ms 287ms 09 9 2s615ms 290ms 10 18 4s192ms 232ms 11 9 2s718ms 302ms 12 12 3s852ms 321ms 13 12 3s98ms 258ms 14 24 5s117ms 213ms 15 18 3s827ms 212ms 16 3 636ms 212ms 17 18 3s818ms 212ms 20 6 1s245ms 207ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-03-02 12:08:20 Duration: 562ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-03-02 09:33:04 Duration: 553ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-03-02 08:27:46 Duration: 471ms
16 120ms 991ms 203ms 9,223 31m20s select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Mar 02 00 42 12s789ms 304ms 01 78 24s930ms 319ms 02 40 9s525ms 238ms 03 22 6s551ms 297ms 04 167 33s62ms 197ms 05 690 2m9s 187ms 06 273 41s734ms 152ms 07 315 1m15s 238ms 08 699 2m1s 173ms 09 918 2m57s 193ms 10 1,045 3m28s 199ms 11 1,420 4m49s 203ms 12 1,724 6m10s 215ms 13 617 2m4s 201ms 14 304 58s74ms 191ms 15 322 1m2s 193ms 16 211 37s34ms 175ms 17 124 33s300ms 268ms 18 45 13s945ms 309ms 19 71 21s613ms 304ms 21 45 14s184ms 315ms 22 37 10s443ms 282ms 23 14 4s190ms 299ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 10:18:12') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_2"', '["pointspring_master","calendar.alarm",3]', '["pointspring_master","mail.channel",2]', '["pointspring_master","mail.channel",3]', '["pointspring_master","mail.channel",6]', '["pointspring_master","mail.channel",17]', '["pointspring_master","mail.channel",18]', '["pointspring_master","mail.channel",19]', '["pointspring_master","mail.channel",20]', '["pointspring_master","mail.channel",21]', '["pointspring_master","mail.channel",22]', '["pointspring_master","mail.channel",23]', '["pointspring_master","mail.channel",24]', '["pointspring_master","mail.channel",25]', '["pointspring_master","mail.channel",26]', '["pointspring_master","mail.channel",27]', '["pointspring_master","mail.channel",28]', '["pointspring_master","mail.channel",29]', '["pointspring_master","mail.channel",30]', '["pointspring_master","mail.channel",31]', '["pointspring_master","mail.channel",32]', '["pointspring_master","mail.channel",33]', '["pointspring_master","mail.channel",34]', '["pointspring_master","mail.channel",35]', '["pointspring_master","mail.channel",36]', '["pointspring_master","mail.channel",37]', '["pointspring_master","mail.channel",38]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",41]', '["pointspring_master","mail.channel",42]', '["pointspring_master","mail.channel",43]', '["pointspring_master","mail.channel",44]', '["pointspring_master","mail.channel",45]', '["pointspring_master","mail.channel",46]', '["pointspring_master","mail.channel",47]', '["pointspring_master","mail.channel",48]', '["pointspring_master","mail.channel",49]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",51]', '["pointspring_master","mail.channel",52]', '["pointspring_master","mail.channel",53]', '["pointspring_master","mail.channel",54]', '["pointspring_master","mail.channel",55]', '["pointspring_master","mail.channel",56]', '["pointspring_master","mail.channel",57]', '["pointspring_master","mail.channel",58]', '["pointspring_master","mail.channel",59]', '["pointspring_master","mail.channel",60]', '["pointspring_master","mail.channel",61]', '["pointspring_master","mail.channel",62]', '["pointspring_master","mail.channel",63]', '["pointspring_master","mail.channel",64]', '["pointspring_master","mail.channel",66]', '["pointspring_master","mail.channel",67]', '["pointspring_master","mail.channel",68]', '["pointspring_master","mail.channel",69]', '["pointspring_master","mail.channel",70]', '["pointspring_master","mail.channel",71]', '["pointspring_master","mail.channel",72]', '["pointspring_master","mail.channel",73]', '["pointspring_master","mail.channel",74]', '["pointspring_master","mail.channel",75]', '["pointspring_master","mail.channel",76]', '["pointspring_master","mail.channel",77]', '["pointspring_master","mail.channel",78]', '["pointspring_master","mail.channel",79]', '["pointspring_master","mail.channel",80]', '["pointspring_master","mail.channel",81]', '["pointspring_master","mail.channel",82]', '["pointspring_master","mail.channel",83]', '["pointspring_master","mail.channel",84]', '["pointspring_master","mail.channel",85]', '["pointspring_master","mail.channel",86]', '["pointspring_master","mail.channel",87]', '["pointspring_master","mail.channel",88]', '["pointspring_master","mail.channel",89]', '["pointspring_master","mail.channel",90]', '["pointspring_master","mail.channel",91]', '["pointspring_master","mail.channel",92]', '["pointspring_master","mail.channel",93]', '["pointspring_master","mail.channel",94]', '["pointspring_master","mail.channel",95]', '["pointspring_master","mail.channel",96]', '["pointspring_master","mail.channel",97]', '["pointspring_master","mail.channel",98]', '["pointspring_master","mail.channel",99]', '["pointspring_master","mail.channel",100]', '["pointspring_master","mail.channel",101]', '["pointspring_master","mail.channel",102]', '["pointspring_master","mail.channel",103]', '["pointspring_master","mail.channel",104]', '["pointspring_master","mail.channel",105]', '["pointspring_master","mail.channel",106]', '["pointspring_master","mail.channel",107]', '["pointspring_master","mail.channel",108]', '["pointspring_master","mail.channel",109]', '["pointspring_master","mail.channel",110]', '["pointspring_master","mail.channel",111]', '["pointspring_master","mail.channel",112]', '["pointspring_master","mail.channel",113]', '["pointspring_master","mail.channel",114]', '["pointspring_master","mail.channel",115]', '["pointspring_master","mail.channel",116]', '["pointspring_master","mail.channel",117]', '["pointspring_master","mail.channel",118]', '["pointspring_master","mail.channel",119]', '["pointspring_master","mail.channel",120]', '["pointspring_master","mail.channel",121]', '["pointspring_master","mail.channel",122]', '["pointspring_master","mail.channel",123]', '["pointspring_master","mail.channel",124]', '["pointspring_master","mail.channel",125]', '["pointspring_master","mail.channel",126]', '["pointspring_master","mail.channel",127]', '["pointspring_master","mail.channel",128]', '["pointspring_master","mail.channel",129]', '["pointspring_master","mail.channel",130]', '["pointspring_master","mail.channel",131]', '["pointspring_master","mail.channel",132]', '["pointspring_master","mail.channel",133]', '["pointspring_master","mail.channel",134]', '["pointspring_master","mail.channel",135]', '["pointspring_master","mail.channel",136]', '["pointspring_master","mail.channel",137]', '["pointspring_master","mail.channel",138]', '["pointspring_master","mail.channel",139]', '["pointspring_master","mail.channel",141]', '["pointspring_master","mail.channel",142]', '["pointspring_master","mail.channel",143]', '["pointspring_master","mail.channel",144]', '["pointspring_master","mail.channel",145]', '["pointspring_master","mail.channel",146]', '["pointspring_master","mail.channel",147]', '["pointspring_master","mail.channel",148]', '["pointspring_master","mail.channel",149]', '["pointspring_master","mail.channel",150]', '["pointspring_master","mail.channel",151]', '["pointspring_master","mail.channel",152]', '["pointspring_master","mail.channel",153]', '["pointspring_master","mail.channel",154]', '["pointspring_master","mail.channel",155]', '["pointspring_master","mail.channel",156]', '["pointspring_master","mail.channel",157]', '["pointspring_master","mail.channel",158]', '["pointspring_master","mail.channel",159]', '["pointspring_master","mail.channel",160]', '["pointspring_master","mail.channel",161]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","mail.channel",168]', '["pointspring_master","mail.channel",169]', '["pointspring_master","mail.channel",170]', '["pointspring_master","mail.channel",171]', '["pointspring_master","mail.channel",172]', '["pointspring_master","mail.channel",173]', '["pointspring_master","mail.channel",174]', '["pointspring_master","mail.channel",175]', '["pointspring_master","mail.channel",176]', '["pointspring_master","mail.channel",177]', '["pointspring_master","mail.channel",178]', '["pointspring_master","mail.channel",179]', '["pointspring_master","mail.channel",180]', '["pointspring_master","mail.channel",181]', '["pointspring_master","mail.channel",182]', '["pointspring_master","mail.channel",183]', '["pointspring_master","mail.channel",184]', '["pointspring_master","mail.channel",185]', '["pointspring_master","mail.channel",186]', '["pointspring_master","mail.channel",187]', '["pointspring_master","mail.channel",188]', '["pointspring_master","mail.channel",189]', '["pointspring_master","mail.channel",190]', '["pointspring_master","mail.channel",191]', '["pointspring_master","mail.channel",192]', '["pointspring_master","mail.channel",193]', '["pointspring_master","mail.channel",194]', '["pointspring_master","mail.channel",195]', '["pointspring_master","mail.channel",196]', '["pointspring_master","mail.channel",197]', '["pointspring_master","mail.channel",198]', '["pointspring_master","mail.channel",199]', '["pointspring_master","mail.channel",200]', '["pointspring_master","mail.channel",201]', '["pointspring_master","mail.channel",202]', '["pointspring_master","mail.channel",234]', '["pointspring_master","mail.channel",235]', '["pointspring_master","mail.channel",236]', '["pointspring_master","mail.channel",237]', '["pointspring_master","mail.channel",238]', '["pointspring_master","mail.channel",239]', '["pointspring_master","mail.channel",240]', '["pointspring_master","mail.channel",241]', '["pointspring_master","mail.channel",242]', '["pointspring_master","mail.channel",243]', '["pointspring_master","mail.channel",244]', '["pointspring_master","mail.channel",245]', '["pointspring_master","mail.channel",249]', '["pointspring_master","mail.channel",250]', '["pointspring_master","mail.channel",251]', '["pointspring_master","mail.channel",318]', '["pointspring_master","mail.channel",319]', '["pointspring_master","mail.channel",320]', '["pointspring_master","mail.channel",321]', '["pointspring_master","mail.channel",322]', '["pointspring_master","mail.channel",323]', '["pointspring_master","mail.channel",324]', '["pointspring_master","mail.channel",325]', '["pointspring_master","mail.channel",326]', '["pointspring_master","mail.channel",327]', '["pointspring_master","mail.channel",328]', '["pointspring_master","mail.channel",331]', '["pointspring_master","mail.channel",332]', '["pointspring_master","mail.channel",333]', '["pointspring_master","mail.channel",334]', '["pointspring_master","mail.channel",335]', '["pointspring_master","mail.channel",345]', '["pointspring_master","mail.channel",419]', '["pointspring_master","mail.channel",420]', '["pointspring_master","mail.channel",421]', '["pointspring_master","mail.channel",445]', '["pointspring_master","mail.channel",446]', '["pointspring_master","mail.channel",447]', '["pointspring_master","mail.channel",492]', '["pointspring_master","mail.channel",493]', '["pointspring_master","mail.channel",494]', '["pointspring_master","mail.channel",598]', '["pointspring_master","res.partner",3]', '["pointspring_master","ir.needaction",3]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 10:19:03 Duration: 991ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 10:18:12') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19575]', '["pointspring_master","mail.channel",56]', '["pointspring_master","mail.channel",57]', '["pointspring_master","mail.channel",58]', '["pointspring_master","mail.channel",65]', '["pointspring_master","mail.channel",504]', '["pointspring_master","mail.channel",605]', '["pointspring_master","res.partner",19575]', '["pointspring_master","ir.needaction",19575]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 10:19:03 Duration: 922ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-03-02 13:42:55') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19522]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",329]', '["pointspring_master","mail.channel",330]', '["pointspring_master","mail.channel",422]', '["pointspring_master","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-03-02 13:43:46 Duration: 879ms
17 128ms 807ms 167ms 1,434 3m59s select "account_move".id from "account_move" where (("account_move"."edi_810_id" in (...)) and (("account_move"."id" not in (...)) or "account_move"."id" is null)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Mar 02 00 130 18s294ms 140ms 01 130 18s346ms 141ms 02 130 18s741ms 144ms 03 89 12s375ms 139ms 04 130 21s615ms 166ms 05 130 24s126ms 185ms 06 130 21s453ms 165ms 07 87 14s914ms 171ms 08 130 25s53ms 192ms 09 130 25s820ms 198ms 10 130 25s375ms 195ms 11 13 2s527ms 194ms 23 75 10s900ms 145ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46482)) AND (("account_move"."id" not in (1227784)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 08:18:10 Duration: 807ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46466)) AND (("account_move"."id" not in (1123143)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 09:12:06 Duration: 797ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (46481)) AND (("account_move"."id" not in (1230701)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-03-02 08:18:06 Duration: 780ms
18 120ms 383ms 166ms 2,026 5m37s select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."website_sequence" asc, "product_template"."id" desc;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Mar 02 00 1 135ms 135ms 01 1 129ms 129ms 02 1 121ms 121ms 04 8 1s167ms 145ms 05 92 16s70ms 174ms 06 33 4s832ms 146ms 07 19 2s749ms 144ms 08 311 50s583ms 162ms 09 704 1m57s 167ms 10 397 1m6s 166ms 11 120 21s458ms 178ms 12 155 27s543ms 177ms 13 47 7s663ms 163ms 14 58 9s6ms 155ms 15 28 4s354ms 155ms 16 32 4s935ms 154ms 17 10 1s440ms 144ms 18 1 130ms 130ms 19 3 379ms 126ms 20 1 130ms 130ms 22 3 387ms 129ms 23 1 120ms 120ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 11:42:02 Duration: 383ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 09:30:30 Duration: 361ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-03-02 09:30:30 Duration: 360ms
19 120ms 432ms 154ms 3,526 9m5s select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Mar 02 05 3 369ms 123ms 06 53 6s926ms 130ms 07 44 5s797ms 131ms 08 235 33s521ms 142ms 09 321 44s905ms 139ms 10 399 59s887ms 150ms 11 887 2m23s 162ms 12 1,127 3m8s 166ms 13 296 41s534ms 140ms 14 65 8s415ms 129ms 15 61 7s984ms 130ms 16 32 4s162ms 130ms 17 3 383ms 127ms -
select id, class_code from product_warehouse_inventory where product_id = 216174 and warehouse_id = 37;
Date: 2024-03-02 12:13:56 Duration: 432ms
-
select id, class_code from product_warehouse_inventory where product_id = 185364 and warehouse_id = 38;
Date: 2024-03-02 13:03:05 Duration: 405ms
-
select id, class_code from product_warehouse_inventory where product_id = 204082 and warehouse_id = 41;
Date: 2024-03-02 12:04:01 Duration: 373ms
20 120ms 565ms 153ms 1,683 4m18s select id from ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and date::date = date ?::timestamp and item_demand_plan_id = ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) t where t.rnum > ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Mar 02 08 197 29s214ms 148ms 09 228 33s703ms 147ms 10 415 1m4s 154ms 11 475 1m13s 154ms 12 368 57s997ms 157ms -
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 195924 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 11:31:48 Duration: 565ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 203744 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 11:41:28 Duration: 549ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 218621 and date::date = DATE '2024-03-31T00:00:00'::timestamp and item_demand_plan_id = 3843 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-03-02 12:25:44 Duration: 523ms
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
- 75,313 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 1723 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 1,353 Max number of times the same event was reported
- 1,723 Total events found
Rank Times reported Error 1 1,353 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Mar 02 00 44 01 70 02 46 03 35 04 404 05 215 06 44 07 46 08 36 09 32 10 44 11 46 12 29 13 30 14 25 15 32 16 25 17 23 18 17 19 25 20 25 21 28 22 24 23 8 - ERROR: could not obtain lock on row in relation "ir_cron"
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=67 FOR UPDATE NOWAIT
Date: 2024-03-02 22:50:20
2 158 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Mar 02 00 3 01 1 03 7 04 4 05 3 07 1 08 21 09 22 10 10 11 6 12 4 13 36 14 20 15 12 17 5 19 2 23 1 - ERROR: could not serialize access due to concurrent update
Statement: UPDATE "bus_presence" SET "last_poll"='2024-03-02 23:38:43',"last_presence"='2024-03-02 23:38:43.395053' WHERE id IN (154)
Date: 2024-03-02 23:38:43
3 105 ERROR: new row for relation "..." violates check constraint "..."
Times Reported Most Frequent Error / Event #3
Day Hour Count Mar 02 00 10 01 10 02 10 03 5 04 10 05 10 06 10 07 5 08 10 09 10 10 10 11 1 23 4 - ERROR: new row for relation "account_move_line" violates check constraint "account_move_line_check_amount_currency_balance_sign"
Detail: Failing row contains (4270557, 1225862, /, 2024-02-20, 0090043801, draft, 2, 1, 2, 14, 50048, 10, , 1.00, -357.32, 0.00, 0.00, 360.93, -360.93, -357.32, -357.32, -357.32, f, f, 2024-03-01, 2, 30565, null, null, null, null, null, null, null, null, null, t, null, , -360.93, -357.32, null, null, null, null, null, t, 1, 2024-02-23 06:00:16.107708, 1, 2024-03-02 23:01:17.298977, null, null, null, null, null, null, null, 44, Akron, null, new_product, 1, 357.32, null, null, null, null, null, null, null, null, null, t, null, exception, null, null, null, null, null, f, f, null, f, f, f).
Statement: UPDATE "account_move_line" SET "amount_currency"='-357.32',"amount_residual_currency"='-357.32',"price_subtotal"='-357.32',"price_total"='-357.32',"price_unit"='-357.32',"sign_price_subtotal"='357.32',"write_uid"=1,"write_date"=(now() at time zone 'UTC') WHERE id IN (4270557)Date: 2024-03-02 23:01:22
4 104 ERROR: current transaction is aborted, commands ignored until end of transaction block
Times Reported Most Frequent Error / Event #4
Day Hour Count Mar 02 00 10 01 9 02 9 03 5 04 10 05 11 06 10 07 5 08 10 09 10 10 10 11 1 23 4 - ERROR: current transaction is aborted, commands ignored until end of transaction block
Statement: INSERT INTO "edi_810_scheduler_details" ("id", "create_uid", "create_date", "write_uid", "write_date", "edi_810_ref", "rec_status", "total_time") VALUES (nextval('edi_810_scheduler_details_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), '0090043801', 'Match', '0.8476462364196777') RETURNING id
Date: 2024-03-02 23:01:22
5 2 LOG: process ... still waiting for ShareLock on transaction ... after ... ms
Times Reported Most Frequent Error / Event #5
Day Hour Count Mar 02 05 1 10 1 - ERROR: process 2524758 still waiting for ShareLock on transaction 243619058 after 1000.058 ms
- ERROR: process 768976 still waiting for ShareLock on transaction 243563369 after 1000.043 ms
Detail: Process holding the lock: 2529935. Wait queue: 2524758.
Context: while locking tuple (657,2) in relation "res_partner" SQL statement "SELECT 1 FROM ONLY "public"."res_partner" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x"
Statement: INSERT INTO "edi_810_invoice" ("id", "create_uid", "create_date", "write_uid", "write_date", "bill_date", "branch_id", "config_id", "cutoff_draft", "due_date", "edi_file", "errors", "has_charge_line", "inv_date", "inventory_vendor_id", "invoice_process_status", "manual_bill", "payment_term_code", "payment_term_id", "po_id", "po_reference", "pt_applicable_from", "pt_description", "pt_discount_due_date", "pt_discount_percent", "pt_net_due_date", "pt_total_discount", "ref_810", "st_branch_indicator", "system_read", "transmission_route", "v_bill_total", "vendor_id") VALUES (nextval('edi_810_invoice_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), '2024-02-29', 44, 1, false, '2024-03-30', ' <message> <sender>063711675</sender> <receiver>004498267</receiver> <testindicator>P</testindicator> <inv_ref>5862816</inv_ref> <inv_date>2024-02-29</inv_date> <po_number>B-02193</po_number> <totalinvoiceamount>9.49</totalinvoiceamount> <payment_term_code>01</payment_term_code> <termsapplicablefrom>3</termsapplicablefrom> <termsnetduedate>2024-03-30</termsnetduedate> <termdescription>NET30</termdescription> <partys> <party> <qual>RE</qual> <DUNS>0637116750004</DUNS> <name1>HDA Truck Pride</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>VN</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>SE</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> <party> <qual>ST</qual> <DUNS>0044982670008</DUNS> <name1>POINT SPRING & DRIVESHAFT</name1> <address1>1250 TRIPLETT BOULEVARD</address1> <city>AKRON</city> <pcode>44306</pcode> <state>OH</state> <country>USA</country> </party> <party> <qual>SF</qual> <DUNS>0637116750004</DUNS> <name1>HDA/Stemco, Inc.</name1> <address1>608 Lambert Pointe Drive Building C</address1> <city>Hazelwood</city> <pcode>63045</pcode> <state>MO</state> <country>USA</country> </party> </partys> <lines> <line> <buyer_part>450-4723</buyer_part> <inv_qty>1</inv_qty> <desc>KEEPER PRO-TORQ 137-004KS</desc> <unit_price>9.49</unit_price> <uom>EA</uom> </line> </lines> </message>', '', false, '2024-02-29', 3085, 'draft', false, '01', 94, 30734, 'B-02193', 'Invoice Date', 'NET30', NULL, NULL, '2024-03-30', NULL, '5862816', '0008', false, 'tie_kinetix', 9.49, 32877) RETURNING idDate: 2024-03-02 10:30:16
Detail: Process holding the lock: 817089. Wait queue: 768976.
Context: while deleting tuple (9608,66) in relation "ir_attachment"
Statement: DELETE FROM ir_attachment WHERE id IN (5124461, 5124460, 5124459, 5124458)Date: 2024-03-02 05:49:01
6 1 ERROR: could not serialize access due to concurrent delete
Times Reported Most Frequent Error / Event #6
Day Hour Count Mar 02 05 1 - ERROR: could not serialize access due to concurrent delete
Statement: DELETE FROM ir_attachment WHERE id IN (5124461, 5124460, 5124459, 5124458)
Date: 2024-03-02 05:49:07