-
Global information
- Generated on Sat Apr 6 23:50:15 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 246,689 log entries in 14s
- Log start from 2024-04-06 00:00:00 to 2024-04-06 23:48:39
-
Overview
Global Stats
- 230 Number of unique normalized queries
- 85,936 Number of queries
- 14h3m34s Total query duration
- 2024-04-06 00:00:00 First query
- 2024-04-06 23:48:39 Last query
- 22 queries/s at 2024-04-06 20:58:16 Query peak
- 14h3m34s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 14h3m34s Execute total duration
- 1,325 Number of events
- 3 Number of unique normalized events
- 1,305 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
- 85,936 Average queries per session
- 14h3m34s 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
- 22 queries/s Query Peak
- 2024-04-06 20:58:16 Date
SELECT Traffic
Key values
- 22 queries/s Query Peak
- 2024-04-06 20:58:16 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 4 queries/s Query Peak
- 2024-04-06 13:03:17 Date
Queries duration
Key values
- 14h3m34s 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) Apr 06 00 660 0ms 16s734ms 2s855ms 1m 1m1s 1m5s 01 1,932 120ms 6s888ms 1s742ms 1m37s 2m16s 2m48s 02 1,348 120ms 3s168ms 1s687ms 40s733ms 41s160ms 45s224ms 03 1,630 0ms 44s831ms 1s381ms 45s886ms 54s908ms 1m26s 04 6,912 120ms 7s202ms 631ms 1m51s 1m57s 2m26s 05 7,068 120ms 1s917ms 491ms 1m6s 1m8s 1m12s 06 6,853 120ms 1s683ms 493ms 1m2s 1m2s 1m7s 07 7,358 120ms 3s61ms 490ms 1m9s 1m36s 1m44s 08 7,103 120ms 1s548ms 487ms 1m4s 1m5s 1m21s 09 7,777 120ms 5m7s 595ms 1m52s 2m47s 6m9s 10 6,940 120ms 1s699ms 486ms 1m 1m2s 1m7s 11 10,956 120ms 7s541ms 472ms 1m58s 2m1s 2m19s 12 14,940 120ms 4s629ms 487ms 2m37s 2m53s 3m5s 13 3,121 0ms 3s288ms 524ms 2m44s 2m46s 2m47s 14 76 0ms 567ms 251ms 3s498ms 5s773ms 5s773ms 15 76 0ms 1s63ms 498ms 5s991ms 18s921ms 18s921ms 16 93 0ms 7s682ms 384ms 4s331ms 4s354ms 13s256ms 17 137 0ms 512ms 285ms 4s773ms 4s786ms 6s462ms 18 75 0ms 1s794ms 326ms 4s556ms 4s687ms 4s687ms 19 88 0ms 496ms 316ms 4s615ms 5s161ms 5s161ms 20 145 0ms 660ms 262ms 5s116ms 5s937ms 9s369ms 21 199 0ms 1s495ms 376ms 12s251ms 29s886ms 29s886ms 22 124 0ms 837ms 277ms 5s188ms 5s582ms 6s16ms 23 325 0ms 1s746ms 305ms 9s224ms 10s255ms 28s391ms Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Apr 06 00 64 0 485ms 790ms 2s172ms 4s620ms 01 1,089 0 718ms 16s273ms 28s127ms 46s730ms 02 735 0 737ms 9s461ms 10s705ms 12s555ms 03 1,103 0 733ms 13s119ms 32s545ms 53s946ms 04 5,358 0 623ms 1m1s 1m19s 1m32s 05 5,509 0 590ms 58s749ms 1m1s 1m4s 06 5,427 0 586ms 56s328ms 58s21ms 1m 07 5,797 0 584ms 58s792ms 1m6s 1m33s 08 5,554 0 584ms 56s670ms 59s973ms 1m8s 09 5,999 104 718ms 1m7s 1m26s 2m6s 10 5,486 0 577ms 55s120ms 56s507ms 1m1s 11 8,145 0 581ms 1m45s 1m47s 1m51s 12 10,954 0 604ms 1m56s 2m24s 2m39s 13 2,324 0 646ms 1m55s 2m30s 2m34s 14 76 0 251ms 3s480ms 3s498ms 5s773ms 15 76 0 498ms 5s514ms 5s991ms 18s921ms 16 74 0 404ms 2s348ms 3s118ms 13s256ms 17 137 0 285ms 3s690ms 4s773ms 6s462ms 18 73 0 326ms 3s132ms 4s556ms 4s687ms 19 88 0 316ms 4s114ms 4s615ms 5s161ms 20 145 0 262ms 3s869ms 5s116ms 9s369ms 21 199 0 376ms 9s175ms 12s251ms 29s886ms 22 124 0 277ms 1s819ms 5s188ms 6s16ms 23 306 0 223ms 6s716ms 7s760ms 10s448ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Apr 06 00 0 590 0 0 3s27ms 57s280ms 1m 1m 01 0 841 0 0 3s61ms 31s752ms 1m 1m56s 02 0 613 0 0 2s827ms 28s920ms 30s897ms 31s419ms 03 0 511 2 0 2s807ms 29s408ms 29s892ms 30s535ms 04 0 313 0 0 2s698ms 26s598ms 28s371ms 29s942ms 05 0 0 0 0 0ms 0ms 0ms 0ms 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 0 0 0 0ms 0ms 0ms 0ms 08 0 0 0 0 0ms 0ms 0ms 0ms 09 0 0 0 0 0ms 0ms 0ms 0ms 10 0 0 0 0 0ms 0ms 0ms 0ms 11 0 2 0 0 346ms 0ms 0ms 0ms 12 0 0 0 0 0ms 0ms 0ms 0ms 13 0 2 0 0 334ms 0ms 0ms 669ms 14 0 0 0 0 0ms 0ms 0ms 0ms 15 0 0 0 0 0ms 0ms 0ms 0ms 16 0 19 0 0 308ms 0ms 0ms 4s167ms 17 0 0 0 0 0ms 0ms 0ms 0ms 18 0 2 0 0 337ms 0ms 0ms 674ms 19 0 0 0 0 0ms 0ms 0ms 0ms 20 0 0 0 0 0ms 0ms 0ms 0ms 21 0 0 0 0 0ms 0ms 0ms 0ms 22 0 0 0 0 0ms 0ms 0ms 0ms 23 0 0 19 0 1s635ms 0ms 0ms 17s943ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Apr 06 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 Apr 06 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 Apr 06 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 Apr 06 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 Apr 06 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) Apr 06 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 Apr 06 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 Apr 06 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 Apr 06 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
- unknown Main Lock Type
- 0 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query NO DATASET
Queries that waited the most
Rank Wait time Query NO DATASET
-
Queries
Queries by type
Key values
- 64,842 Total read queries
- 21,094 Total write queries
Queries by database
Key values
- unknown Main database
- 85,936 Requests
- 14h3m34s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 86,121 Requests
User Request type Count Duration unknown Total 86,121 14h11m50s copy to 104 14m6s cte 18,077 47m delete 21 1m21s select 64,868 10h42m27s update 3,051 2h26m54s Duration by user
Key values
- 14h11m50s (unknown) Main time consuming user
User Request type Count Duration unknown Total 86,121 14h11m50s copy to 104 14m6s cte 18,077 47m delete 21 1m21s select 64,868 10h42m27s update 3,051 2h26m54s Queries by host
Key values
- unknown Main host
- 86,121 Requests
- 14h11m50s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 85,936 Requests
- 14h3m34s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-04-06 10:09:49 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 46,263 100-500ms duration
Slowest individual queries
Rank Duration Query 1 5m7s 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-04-06 09:10:49 ]
2 1m54s 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-04-06 09:03:42 ]
3 1m47s 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-04-06 09:05:41 ]
4 44s831ms DELETE FROM account_move_line WHERE id IN (4676047, 4676048, 4676049, 4676050, 4676051, 4676052, 4676053, 4676054, 4676055, 4676056, 4676057, 4676058, 4676059, 4676060, 4676061, 4676062, 4676063, 4676064, 4676065, 4676066, 4676067, 4676068, 4676069, 4676070, 4676071, 4676072, 4676073);[ Date: 2024-04-06 03:25:05 ]
5 31s724ms 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-04-06 09:00:52 ]
6 21s822ms 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-04-06 09:12:57 ]
7 18s999ms COPY public.website_track (id, visitor_id, page_id, url, visit_datetime, product_id) TO stdout;[ Date: 2024-04-06 09:14:02 ]
8 17s580ms 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-04-06 09:01:18 ]
9 16s734ms with data as ( select distinct shl.id as record, 3861, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424) UNION ALL ( select distinct sol.id as record, 3861, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424)) UNION ALL ( select distinct sm.id as record, 3861, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424))) 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 3861, 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-04-06 00:17:54 ]
10 14s511ms with data as ( select distinct shl.id as record, 3863, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 209263) UNION ALL ( select distinct sol.id as record, 3863, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 209263)) UNION ALL ( select distinct sm.id as record, 3863, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 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 3863, 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-04-06 00:45:00 ]
11 14s316ms with data as ( select distinct shl.id as record, 3862, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211) UNION ALL ( select distinct sol.id as record, 3862, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211)) UNION ALL ( select distinct sm.id as record, 3862, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211))) 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 3862, 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-04-06 00:30:37 ]
12 14s309ms 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-04-06 09:14:16 ]
13 14s207ms COPY public.product_library (id, price_sheet_control_id, inventory_vendor_id, vendor_short_name, part_type_id, part_type_option, default_code, name, description_sale, description, condensed_product_name, manufacturer_product_name, weight, uom_id, standard_price, current_cost, rebate_cost, purchase_cost, list_price, better, best, list_jobber, core_part_no, cores_per_part, core_cost, core_price_part_dmg_1, core_price_part_dmg_2, used_core_description, man_cost_update, call_for_prise, product_update_date, standard_carton_quantity, additional_description_sale, active, volume, is_exception, create_uid, create_date, write_uid, write_date, library_duplicate_check) TO stdout;[ Date: 2024-04-06 09:11:18 ]
14 13s350ms 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-04-06 09:00:20 ]
15 10s648ms COPY public.price_sheet (id, price_sheet_control_id, inventory_vendor_id, vendor_short_name, part_type_id, part_type_option, default_code, name, description_sale, description, additional_description_sale, condensed_product_name, manufacturer_product_name, weight, uom_id, standard_price, current_cost, rebate_cost, purchase_cost, list_price, better, best, list_jobber, core_part_no, cores_per_part, core_cost, core_price_part_dmg_1, core_price_part_dmg_2, used_core_description, man_cost_update, call_for_prise, product_update_date, standard_carton_quantity, active, volume, is_exception, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-04-06 09:11:01 ]
16 9s843ms with data as ( select distinct shl.id as record, 3860, 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 = 44 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (203327, 171548, 238910, 171832, 215185, 187614, 187624, 239523, 180807, 188396, 204988, 189019, 260429, 261328, 202577, 213321, 261681, 181233, 202583, 202633, 203629, 203518, 213277, 203519, 213279, 186807, 202653, 203404, 202632, 202639, 228221, 202640, 171812, 197352, 190015, 187628, 255148, 188579, 203502, 202634, 213569, 239405, 262089, 215187, 203680, 187918, 172597, 197466, 197864, 171894, 171861, 239344, 183353, 180822, 239522, 261331, 202652, 248827, 193642, 242320, 187627, 183325, 261130, 259053, 261682, 172472, 197457, 187616, 173349, 260430, 198309, 187615, 184456, 261332, 197367, 245355, 202641, 202477, 220916, 247988) UNION ALL ( select distinct sol.id as record, 3860, 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 = 44 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (203327, 171548, 238910, 171832, 215185, 187614, 187624, 239523, 180807, 188396, 204988, 189019, 260429, 261328, 202577, 213321, 261681, 181233, 202583, 202633, 203629, 203518, 213277, 203519, 213279, 186807, 202653, 203404, 202632, 202639, 228221, 202640, 171812, 197352, 190015, 187628, 255148, 188579, 203502, 202634, 213569, 239405, 262089, 215187, 203680, 187918, 172597, 197466, 197864, 171894, 171861, 239344, 183353, 180822, 239522, 261331, 202652, 248827, 193642, 242320, 187627, 183325, 261130, 259053, 261682, 172472, 197457, 187616, 173349, 260430, 198309, 187615, 184456, 261332, 197367, 245355, 202641, 202477, 220916, 247988)) UNION ALL ( select distinct sm.id as record, 3860, 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 = 44 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (203327, 171548, 238910, 171832, 215185, 187614, 187624, 239523, 180807, 188396, 204988, 189019, 260429, 261328, 202577, 213321, 261681, 181233, 202583, 202633, 203629, 203518, 213277, 203519, 213279, 186807, 202653, 203404, 202632, 202639, 228221, 202640, 171812, 197352, 190015, 187628, 255148, 188579, 203502, 202634, 213569, 239405, 262089, 215187, 203680, 187918, 172597, 197466, 197864, 171894, 171861, 239344, 183353, 180822, 239522, 261331, 202652, 248827, 193642, 242320, 187627, 183325, 261130, 259053, 261682, 172472, 197457, 187616, 173349, 260430, 198309, 187615, 184456, 261332, 197367, 245355, 202641, 202477, 220916, 247988))) 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 3860, 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 = 44);[ Date: 2024-04-06 00:08:20 ]
17 9s329ms COPY public.bus_bus (id, channel, message, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-04-06 09:01:27 ]
18 8s664ms COPY public.stock_move (id, name, sequence, priority, create_date, date, date_deadline, company_id, product_id, description_picking, product_qty, product_uom_qty, product_uom, location_id, location_dest_id, partner_id, picking_id, note, state, price_unit, origin, procure_method, scrapped, group_id, rule_id, propagate_cancel, delay_alert_date, picking_type_id, inventory_id, origin_returned_move_id, restrict_partner_id, warehouse_id, additional, reference, package_level_id, next_serial, next_serial_count, orderpoint_id, create_uid, write_uid, write_date, to_refund, sale_line_id, purchase_line_id, created_purchase_line_id, is_done, created_production_id, production_id, raw_material_production_id, unbuild_id, consume_unbuild_id, operation_id, workorder_id, bom_line_id, byproduct_id, unit_factor, branch_id, weight, move_options, related_core_sale_line_id, related_core_purchase_line_id, sm_line_id, core_qty, bom_action, mrp_core_move, repair_id, repair_line_id, related_core_repair_line_id, related_bom_line_id, mrp_finish_core_move, picking_code, transfer_line_id, src_warehouse_id, dest_warehouse_id, current_warehouse_qty, is_core, inventory_vendor_id, technician_name_required, technician_id) TO stdout;[ Date: 2024-04-06 09:13:24 ]
19 7s682ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 19573)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-04-06 16:43:43 ]
20 7s541ms select DISTINCT idp.id as item_demand_plan_id from item_demand_plan idp LEFT JOIN item_list_line AS ill ON idp.id = ill.item_demand_plan_id LEFT JOIN forecasted_data AS fd ON idp.id = fd.item_demand_plan_id WHERE idp.fetch_data_done = True and idp.active = True and idp.create_date > current_timestamp - interval '3 day' and ill.method not in (7, 8) and idp.id not in ( select item_demand_plan_id from item_list_line where COALESCE(method, 111) = 111) and fd.id is null group by idp.id, ill.method;[ Date: 2024-04-06 11:30:15 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 8h58m38s 34,954 775ms 4s107ms 924ms 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 Apr 06 01 721 10m13s 850ms 02 612 8m28s 830ms 03 664 9m10s 828ms 04 3,109 47m 907ms 05 3,252 48m35s 896ms 06 3,264 47m35s 874ms 07 3,273 48m16s 884ms 08 3,255 48m19s 890ms 09 3,209 48m39s 909ms 10 3,287 47m28s 866ms 11 4,196 1h7m54s 970ms 12 5,089 1h28m56s 1s48ms 13 1,023 18m1s 1s57ms -
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 = 196526 and item_demand_plan_id = 3858 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-04-06 12:01:30 Duration: 4s107ms
-
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 = 263599 and item_demand_plan_id = 3863 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-04-06 01:01:28 Duration: 4s36ms
-
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 = 179647 and item_demand_plan_id = 3864 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-04-06 12:51:03 Duration: 3s474ms
2 1h40m19s 2,109 2s572ms 4s853ms 2s854ms 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 #2
Day Hour Count Duration Avg duration Apr 06 01 676 34m13s 3s37ms 02 613 28m53s 2s827ms 03 510 23m9s 2s725ms 04 310 14m3s 2s720ms -
update item_list_line set method = 9, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 172999 and item_demand_plan_id = 3854;
Date: 2024-04-06 01:01:21 Duration: 4s853ms
-
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 = 262425 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:02:13 Duration: 4s671ms
-
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 = 173579 and item_demand_plan_id = 3854;
Date: 2024-04-06 01:02:14 Duration: 4s502ms
3 45m26s 18,013 120ms 699ms 151ms 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 #3
Day Hour Count Duration Avg duration Apr 06 03 13 1s830ms 140ms 04 1,240 2m59s 144ms 05 1,559 3m41s 142ms 06 1,424 3m20s 140ms 07 1,558 3m42s 142ms 08 1,545 3m38s 141ms 09 1,660 4m3s 146ms 10 1,451 3m23s 140ms 11 2,801 7m14s 155ms 12 3,973 11m5s 167ms 13 789 2m13s 169ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 179653 and item_demand_plan_id = 3864 AND date::date = DATE '2024-04-30' 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-04-06 12:50:55 Duration: 699ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 179246 and item_demand_plan_id = 3864 AND date::date = DATE '2024-04-30' 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-04-06 12:51:31 Duration: 685ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 172184 and item_demand_plan_id = 3861 AND date::date = DATE '2024-04-30' 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-04-06 12:55:26 Duration: 676ms
4 39m34s 17,051 120ms 446ms 139ms 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 Apr 06 03 15 1s909ms 127ms 04 1,169 2m35s 133ms 05 1,464 3m11s 130ms 06 1,427 3m5s 129ms 07 1,561 3m24s 131ms 08 1,468 3m11s 130ms 09 1,580 3m31s 134ms 10 1,403 3m2s 129ms 11 2,550 6m5s 143ms 12 3,678 9m28s 154ms 13 736 1m54s 154ms -
select id, class_code from product_warehouse_inventory where product_id = 211235 and warehouse_id = 44;
Date: 2024-04-06 12:03:50 Duration: 446ms
-
select id, class_code from product_warehouse_inventory where product_id = 179246 and warehouse_id = 44;
Date: 2024-04-06 12:51:30 Duration: 440ms
-
select id, class_code from product_warehouse_inventory where product_id = 187592 and warehouse_id = 42;
Date: 2024-04-06 12:05:17 Duration: 424ms
5 38m24s 753 2s971ms 4s672ms 3s60ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true, method = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Apr 06 00 590 29m45s 3s27ms 01 163 8m38s 3s179ms -
update item_list_line set product_id = 205019, supercede_product_id = 241794, superceded = True, method = Null where product_id = 241794 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:02:13 Duration: 4s672ms
-
update item_list_line set product_id = 189697, supercede_product_id = 241418, superceded = True, method = Null where product_id = 241418 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:01:20 Duration: 4s453ms
-
update item_list_line set product_id = 195983, supercede_product_id = 241519, superceded = True, method = Null where product_id = 241519 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:01:28 Duration: 4s244ms
6 35m14s 10,641 120ms 936ms 198ms 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 #6
Day Hour Count Duration Avg duration Apr 06 00 32 10s806ms 337ms 01 186 30s423ms 163ms 02 114 26s53ms 228ms 03 160 36s548ms 228ms 04 852 2m30s 176ms 05 790 2m23s 181ms 06 728 2m14s 185ms 07 794 2m16s 171ms 08 824 2m32s 184ms 09 982 3m10s 193ms 10 785 2m12s 169ms 11 1,381 4m23s 190ms 12 1,900 6m47s 214ms 13 362 1m21s 226ms 14 71 18s405ms 259ms 15 57 18s990ms 333ms 16 60 16s581ms 276ms 17 122 35s401ms 290ms 18 53 15s723ms 296ms 19 85 27s188ms 319ms 20 114 30s889ms 270ms 21 50 14s263ms 285ms 22 82 23s515ms 286ms 23 57 17s188ms 301ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-04-06 05:00:38') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_965"', '["pointspring_master","calendar.alarm",19503]', '["pointspring_master","mail.channel",148]', '["pointspring_master","mail.channel",149]', '["pointspring_master","mail.channel",150]', '["pointspring_master","mail.channel",448]', '["pointspring_master","mail.channel",546]', '["pointspring_master","mail.channel",551]', '["pointspring_master","mail.channel",569]', '["pointspring_master","res.partner",19503]', '["pointspring_master","ir.needaction",19503]'))) ORDER BY "bus_bus"."id";
Date: 2024-04-06 05:01:28 Duration: 936ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-04-06 05:00:38') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1213"', '["pointspring_master","calendar.alarm",50343]', '["pointspring_master","mail.channel",459]', '["pointspring_master","mail.channel",533]', '["pointspring_master","mail.channel",534]', '["pointspring_master","mail.channel",603]', '["pointspring_master","mail.channel",604]', '["pointspring_master","res.partner",50343]', '["pointspring_master","ir.needaction",50343]'))) ORDER BY "bus_bus"."id";
Date: 2024-04-06 05:01:28 Duration: 888ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-04-06 11:05:02') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1021"', '["pointspring_master","calendar.alarm",19559]', '["pointspring_master","mail.channel",132]', '["pointspring_master","mail.channel",133]', '["pointspring_master","mail.channel",134]', '["pointspring_master","mail.channel",135]', '["pointspring_master","mail.channel",499]', '["pointspring_master","res.partner",19559]', '["pointspring_master","ir.needaction",19559]'))) ORDER BY "bus_bus"."id";
Date: 2024-04-06 11:05:53 Duration: 879ms
7 5m34s 381 740ms 2s47ms 876ms 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 Apr 06 01 99 1m20s 814ms 03 119 1m37s 818ms 04 163 2m35s 956ms -
select id from item_list_line where product_id = 264198 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:07:53 Duration: 2s47ms
-
select id from item_list_line where product_id = 253838 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:01:11 Duration: 1s844ms
-
select id from item_list_line where product_id = 263485 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:07:14 Duration: 1s808ms
8 5m7s 1 5m7s 5m7s 5m7s 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 #8
Day Hour Count Duration Avg duration Apr 06 09 1 5m7s 5m7s -
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-04-06 09:10:49 Duration: 5m7s
9 4m9s 184 965ms 4s629ms 1s355ms 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 Apr 06 03 24 25s439ms 1s59ms 04 6 7s615ms 1s269ms 07 29 35s435ms 1s221ms 09 42 53s246ms 1s267ms 12 45 1m16s 1s689ms 13 38 51s607ms 1s358ms -
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 = 3859 and ill.method not in (8, 7);
Date: 2024-04-06 12:51:50 Duration: 4s629ms
-
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 = 3854 and ill.method not in (8, 7);
Date: 2024-04-06 12:52:50 Duration: 2s439ms
-
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 = 3863 and ill.method not in (8, 7);
Date: 2024-04-06 09:30:44 Duration: 2s195ms
10 4m1s 184 866ms 3s465ms 1s311ms 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 Apr 06 03 24 23s770ms 990ms 04 6 6s202ms 1s33ms 07 29 36s706ms 1s265ms 09 42 50s781ms 1s209ms 12 45 1m7s 1s491ms 13 38 56s660ms 1s491ms -
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 = 3862 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 09:21:06 Duration: 3s465ms
-
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 = 3858 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 12:02:29 Duration: 3s441ms
-
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 = 3863 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 13:06:20 Duration: 3s158ms
11 3m49s 185 837ms 4s311ms 1s238ms 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 Apr 06 03 25 23s909ms 956ms 04 6 6s477ms 1s79ms 07 29 31s134ms 1s73ms 09 42 47s904ms 1s140ms 12 45 1m13s 1s635ms 13 38 46s187ms 1s215ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3859 and active = True;
Date: 2024-04-06 12:51:43 Duration: 4s311ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3865 and active = True;
Date: 2024-04-06 12:50:31 Duration: 4s252ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3856 and active = True;
Date: 2024-04-06 12:02:47 Duration: 4s68ms
12 3m24s 185 728ms 3s618ms 1s106ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Apr 06 03 25 20s113ms 804ms 04 6 4s592ms 765ms 07 29 29s764ms 1s26ms 09 42 39s543ms 941ms 12 45 1m4s 1s435ms 13 38 46s47ms 1s211ms -
select count(id) from item_list_line where item_demand_plan_id = 3864;
Date: 2024-04-06 12:50:58 Duration: 3s618ms
-
select count(id) from item_list_line where item_demand_plan_id = 3861;
Date: 2024-04-06 13:06:42 Duration: 3s288ms
-
select count(id) from item_list_line where item_demand_plan_id = 3864;
Date: 2024-04-06 12:45:24 Duration: 3s144ms
13 1m54s 1 1m54s 1m54s 1m54s 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;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Apr 06 09 1 1m54s 1m54s -
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-04-06 09:03:42 Duration: 1m54s
14 1m47s 1 1m47s 1m47s 1m47s 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;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Apr 06 09 1 1m47s 1m47s -
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-04-06 09:05:41 Duration: 1m47s
15 1m18s 8 3s917ms 16s734ms 9s764ms 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 #15
Day Hour Count Duration Avg duration Apr 06 00 6 1m7s 11s218ms 01 2 10s806ms 5s403ms -
with data as ( select distinct shl.id as record, 3861, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424) UNION ALL ( select distinct sol.id as record, 3861, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424)) UNION ALL ( select distinct sm.id as record, 3861, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424))) 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 3861, 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-04-06 00:17:54 Duration: 16s734ms
-
with data as ( select distinct shl.id as record, 3863, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 209263) UNION ALL ( select distinct sol.id as record, 3863, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 209263)) UNION ALL ( select distinct sm.id as record, 3863, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 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 3863, 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-04-06 00:45:00 Duration: 14s511ms
-
with data as ( select distinct shl.id as record, 3862, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211) UNION ALL ( select distinct sol.id as record, 3862, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211)) UNION ALL ( select distinct sm.id as record, 3862, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211))) 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 3862, 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-04-06 00:30:37 Duration: 14s316ms
16 1m15s 20 1s592ms 44s831ms 3s794ms delete from account_move_line where id in (...);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Apr 06 03 1 44s831ms 44s831ms 23 19 31s67ms 1s635ms -
DELETE FROM account_move_line WHERE id IN (4676047, 4676048, 4676049, 4676050, 4676051, 4676052, 4676053, 4676054, 4676055, 4676056, 4676057, 4676058, 4676059, 4676060, 4676061, 4676062, 4676063, 4676064, 4676065, 4676066, 4676067, 4676068, 4676069, 4676070, 4676071, 4676072, 4676073);
Date: 2024-04-06 03:25:05 Duration: 44s831ms
-
DELETE FROM account_move_line WHERE id IN (4671151);
Date: 2024-04-06 23:00:15 Duration: 1s746ms
-
DELETE FROM account_move_line WHERE id IN (4671947);
Date: 2024-04-06 23:42:15 Duration: 1s731ms
17 38s389ms 7 1s242ms 7s541ms 5s484ms select distinct idp.id as item_demand_plan_id from item_demand_plan idp left join item_list_line as ill on idp.id = ill.item_demand_plan_id left join forecasted_data as fd on idp.id = fd.item_demand_plan_id where idp.fetch_data_done = true and idp.active = true and idp.create_date > current_timestamp - interval ? and ill.method not in (...) and idp.id not in ( select item_demand_plan_id from item_list_line where coalesce(method, ?) = ?) and fd.id is null group by idp.id, ill.method;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Apr 06 03 1 6s599ms 6s599ms 04 2 14s136ms 7s68ms 11 2 15s73ms 7s536ms 13 1 1s242ms 1s242ms 18 1 1s337ms 1s337ms -
select DISTINCT idp.id as item_demand_plan_id from item_demand_plan idp LEFT JOIN item_list_line AS ill ON idp.id = ill.item_demand_plan_id LEFT JOIN forecasted_data AS fd ON idp.id = fd.item_demand_plan_id WHERE idp.fetch_data_done = True and idp.active = True and idp.create_date > current_timestamp - interval '3 day' and ill.method not in (7, 8) and idp.id not in ( select item_demand_plan_id from item_list_line where COALESCE(method, 111) = 111) and fd.id is null group by idp.id, ill.method;
Date: 2024-04-06 11:30:15 Duration: 7s541ms
-
select DISTINCT idp.id as item_demand_plan_id from item_demand_plan idp LEFT JOIN item_list_line AS ill ON idp.id = ill.item_demand_plan_id LEFT JOIN forecasted_data AS fd ON idp.id = fd.item_demand_plan_id WHERE idp.fetch_data_done = True and idp.active = True and idp.create_date > current_timestamp - interval '3 day' and ill.method not in (7, 8) and idp.id not in ( select item_demand_plan_id from item_list_line where COALESCE(method, 111) = 111) and fd.id is null group by idp.id, ill.method;
Date: 2024-04-06 11:30:14 Duration: 7s531ms
-
select DISTINCT idp.id as item_demand_plan_id from item_demand_plan idp LEFT JOIN item_list_line AS ill ON idp.id = ill.item_demand_plan_id LEFT JOIN forecasted_data AS fd ON idp.id = fd.item_demand_plan_id WHERE idp.fetch_data_done = True and idp.active = True and idp.create_date > current_timestamp - interval '3 day' and ill.method not in (7, 8) and idp.id not in ( select item_demand_plan_id from item_list_line where COALESCE(method, 111) = 111) and fd.id is null group by idp.id, ill.method;
Date: 2024-04-06 04:00:12 Duration: 7s202ms
18 35s193ms 23 1s73ms 2s491ms 1s530ms select distinct ill.product_id, fm.name as method 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 coalesce(method, ?) != ? and method not in (...) group by ill.product_id, fm.name;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Apr 06 03 1 1s157ms 1s157ms 04 3 4s399ms 1s466ms 06 2 2s740ms 1s370ms 07 2 3s211ms 1s605ms 08 1 1s548ms 1s548ms 09 3 3s876ms 1s292ms 10 2 2s943ms 1s471ms 11 4 7s130ms 1s782ms 12 2 3s333ms 1s666ms 13 3 4s851ms 1s617ms -
select DISTINCT ill.product_id, fm.name as method from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3864 and COALESCE(method, 111) != 111 and method not in (7, 8) group by ill.product_id, fm.name;
Date: 2024-04-06 11:30:19 Duration: 2s491ms
-
select DISTINCT ill.product_id, fm.name as method from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3861 and COALESCE(method, 111) != 111 and method not in (7, 8) group by ill.product_id, fm.name;
Date: 2024-04-06 13:01:10 Duration: 1s862ms
-
select DISTINCT ill.product_id, fm.name as method from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3855 and COALESCE(method, 111) != 111 and method not in (7, 8) group by ill.product_id, fm.name;
Date: 2024-04-06 04:00:15 Duration: 1s765ms
19 31s724ms 1 31s724ms 31s724ms 31s724ms 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;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Apr 06 09 1 31s724ms 31s724ms -
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-04-06 09:00:52 Duration: 31s724ms
20 29s711ms 23 1s24ms 1s917ms 1s291ms select coalesce(method, ?) from ( select ill.method from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where idp.active = true and ill.item_demand_plan_id = ? group by ill.method having count(ill.id) > ?) as t where method not in (...);Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Apr 06 03 1 1s151ms 1s151ms 04 3 3s299ms 1s99ms 06 2 2s105ms 1s52ms 07 2 2s150ms 1s75ms 08 1 1s184ms 1s184ms 09 3 3s990ms 1s330ms 10 2 2s124ms 1s62ms 11 4 6s385ms 1s596ms 12 2 2s804ms 1s402ms 13 3 4s513ms 1s504ms -
select COALESCE(method, 0) from ( select ill.method from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where idp.active = True and ill.item_demand_plan_id = 3861 GROUP BY ill.method having count(ill.id) > 0) as t where method not in (7, 8);
Date: 2024-04-06 13:01:11 Duration: 1s917ms
-
select COALESCE(method, 0) from ( select ill.method from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where idp.active = True and ill.item_demand_plan_id = 3864 GROUP BY ill.method having count(ill.id) > 0) as t where method not in (7, 8);
Date: 2024-04-06 11:30:16 Duration: 1s792ms
-
select COALESCE(method, 0) from ( select ill.method from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where idp.active = True and ill.item_demand_plan_id = 3858 GROUP BY ill.method having count(ill.id) > 0) as t where method not in (7, 8);
Date: 2024-04-06 11:58:48 Duration: 1s625ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 34,954 8h58m38s 775ms 4s107ms 924ms 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 Apr 06 01 721 10m13s 850ms 02 612 8m28s 830ms 03 664 9m10s 828ms 04 3,109 47m 907ms 05 3,252 48m35s 896ms 06 3,264 47m35s 874ms 07 3,273 48m16s 884ms 08 3,255 48m19s 890ms 09 3,209 48m39s 909ms 10 3,287 47m28s 866ms 11 4,196 1h7m54s 970ms 12 5,089 1h28m56s 1s48ms 13 1,023 18m1s 1s57ms -
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 = 196526 and item_demand_plan_id = 3858 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-04-06 12:01:30 Duration: 4s107ms
-
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 = 263599 and item_demand_plan_id = 3863 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-04-06 01:01:28 Duration: 4s36ms
-
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 = 179647 and item_demand_plan_id = 3864 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-04-06 12:51:03 Duration: 3s474ms
2 18,013 45m26s 120ms 699ms 151ms 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 Apr 06 03 13 1s830ms 140ms 04 1,240 2m59s 144ms 05 1,559 3m41s 142ms 06 1,424 3m20s 140ms 07 1,558 3m42s 142ms 08 1,545 3m38s 141ms 09 1,660 4m3s 146ms 10 1,451 3m23s 140ms 11 2,801 7m14s 155ms 12 3,973 11m5s 167ms 13 789 2m13s 169ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 179653 and item_demand_plan_id = 3864 AND date::date = DATE '2024-04-30' 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-04-06 12:50:55 Duration: 699ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 179246 and item_demand_plan_id = 3864 AND date::date = DATE '2024-04-30' 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-04-06 12:51:31 Duration: 685ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 172184 and item_demand_plan_id = 3861 AND date::date = DATE '2024-04-30' 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-04-06 12:55:26 Duration: 676ms
3 17,051 39m34s 120ms 446ms 139ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Apr 06 03 15 1s909ms 127ms 04 1,169 2m35s 133ms 05 1,464 3m11s 130ms 06 1,427 3m5s 129ms 07 1,561 3m24s 131ms 08 1,468 3m11s 130ms 09 1,580 3m31s 134ms 10 1,403 3m2s 129ms 11 2,550 6m5s 143ms 12 3,678 9m28s 154ms 13 736 1m54s 154ms -
select id, class_code from product_warehouse_inventory where product_id = 211235 and warehouse_id = 44;
Date: 2024-04-06 12:03:50 Duration: 446ms
-
select id, class_code from product_warehouse_inventory where product_id = 179246 and warehouse_id = 44;
Date: 2024-04-06 12:51:30 Duration: 440ms
-
select id, class_code from product_warehouse_inventory where product_id = 187592 and warehouse_id = 42;
Date: 2024-04-06 12:05:17 Duration: 424ms
4 10,641 35m14s 120ms 936ms 198ms 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 #4
Day Hour Count Duration Avg duration Apr 06 00 32 10s806ms 337ms 01 186 30s423ms 163ms 02 114 26s53ms 228ms 03 160 36s548ms 228ms 04 852 2m30s 176ms 05 790 2m23s 181ms 06 728 2m14s 185ms 07 794 2m16s 171ms 08 824 2m32s 184ms 09 982 3m10s 193ms 10 785 2m12s 169ms 11 1,381 4m23s 190ms 12 1,900 6m47s 214ms 13 362 1m21s 226ms 14 71 18s405ms 259ms 15 57 18s990ms 333ms 16 60 16s581ms 276ms 17 122 35s401ms 290ms 18 53 15s723ms 296ms 19 85 27s188ms 319ms 20 114 30s889ms 270ms 21 50 14s263ms 285ms 22 82 23s515ms 286ms 23 57 17s188ms 301ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-04-06 05:00:38') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_965"', '["pointspring_master","calendar.alarm",19503]', '["pointspring_master","mail.channel",148]', '["pointspring_master","mail.channel",149]', '["pointspring_master","mail.channel",150]', '["pointspring_master","mail.channel",448]', '["pointspring_master","mail.channel",546]', '["pointspring_master","mail.channel",551]', '["pointspring_master","mail.channel",569]', '["pointspring_master","res.partner",19503]', '["pointspring_master","ir.needaction",19503]'))) ORDER BY "bus_bus"."id";
Date: 2024-04-06 05:01:28 Duration: 936ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-04-06 05:00:38') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1213"', '["pointspring_master","calendar.alarm",50343]', '["pointspring_master","mail.channel",459]', '["pointspring_master","mail.channel",533]', '["pointspring_master","mail.channel",534]', '["pointspring_master","mail.channel",603]', '["pointspring_master","mail.channel",604]', '["pointspring_master","res.partner",50343]', '["pointspring_master","ir.needaction",50343]'))) ORDER BY "bus_bus"."id";
Date: 2024-04-06 05:01:28 Duration: 888ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-04-06 11:05:02') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1021"', '["pointspring_master","calendar.alarm",19559]', '["pointspring_master","mail.channel",132]', '["pointspring_master","mail.channel",133]', '["pointspring_master","mail.channel",134]', '["pointspring_master","mail.channel",135]', '["pointspring_master","mail.channel",499]', '["pointspring_master","res.partner",19559]', '["pointspring_master","ir.needaction",19559]'))) ORDER BY "bus_bus"."id";
Date: 2024-04-06 11:05:53 Duration: 879ms
5 2,109 1h40m19s 2s572ms 4s853ms 2s854ms 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 #5
Day Hour Count Duration Avg duration Apr 06 01 676 34m13s 3s37ms 02 613 28m53s 2s827ms 03 510 23m9s 2s725ms 04 310 14m3s 2s720ms -
update item_list_line set method = 9, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 172999 and item_demand_plan_id = 3854;
Date: 2024-04-06 01:01:21 Duration: 4s853ms
-
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 = 262425 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:02:13 Duration: 4s671ms
-
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 = 173579 and item_demand_plan_id = 3854;
Date: 2024-04-06 01:02:14 Duration: 4s502ms
6 753 38m24s 2s971ms 4s672ms 3s60ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true, method = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Apr 06 00 590 29m45s 3s27ms 01 163 8m38s 3s179ms -
update item_list_line set product_id = 205019, supercede_product_id = 241794, superceded = True, method = Null where product_id = 241794 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:02:13 Duration: 4s672ms
-
update item_list_line set product_id = 189697, supercede_product_id = 241418, superceded = True, method = Null where product_id = 241418 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:01:20 Duration: 4s453ms
-
update item_list_line set product_id = 195983, supercede_product_id = 241519, superceded = True, method = Null where product_id = 241519 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:01:28 Duration: 4s244ms
7 381 5m34s 740ms 2s47ms 876ms 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 Apr 06 01 99 1m20s 814ms 03 119 1m37s 818ms 04 163 2m35s 956ms -
select id from item_list_line where product_id = 264198 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:07:53 Duration: 2s47ms
-
select id from item_list_line where product_id = 253838 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:01:11 Duration: 1s844ms
-
select id from item_list_line where product_id = 263485 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:07:14 Duration: 1s808ms
8 185 3m49s 837ms 4s311ms 1s238ms select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Apr 06 03 25 23s909ms 956ms 04 6 6s477ms 1s79ms 07 29 31s134ms 1s73ms 09 42 47s904ms 1s140ms 12 45 1m13s 1s635ms 13 38 46s187ms 1s215ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3859 and active = True;
Date: 2024-04-06 12:51:43 Duration: 4s311ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3865 and active = True;
Date: 2024-04-06 12:50:31 Duration: 4s252ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3856 and active = True;
Date: 2024-04-06 12:02:47 Duration: 4s68ms
9 185 3m24s 728ms 3s618ms 1s106ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Apr 06 03 25 20s113ms 804ms 04 6 4s592ms 765ms 07 29 29s764ms 1s26ms 09 42 39s543ms 941ms 12 45 1m4s 1s435ms 13 38 46s47ms 1s211ms -
select count(id) from item_list_line where item_demand_plan_id = 3864;
Date: 2024-04-06 12:50:58 Duration: 3s618ms
-
select count(id) from item_list_line where item_demand_plan_id = 3861;
Date: 2024-04-06 13:06:42 Duration: 3s288ms
-
select count(id) from item_list_line where item_demand_plan_id = 3864;
Date: 2024-04-06 12:45:24 Duration: 3s144ms
10 184 4m9s 965ms 4s629ms 1s355ms 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 #10
Day Hour Count Duration Avg duration Apr 06 03 24 25s439ms 1s59ms 04 6 7s615ms 1s269ms 07 29 35s435ms 1s221ms 09 42 53s246ms 1s267ms 12 45 1m16s 1s689ms 13 38 51s607ms 1s358ms -
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 = 3859 and ill.method not in (8, 7);
Date: 2024-04-06 12:51:50 Duration: 4s629ms
-
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 = 3854 and ill.method not in (8, 7);
Date: 2024-04-06 12:52:50 Duration: 2s439ms
-
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 = 3863 and ill.method not in (8, 7);
Date: 2024-04-06 09:30:44 Duration: 2s195ms
11 184 4m1s 866ms 3s465ms 1s311ms 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 #11
Day Hour Count Duration Avg duration Apr 06 03 24 23s770ms 990ms 04 6 6s202ms 1s33ms 07 29 36s706ms 1s265ms 09 42 50s781ms 1s209ms 12 45 1m7s 1s491ms 13 38 56s660ms 1s491ms -
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 = 3862 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 09:21:06 Duration: 3s465ms
-
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 = 3858 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 12:02:29 Duration: 3s441ms
-
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 = 3863 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 13:06:20 Duration: 3s158ms
12 110 18s142ms 121ms 401ms 164ms select count(id) as total_forecast_count from forecasted_data where is_forcast = true and item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Apr 06 03 3 413ms 137ms 04 2 313ms 156ms 07 15 2s238ms 149ms 09 23 3s460ms 150ms 12 42 7s555ms 179ms 13 25 4s162ms 166ms -
select count(id) as total_forecast_count from forecasted_data where is_forcast = True and item_demand_plan_id = 3864 and active = True;
Date: 2024-04-06 12:54:21 Duration: 401ms
-
select count(id) as total_forecast_count from forecasted_data where is_forcast = True and item_demand_plan_id = 3856 and active = True;
Date: 2024-04-06 12:02:47 Duration: 353ms
-
select count(id) as total_forecast_count from forecasted_data where is_forcast = True and item_demand_plan_id = 3864 and active = True;
Date: 2024-04-06 12:45:21 Duration: 334ms
13 103 17s791ms 150ms 236ms 172ms 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 #13
Day Hour Count Duration Avg duration Apr 06 03 17 2s863ms 168ms 07 14 2s989ms 213ms 23 72 11s938ms 165ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (49265)) AND (("account_move"."id" not in (1327249)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 07:42:16 Duration: 236ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (49238)) AND (("account_move"."id" not in (1280508)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 07:36:18 Duration: 235ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (49112)) AND (("account_move"."id" not in (1266303)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 07:30:23 Duration: 233ms
14 96 20s584ms 209ms 237ms 214ms 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 #14
Day Hour Count Duration Avg duration Apr 06 06 3 668ms 222ms 16 3 650ms 216ms 17 6 1s274ms 212ms 20 6 1s265ms 210ms 21 36 7s681ms 213ms 22 6 1s284ms 214ms 23 36 7s760ms 215ms -
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-04-06 06:29:02 Duration: 237ms
-
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-04-06 23:21:46 Duration: 235ms
-
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-04-06 23:21:47 Duration: 230ms
15 87 25s21ms 279ms 319ms 287ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Apr 06 17 3 870ms 290ms 20 6 1s732ms 288ms 21 36 10s308ms 286ms 22 6 1s735ms 289ms 23 36 10s374ms 288ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-04-06 23:30:10 Duration: 319ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-04-06 23:30:09 Duration: 300ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-04-06 22:13:53 Duration: 297ms
16 87 18s683ms 208ms 250ms 214ms 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" desc, "product_template"."id" desc;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Apr 06 18 3 641ms 213ms 20 6 1s309ms 218ms 21 36 7s728ms 214ms 22 6 1s276ms 212ms 23 36 7s728ms 214ms -
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" DESC, "product_template"."id" DESC;
Date: 2024-04-06 23:13:25 Duration: 250ms
-
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" DESC, "product_template"."id" DESC;
Date: 2024-04-06 20:31:49 Duration: 245ms
-
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" DESC, "product_template"."id" DESC;
Date: 2024-04-06 21:30:32 Duration: 242ms
17 60 14s303ms 151ms 3s802ms 238ms select "account_move".id from "account_move" where ("account_move"."edi_810_id" in (...)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Apr 06 03 8 5s40ms 630ms 07 7 1s759ms 251ms 23 45 7s503ms 166ms -
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (38801, 41849, 42094, 43538, 43583, 43656, 43705, 43747, 43835, 43969, 43999, 44065, 44138, 44171, 44229, 44344, 44376, 44460, 44464, 44521, 44532, 44790, 44864, 44875, 44879, 44942, 45136, 45173, 45179, 45331, 45366, 45420, 45459, 45468, 45547, 45571, 45610, 45676, 45708, 45709)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 03:06:20 Duration: 3s802ms
-
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (49263, 49264, 49265, 49266, 49267, 49268, 49270, 49273, 49274)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 07:42:16 Duration: 547ms
-
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (45791, 45877, 45886, 45887, 45915, 45927, 45930, 45958, 45984, 45987, 45998, 46016, 46114, 46125, 46170, 46227, 46301, 46346, 46358, 46362, 46400, 46415, 46484, 46542, 46591, 46641, 46699, 46762, 46780, 46818, 47042, 47068, 47144, 47148, 47149, 47152, 47193, 47213, 47234, 47237)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 07:12:15 Duration: 260ms
18 52 6s750ms 120ms 215ms 129ms 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 #18
Day Hour Count Duration Avg duration Apr 06 03 1 128ms 128ms 04 1 120ms 120ms 06 2 310ms 155ms 07 2 242ms 121ms 08 3 365ms 121ms 09 13 1s634ms 125ms 10 3 372ms 124ms 11 8 1s27ms 128ms 12 13 1s752ms 134ms 13 6 795ms 132ms -
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-04-06 12:04:17 Duration: 215ms
-
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-04-06 06:02:18 Duration: 189ms
-
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-04-06 13:03:17 Duration: 182ms
19 46 7s114ms 120ms 319ms 154ms 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 #19
Day Hour Count Duration Avg duration Apr 06 03 4 806ms 201ms 04 21 3s219ms 153ms 05 2 314ms 157ms 08 5 775ms 155ms 10 7 1s78ms 154ms 14 5 671ms 134ms 20 1 120ms 120ms 21 1 128ms 128ms -
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-04-06 03:48:04 Duration: 319ms
-
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-04-06 03:48:05 Duration: 200ms
-
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-04-06 04:56:36 Duration: 180ms
20 44 18s547ms 369ms 817ms 421ms 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 #20
Day Hour Count Duration Avg duration Apr 06 00 4 1s485ms 371ms 01 4 1s484ms 371ms 03 1 369ms 369ms 07 3 1s160ms 386ms 09 9 3s707ms 411ms 12 6 3s387ms 564ms 13 3 1s710ms 570ms 16 4 1s511ms 377ms 18 4 1s503ms 375ms 22 6 2s226ms 371ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_backend.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-cdc6b64/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-04-06 12:50:35 Duration: 817ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-fb6cd24/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-04-06 13:03:57 Duration: 651ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_backend.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-cdc6b64/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-04-06 13:03:55 Duration: 620ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 5m7s 5m7s 5m7s 1 5m7s 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 Apr 06 09 1 5m7s 5m7s -
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-04-06 09:10:49 Duration: 5m7s
2 1m54s 1m54s 1m54s 1 1m54s 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;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Apr 06 09 1 1m54s 1m54s -
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-04-06 09:03:42 Duration: 1m54s
3 1m47s 1m47s 1m47s 1 1m47s 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;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Apr 06 09 1 1m47s 1m47s -
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-04-06 09:05:41 Duration: 1m47s
4 31s724ms 31s724ms 31s724ms 1 31s724ms 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;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Apr 06 09 1 31s724ms 31s724ms -
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-04-06 09:00:52 Duration: 31s724ms
5 3s917ms 16s734ms 9s764ms 8 1m18s 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 #5
Day Hour Count Duration Avg duration Apr 06 00 6 1m7s 11s218ms 01 2 10s806ms 5s403ms -
with data as ( select distinct shl.id as record, 3861, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424) UNION ALL ( select distinct sol.id as record, 3861, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424)) UNION ALL ( select distinct sm.id as record, 3861, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209573, 238977, 190525, 199584, 209299, 209256, 209198, 209328, 203690, 209335, 209494, 209436, 247413, 204056, 248827, 209473, 215733, 209268, 186297, 219750, 209340, 209497, 253188, 209354, 209365, 176822, 193411, 203634, 197240, 181409, 181351, 176679, 181014, 242323, 184037, 184038, 184040, 172771, 190640, 209518, 188135, 209537, 209259, 209513, 209462, 209357, 193359, 216568, 220144, 215085, 209330, 209318, 209507, 209480, 209379, 209309, 209519, 209332, 209185, 209191, 209266, 209232, 209258, 209247, 209176, 209569, 209306, 209177, 209216, 209220, 209485, 209311, 209412, 209280, 209277, 209253, 209367, 209276, 209459, 209228, 209194, 209514, 209359, 209466, 209439, 209384, 209403, 209451, 209396, 209172, 209180, 209182, 209195, 209470, 209483, 209418, 177924, 209201, 209339, 209390, 209189, 180821, 209281, 209503, 177926, 209227, 184136, 209356, 209415, 216289, 209210, 202632, 261330, 209370, 215693, 209225, 209226, 209427, 209261, 209254, 193161, 190999, 206498, 209517, 209231, 209526, 261331, 262499, 209392, 209202, 209479, 261332, 209282, 209344, 209562, 209561, 209329, 209269, 209421, 203645, 209352, 209460, 203194, 209469, 203493, 209265, 209563, 209475, 209186, 209314, 209207, 177948, 209452, 209468, 209440, 209316, 203674, 209319, 209315, 209181, 209206, 209241, 209322, 213768, 209331, 209360, 209271, 177747, 209538, 209423, 209235, 216254, 209279, 202477, 209484, 172604, 209435, 177947, 209179, 209250, 209441, 209520, 175953, 209512, 209416, 209325, 209425, 209243, 209398, 209193, 209187, 209298, 209515, 209214, 209192, 186232, 196255, 209372, 209317, 209378, 209487, 209238, 209501, 209509, 209184, 209321, 209304, 209511, 209230, 209212, 209245, 209496, 209555, 209324, 209558, 209303, 209545, 209251, 177935, 186295, 209229, 173819, 209502, 209529, 209343, 209528, 209252, 209442, 209175, 209361, 209525, 216353, 215536, 209389, 209572, 202687, 209437, 209570, 202634, 209262, 216288, 216169, 209567, 209211, 209474, 209492, 209347, 209310, 209221, 175955, 209430, 209196, 209505, 202652, 209257, 184009, 216830, 215083, 213767, 219982, 184449, 193059, 186294, 216172, 199582, 193110, 193111, 193215, 193569, 193565, 203681, 193508, 193330, 203223, 181401, 209524, 209393, 209495, 184051, 209342, 209571, 209560, 209178, 202577, 209320, 209362, 209491, 203642, 209197, 209472, 204975, 176416, 183353, 209776, 187918, 177870, 209493, 209433, 209565, 209242, 209234, 209546, 193529, 216504, 209391, 187560, 203637, 183364, 217801, 209302, 193332, 202635, 173580, 209516, 216967, 250980, 209273, 209346, 209244, 209381, 183363, 183350, 193113, 193114, 217980, 216174, 219450, 216761, 203523, 216165, 223745, 209326, 209506, 209333, 209334, 209312, 209323, 189318, 189018, 253947, 206656, 193109, 209219, 188924, 189041, 203522, 189042, 213509, 188461, 190568, 209482, 183351, 209413, 209488, 263443, 188127, 258628, 239388, 209190, 209414, 188430, 197273, 209471, 209457, 209233, 209260, 190746, 209183, 209270, 209239, 181419, 249176, 209203, 209434, 209456, 209358, 209284, 209307, 209199, 209267, 261675, 209374, 209278, 208831, 216252, 209236, 209380, 190984, 216042, 261130, 262287, 209209, 217993, 177927, 209174, 209566, 209224, 209173, 209464, 219285, 259262, 181349, 209200, 215288, 220159, 219448, 188425, 209345, 209568, 209394, 214111, 209446, 193509, 209556, 209263, 209382, 215132, 193239, 186298, 209438, 216043, 240858, 217925, 209447, 218167, 209305, 209313, 209338, 216044, 209527, 209255, 180730, 209366, 192904, 209521, 209510, 209422, 209554, 209327, 209188, 209272, 209246, 258629, 209286, 244119, 187791, 209264, 209559, 186845, 209308, 202640, 186233, 209424))) 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 3861, 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-04-06 00:17:54 Duration: 16s734ms
-
with data as ( select distinct shl.id as record, 3863, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 209263) UNION ALL ( select distinct sol.id as record, 3863, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 209263)) UNION ALL ( select distinct sm.id as record, 3863, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209231, 209273, 209278, 209328, 209329, 209470, 209382, 185979, 209510, 206548, 209506, 209507, 209238, 209279, 209335, 209571, 209514, 186249, 209493, 209499, 209304, 209183, 209482, 209459, 209525, 176058, 176205, 176066, 180855, 180821, 193387, 172690, 190636, 209468, 209513, 209518, 209227, 209230, 209366, 209537, 260359, 209456, 209440, 209185, 209302, 209332, 209189, 209176, 209423, 209396, 209346, 209314, 209284, 209441, 209306, 209477, 209445, 209566, 209267, 209474, 209340, 209318, 209187, 209484, 209488, 209568, 209309, 209177, 209180, 209418, 209252, 209317, 209269, 209434, 209359, 209483, 209435, 209521, 209545, 209487, 209365, 209228, 209498, 209266, 209245, 209352, 209253, 209370, 209390, 209427, 209261, 209479, 209415, 209503, 213290, 228221, 209255, 209392, 209519, 209225, 209272, 209466, 209354, 209421, 209282, 207553, 209561, 209339, 209226, 209264, 209201, 209254, 209202, 209379, 209569, 209562, 209559, 209182, 209413, 209412, 209469, 209532, 209259, 209206, 209181, 209422, 209325, 209312, 209232, 209260, 209319, 209358, 209512, 209322, 209271, 209298, 209307, 209460, 209235, 209265, 209207, 209374, 209497, 209323, 209331, 209360, 209475, 209398, 209241, 209520, 209193, 209452, 214527, 209315, 209195, 209179, 209243, 209277, 209219, 209333, 209270, 209327, 209308, 186184, 209220, 209250, 171850, 221328, 207422, 209464, 209321, 209529, 209246, 209198, 209211, 209391, 209447, 185978, 209437, 209527, 209438, 209310, 209229, 209478, 209496, 209567, 209572, 209262, 209313, 209221, 209439, 209324, 209286, 209367, 209384, 209338, 209556, 209546, 209257, 209403, 209389, 209442, 209555, 209361, 209528, 209251, 209446, 209184, 209191, 209492, 209216, 209511, 209303, 186295, 209209, 216961, 209214, 209436, 209372, 209247, 209320, 209362, 180322, 209172, 209244, 209173, 209494, 209192, 209565, 209381, 209473, 217254, 209491, 209236, 209573, 209334, 209433, 209299, 209174, 217253, 209380, 206519, 186186, 217072, 209342, 240896, 209242, 209258, 209560, 209200, 209393, 209424, 209480, 209485, 209554, 209495, 209378, 209501, 209197, 209472, 209509, 209178, 209516, 183566, 207368, 203522, 209268, 209190, 260360, 209305, 209344, 180952, 209210, 245563, 209462, 209414, 209356, 209357, 193734, 209233, 209186, 209563, 209188, 209538, 250940, 209326, 209316, 209505, 218035, 252547, 209531, 209330, 184010, 209451, 213330, 186294, 246016, 209239, 209234, 209558, 193239, 209430, 209212, 209502, 209199, 209203, 209570, 209196, 209175, 209347, 209343, 209416, 209194, 209425, 209457, 209280, 209256, 209526, 246017, 209524, 209276, 211671, 209311, 183563, 209345, 209517, 209515, 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 3863, 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-04-06 00:45:00 Duration: 14s511ms
-
with data as ( select distinct shl.id as record, 3862, 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-04-05 00:00:00' and shl.invoice_date <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211) UNION ALL ( select distinct sol.id as record, 3862, 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-04-05 00:00:00' and so.date_order <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211)) UNION ALL ( select distinct sm.id as record, 3862, 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-04-05 00:00:00' and mrp.create_date <= '2024-04-05 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 (209414, 204352, 174123, 179976, 179402, 239523, 180822, 209306, 209219, 209269, 173211, 193739, 197227, 209518, 209516, 209268, 209555, 209480, 209182, 209403, 209567, 209389, 209199, 209203, 209281, 209521, 209309, 209344, 209558, 209441, 209266, 209472, 209556, 209231, 209365, 209299, 209318, 209412, 209492, 209484, 209226, 209339, 209265, 209284, 209188, 209173, 209176, 209177, 209496, 209506, 209554, 209565, 209483, 209572, 209252, 209243, 209230, 209264, 209332, 209488, 209359, 209502, 209343, 209505, 209326, 209178, 209507, 209214, 209185, 209493, 209234, 209495, 209560, 209330, 209209, 209273, 209317, 209328, 209320, 209362, 209515, 209200, 209381, 209433, 209242, 209573, 209424, 209378, 209524, 209491, 209514, 209509, 209280, 209566, 209485, 209393, 209380, 184051, 209568, 209313, 209198, 209310, 209286, 209430, 180855, 180730, 180751, 202387, 203802, 209184, 209545, 209311, 209474, 209442, 209361, 209347, 209527, 209528, 209570, 209229, 209175, 209338, 209382, 209196, 209324, 209245, 209263, 209384, 209302, 209262, 209511, 209303, 209529, 209446, 209340, 209212, 209246, 209367, 209304, 190640, 209525, 209221, 209466, 209201, 209225, 209479, 209559, 209379, 209471, 173349, 209305, 209392, 209261, 188062, 209482, 209569, 209356, 209210, 209418, 209561, 209352, 209519, 209256, 209517, 209562, 209427, 209421, 209190, 209370, 209413, 209503, 209282, 228221, 239359, 209333, 209435, 209183, 209312, 209181, 209271, 209270, 209563, 209277, 209250, 209314, 209241, 209452, 209329, 209189, 209398, 209423, 209468, 209187, 209325, 209459, 209235, 209319, 209538, 209469, 209331, 209315, 209497, 209308, 209416, 209456, 209475, 209316, 209360, 209422, 209434, 209260, 209193, 209462, 209460, 193763, 209439, 209207, 209440, 209512, 209233, 197276, 209257, 209255, 209321, 209510, 209473, 209494, 209513, 209537, 209259, 209438, 209335, 209357, 209436, 209346, 209197, 209372, 209342, 209276, 209247, 209216, 253493, 209334, 209192, 209437, 209447, 209174, 209191, 209254, 209172, 209451, 193768, 209366, 209391, 209267, 209272, 209227, 209470, 209526, 209457, 209202, 209307, 209206, 209228, 209327, 209425, 209232, 209396, 209278, 209358, 209323, 209195, 209180, 209571, 190639, 209236, 209244, 209390, 209238, 209501, 209546, 209415, 209258, 209345, 209354, 209374, 209520, 209186, 209220, 209194, 209322, 209279, 209179, 209298, 209239, 209251, 209464, 209487, 209253, 180879, 209211))) 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 3862, 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-04-06 00:30:37 Duration: 14s316ms
6 1s242ms 7s541ms 5s484ms 7 38s389ms select distinct idp.id as item_demand_plan_id from item_demand_plan idp left join item_list_line as ill on idp.id = ill.item_demand_plan_id left join forecasted_data as fd on idp.id = fd.item_demand_plan_id where idp.fetch_data_done = true and idp.active = true and idp.create_date > current_timestamp - interval ? and ill.method not in (...) and idp.id not in ( select item_demand_plan_id from item_list_line where coalesce(method, ?) = ?) and fd.id is null group by idp.id, ill.method;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Apr 06 03 1 6s599ms 6s599ms 04 2 14s136ms 7s68ms 11 2 15s73ms 7s536ms 13 1 1s242ms 1s242ms 18 1 1s337ms 1s337ms -
select DISTINCT idp.id as item_demand_plan_id from item_demand_plan idp LEFT JOIN item_list_line AS ill ON idp.id = ill.item_demand_plan_id LEFT JOIN forecasted_data AS fd ON idp.id = fd.item_demand_plan_id WHERE idp.fetch_data_done = True and idp.active = True and idp.create_date > current_timestamp - interval '3 day' and ill.method not in (7, 8) and idp.id not in ( select item_demand_plan_id from item_list_line where COALESCE(method, 111) = 111) and fd.id is null group by idp.id, ill.method;
Date: 2024-04-06 11:30:15 Duration: 7s541ms
-
select DISTINCT idp.id as item_demand_plan_id from item_demand_plan idp LEFT JOIN item_list_line AS ill ON idp.id = ill.item_demand_plan_id LEFT JOIN forecasted_data AS fd ON idp.id = fd.item_demand_plan_id WHERE idp.fetch_data_done = True and idp.active = True and idp.create_date > current_timestamp - interval '3 day' and ill.method not in (7, 8) and idp.id not in ( select item_demand_plan_id from item_list_line where COALESCE(method, 111) = 111) and fd.id is null group by idp.id, ill.method;
Date: 2024-04-06 11:30:14 Duration: 7s531ms
-
select DISTINCT idp.id as item_demand_plan_id from item_demand_plan idp LEFT JOIN item_list_line AS ill ON idp.id = ill.item_demand_plan_id LEFT JOIN forecasted_data AS fd ON idp.id = fd.item_demand_plan_id WHERE idp.fetch_data_done = True and idp.active = True and idp.create_date > current_timestamp - interval '3 day' and ill.method not in (7, 8) and idp.id not in ( select item_demand_plan_id from item_list_line where COALESCE(method, 111) = 111) and fd.id is null group by idp.id, ill.method;
Date: 2024-04-06 04:00:12 Duration: 7s202ms
7 1s592ms 44s831ms 3s794ms 20 1m15s delete from account_move_line where id in (...);Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Apr 06 03 1 44s831ms 44s831ms 23 19 31s67ms 1s635ms -
DELETE FROM account_move_line WHERE id IN (4676047, 4676048, 4676049, 4676050, 4676051, 4676052, 4676053, 4676054, 4676055, 4676056, 4676057, 4676058, 4676059, 4676060, 4676061, 4676062, 4676063, 4676064, 4676065, 4676066, 4676067, 4676068, 4676069, 4676070, 4676071, 4676072, 4676073);
Date: 2024-04-06 03:25:05 Duration: 44s831ms
-
DELETE FROM account_move_line WHERE id IN (4671151);
Date: 2024-04-06 23:00:15 Duration: 1s746ms
-
DELETE FROM account_move_line WHERE id IN (4671947);
Date: 2024-04-06 23:42:15 Duration: 1s731ms
8 2s971ms 4s672ms 3s60ms 753 38m24s update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true, method = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Apr 06 00 590 29m45s 3s27ms 01 163 8m38s 3s179ms -
update item_list_line set product_id = 205019, supercede_product_id = 241794, superceded = True, method = Null where product_id = 241794 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:02:13 Duration: 4s672ms
-
update item_list_line set product_id = 189697, supercede_product_id = 241418, superceded = True, method = Null where product_id = 241418 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:01:20 Duration: 4s453ms
-
update item_list_line set product_id = 195983, supercede_product_id = 241519, superceded = True, method = Null where product_id = 241519 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:01:28 Duration: 4s244ms
9 2s572ms 4s853ms 2s854ms 2,109 1h40m19s 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 #9
Day Hour Count Duration Avg duration Apr 06 01 676 34m13s 3s37ms 02 613 28m53s 2s827ms 03 510 23m9s 2s725ms 04 310 14m3s 2s720ms -
update item_list_line set method = 9, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 172999 and item_demand_plan_id = 3854;
Date: 2024-04-06 01:01:21 Duration: 4s853ms
-
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 = 262425 and item_demand_plan_id = 3863;
Date: 2024-04-06 01:02:13 Duration: 4s671ms
-
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 = 173579 and item_demand_plan_id = 3854;
Date: 2024-04-06 01:02:14 Duration: 4s502ms
10 1s73ms 2s491ms 1s530ms 23 35s193ms select distinct ill.product_id, fm.name as method 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 coalesce(method, ?) != ? and method not in (...) group by ill.product_id, fm.name;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Apr 06 03 1 1s157ms 1s157ms 04 3 4s399ms 1s466ms 06 2 2s740ms 1s370ms 07 2 3s211ms 1s605ms 08 1 1s548ms 1s548ms 09 3 3s876ms 1s292ms 10 2 2s943ms 1s471ms 11 4 7s130ms 1s782ms 12 2 3s333ms 1s666ms 13 3 4s851ms 1s617ms -
select DISTINCT ill.product_id, fm.name as method from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3864 and COALESCE(method, 111) != 111 and method not in (7, 8) group by ill.product_id, fm.name;
Date: 2024-04-06 11:30:19 Duration: 2s491ms
-
select DISTINCT ill.product_id, fm.name as method from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3861 and COALESCE(method, 111) != 111 and method not in (7, 8) group by ill.product_id, fm.name;
Date: 2024-04-06 13:01:10 Duration: 1s862ms
-
select DISTINCT ill.product_id, fm.name as method from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3855 and COALESCE(method, 111) != 111 and method not in (7, 8) group by ill.product_id, fm.name;
Date: 2024-04-06 04:00:15 Duration: 1s765ms
11 965ms 4s629ms 1s355ms 184 4m9s 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 #11
Day Hour Count Duration Avg duration Apr 06 03 24 25s439ms 1s59ms 04 6 7s615ms 1s269ms 07 29 35s435ms 1s221ms 09 42 53s246ms 1s267ms 12 45 1m16s 1s689ms 13 38 51s607ms 1s358ms -
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 = 3859 and ill.method not in (8, 7);
Date: 2024-04-06 12:51:50 Duration: 4s629ms
-
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 = 3854 and ill.method not in (8, 7);
Date: 2024-04-06 12:52:50 Duration: 2s439ms
-
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 = 3863 and ill.method not in (8, 7);
Date: 2024-04-06 09:30:44 Duration: 2s195ms
12 866ms 3s465ms 1s311ms 184 4m1s 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 #12
Day Hour Count Duration Avg duration Apr 06 03 24 23s770ms 990ms 04 6 6s202ms 1s33ms 07 29 36s706ms 1s265ms 09 42 50s781ms 1s209ms 12 45 1m7s 1s491ms 13 38 56s660ms 1s491ms -
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 = 3862 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 09:21:06 Duration: 3s465ms
-
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 = 3858 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 12:02:29 Duration: 3s441ms
-
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 = 3863 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-04-06 13:06:20 Duration: 3s158ms
13 1s24ms 1s917ms 1s291ms 23 29s711ms select coalesce(method, ?) from ( select ill.method from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where idp.active = true and ill.item_demand_plan_id = ? group by ill.method having count(ill.id) > ?) as t where method not in (...);Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Apr 06 03 1 1s151ms 1s151ms 04 3 3s299ms 1s99ms 06 2 2s105ms 1s52ms 07 2 2s150ms 1s75ms 08 1 1s184ms 1s184ms 09 3 3s990ms 1s330ms 10 2 2s124ms 1s62ms 11 4 6s385ms 1s596ms 12 2 2s804ms 1s402ms 13 3 4s513ms 1s504ms -
select COALESCE(method, 0) from ( select ill.method from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where idp.active = True and ill.item_demand_plan_id = 3861 GROUP BY ill.method having count(ill.id) > 0) as t where method not in (7, 8);
Date: 2024-04-06 13:01:11 Duration: 1s917ms
-
select COALESCE(method, 0) from ( select ill.method from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where idp.active = True and ill.item_demand_plan_id = 3864 GROUP BY ill.method having count(ill.id) > 0) as t where method not in (7, 8);
Date: 2024-04-06 11:30:16 Duration: 1s792ms
-
select COALESCE(method, 0) from ( select ill.method from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where idp.active = True and ill.item_demand_plan_id = 3858 GROUP BY ill.method having count(ill.id) > 0) as t where method not in (7, 8);
Date: 2024-04-06 11:58:48 Duration: 1s625ms
14 837ms 4s311ms 1s238ms 185 3m49s select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Apr 06 03 25 23s909ms 956ms 04 6 6s477ms 1s79ms 07 29 31s134ms 1s73ms 09 42 47s904ms 1s140ms 12 45 1m13s 1s635ms 13 38 46s187ms 1s215ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3859 and active = True;
Date: 2024-04-06 12:51:43 Duration: 4s311ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3865 and active = True;
Date: 2024-04-06 12:50:31 Duration: 4s252ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3856 and active = True;
Date: 2024-04-06 12:02:47 Duration: 4s68ms
15 728ms 3s618ms 1s106ms 185 3m24s select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Apr 06 03 25 20s113ms 804ms 04 6 4s592ms 765ms 07 29 29s764ms 1s26ms 09 42 39s543ms 941ms 12 45 1m4s 1s435ms 13 38 46s47ms 1s211ms -
select count(id) from item_list_line where item_demand_plan_id = 3864;
Date: 2024-04-06 12:50:58 Duration: 3s618ms
-
select count(id) from item_list_line where item_demand_plan_id = 3861;
Date: 2024-04-06 13:06:42 Duration: 3s288ms
-
select count(id) from item_list_line where item_demand_plan_id = 3864;
Date: 2024-04-06 12:45:24 Duration: 3s144ms
16 775ms 4s107ms 924ms 34,954 8h58m38s 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 #16
Day Hour Count Duration Avg duration Apr 06 01 721 10m13s 850ms 02 612 8m28s 830ms 03 664 9m10s 828ms 04 3,109 47m 907ms 05 3,252 48m35s 896ms 06 3,264 47m35s 874ms 07 3,273 48m16s 884ms 08 3,255 48m19s 890ms 09 3,209 48m39s 909ms 10 3,287 47m28s 866ms 11 4,196 1h7m54s 970ms 12 5,089 1h28m56s 1s48ms 13 1,023 18m1s 1s57ms -
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 = 196526 and item_demand_plan_id = 3858 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-04-06 12:01:30 Duration: 4s107ms
-
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 = 263599 and item_demand_plan_id = 3863 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-04-06 01:01:28 Duration: 4s36ms
-
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 = 179647 and item_demand_plan_id = 3864 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-04-06 12:51:03 Duration: 3s474ms
17 740ms 2s47ms 876ms 381 5m34s select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Apr 06 01 99 1m20s 814ms 03 119 1m37s 818ms 04 163 2m35s 956ms -
select id from item_list_line where product_id = 264198 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:07:53 Duration: 2s47ms
-
select id from item_list_line where product_id = 253838 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:01:11 Duration: 1s844ms
-
select id from item_list_line where product_id = 263485 and item_demand_plan_id = 3865;
Date: 2024-04-06 04:07:14 Duration: 1s808ms
18 369ms 817ms 421ms 44 18s547ms 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 #18
Day Hour Count Duration Avg duration Apr 06 00 4 1s485ms 371ms 01 4 1s484ms 371ms 03 1 369ms 369ms 07 3 1s160ms 386ms 09 9 3s707ms 411ms 12 6 3s387ms 564ms 13 3 1s710ms 570ms 16 4 1s511ms 377ms 18 4 1s503ms 375ms 22 6 2s226ms 371ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_backend.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-cdc6b64/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-04-06 12:50:35 Duration: 817ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-fb6cd24/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-04-06 13:03:57 Duration: 651ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_backend.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-cdc6b64/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-04-06 13:03:55 Duration: 620ms
19 279ms 319ms 287ms 87 25s21ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Apr 06 17 3 870ms 290ms 20 6 1s732ms 288ms 21 36 10s308ms 286ms 22 6 1s735ms 289ms 23 36 10s374ms 288ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-04-06 23:30:10 Duration: 319ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-04-06 23:30:09 Duration: 300ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-04-06 22:13:53 Duration: 297ms
20 151ms 3s802ms 238ms 60 14s303ms select "account_move".id from "account_move" where ("account_move"."edi_810_id" in (...)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Apr 06 03 8 5s40ms 630ms 07 7 1s759ms 251ms 23 45 7s503ms 166ms -
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (38801, 41849, 42094, 43538, 43583, 43656, 43705, 43747, 43835, 43969, 43999, 44065, 44138, 44171, 44229, 44344, 44376, 44460, 44464, 44521, 44532, 44790, 44864, 44875, 44879, 44942, 45136, 45173, 45179, 45331, 45366, 45420, 45459, 45468, 45547, 45571, 45610, 45676, 45708, 45709)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 03:06:20 Duration: 3s802ms
-
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (49263, 49264, 49265, 49266, 49267, 49268, 49270, 49273, 49274)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 07:42:16 Duration: 547ms
-
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (45791, 45877, 45886, 45887, 45915, 45927, 45930, 45958, 45984, 45987, 45998, 46016, 46114, 46125, 46170, 46227, 46301, 46346, 46358, 46362, 46400, 46415, 46484, 46542, 46591, 46641, 46699, 46762, 46780, 46818, 47042, 47068, 47144, 47148, 47149, 47152, 47193, 47213, 47234, 47237)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-04-06 07:12:15 Duration: 260ms
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
- 88,595 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 1325 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 1,305 Max number of times the same event was reported
- 1,325 Total events found
Rank Times reported Error 1 1,305 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Apr 06 00 403 01 264 02 48 03 28 04 32 05 25 06 28 07 28 08 28 09 30 10 37 11 39 12 33 13 21 14 23 15 25 16 30 17 26 18 28 19 27 20 26 21 24 22 34 23 18 - 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-04-06 20:50:39
2 19 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Apr 06 00 1 01 2 05 1 07 7 09 3 15 1 16 1 17 2 18 1 - ERROR: could not serialize access due to concurrent update
Statement: UPDATE "bus_presence" SET "last_poll"='2024-04-06 15:50:35' WHERE id IN (154)
Date: 2024-04-06 15:50:35
3 1 ERROR: current transaction is aborted, commands ignored until end of transaction block
Times Reported Most Frequent Error / Event #3
Day Hour Count Apr 06 01 1 - ERROR: current transaction is aborted, commands ignored until end of transaction block
Statement: SELECT "item_list_line"."id" as "id", "item_list_line"."item_demand_plan_id" as "item_demand_plan_id", "item_list_line"."product_id" as "product_id", "item_list_line"."selling_branch" as "selling_branch", "item_list_line"."product_uom_qty" as "product_uom_qty", "item_list_line"."invoice_date" as "invoice_date", "item_list_line"."warehouse_id" as "warehouse_id", "item_list_line"."method" as "method", "item_list_line"."inventory_vendor_id" as "inventory_vendor_id", "item_list_line"."active" as "active", "item_list_line"."min_product_len_1" as "min_product_len_1", "item_list_line"."min_product_len_2" as "min_product_len_2", "item_list_line"."min_baseline_size" as "min_baseline_size", "item_list_line"."seasonal_period" as "seasonal_period", "item_list_line"."supercede_product_id" as "supercede_product_id", "item_list_line"."superceded" as "superceded", "item_list_line"."ref_id" as "ref_id", "item_list_line"."ref" as "ref", "item_list_line"."campaign_id" as "campaign_id", "item_list_line"."source_id" as "source_id", "item_list_line"."medium_id" as "medium_id", "item_list_line"."message_main_attachment_id" as "message_main_attachment_id", "item_list_line"."access_token" as "access_token", "item_list_line"."create_uid" as "create_uid", "item_list_line"."create_date" as "create_date", "item_list_line"."write_uid" as "write_uid", "item_list_line"."write_date" as "write_date" FROM "item_list_line" WHERE "item_list_line".id IN (46649580, 46649581, 46649582, 46649583, 46649584, 46649585, 46649586, 46649587, 46649588, 46649589, 46649590, 46649591, 46649592, 46649593, 46649594, 46649595, 46649596, 46649597, 46649598, 46649599, 46649600, 46649601, 46649602, 46649603, 46649604, 46649605, 46649606, 46649607, 46649608, 46649609, 46649610, 46649611, 46649612, 46649613, 46649614, 46649615, 46649616, 46649617, 46649618, 46649619, 46649620, 46649621, 46649622, 46649623, 46649624, 46649625, 46649626, 46649627, 46649628, 46649629, 46649630, 46649631, 46649632, 46649633, 46649634, 46649635, 46649636, 46649637, 46649638, 46649639, 46649640, 46649641, 46649642, 46649643, 46649644, 46649645, 46649646, 46649647, 46649648, 46649649, 46649650, 46649651, 46649652, 46649653, 46649654, 46649655, 46649656, 46649657, 46649658, 46649659, 46649660, 46649661, 46649662, 46649663, 46649664, 46649665, 46649666, 46649667, 46649668, 46649669, 46649670, 46649671, 46649672, 46649673, 46649674, 46649675, 46649676, 46649677, 46649678, 46649679, 46649680, 46649681, 46649682, 46649683, 46649684, 46649685, 46649686, 46649687, 46649688, 46649689, 46649690, 46649691, 46649692, 46649693, 46649694, 46649695, 46649696, 46649697, 46649698, 46649699, 46649700, 46649701, 46649702, 46649703, 46649704, 46649705, 46649706, 46649707, 46649708, 46649709, 46649710, 46649711, 46649712, 46649713, 46649714, 46649715, 46649716, 46649717, 46649718, 46649719, 46649720, 46649721, 46649722, 46649723, 46649724, 46649725, 46649726, 46649727, 46649728, 46649729, 46649730, 46649731, 46649732, 46649733, 46649734, 46649735, 46649736, 46649737, 46649738, 46649739, 46649740, 46649741, 46649742, 46649743, 46649744, 46649745, 46649746, 46649747, 46649748, 46649749, 46649750, 46649751, 46649752, 46649753, 46649754, 46649755, 46649756, 46649757, 46649758, 46649759, 46649760, 46649761, 46649762, 46649763, 46649764, 46649765, 46649766, 46649767, 46649768, 46649769, 46649770, 46649771, 46649772, 46649773, 46649774, 46649775, 46649776, 46649777, 46649778, 46649779, 46649780, 46649781, 46649782, 46649783, 46649784, 46649785, 46649786, 46649787, 46649788, 46649789, 46649790, 46649791, 46649792, 46649793, 46649794, 46649795, 46649796, 46649797, 46649798, 46649799, 46649800, 46649801, 46649802, 46649803, 46649804, 46649805, 46649806, 46649807, 46649808, 46649809, 46649810, 46649811, 46649812, 46649813, 46649814, 46649815, 46649816, 46649817, 46649818, 46649819, 46649820, 46649821, 46649822, 46649823, 46649824, 46649825, 46649826, 46649827, 46649828, 46649829, 46649830, 46649831, 46649832, 46649833, 46649834, 46649835, 46649836, 46649837, 46649838, 46649839, 46649840, 46649841, 46649842, 46649843, 46649844, 46649845, 46649846, 46649847, 46649848, 46649849, 46649850, 46649851, 46649852, 46649853, 46649854, 46649855, 46649856, 46649857, 46649858, 46649859, 46649860, 46649861, 46649862, 46649863, 46649864, 46649865, 46649866, 46649867, 46649868, 46649869, 46649870, 46649871, 46649872, 46649873, 46649874, 46649875, 46649876, 46649877, 46649878, 46649879, 46649880, 46649881, 46649882, 46649883, 46649884, 46649885, 46649886, 46649887, 46649888, 46649889, 46649890, 46649891, 46649892, 46649893, 46649894, 46649895, 46649896, 46649897, 46649898, 46649899, 46649900, 46649901, 46649902, 46649903, 46649904, 46649905, 46649906, 46649907, 46649908, 46649909, 46649910, 46649911, 46649912, 46649913, 46649914, 46649915, 46649916, 46649917, 46649918, 46649919, 46649920, 46649921, 46649922, 46649923, 46649924, 46649925, 46649926, 46649927, 46649928, 46649929, 46649930, 46649931, 46649932, 46649933, 46649934, 46649935, 46649936, 46649937, 46649938, 46649939, 46649940, 46649941, 46649942, 46649943, 46649944, 46649945, 46649946, 46649947, 46649948, 46649949, 46649950, 46649951, 46649952, 46649953, 46649954, 46649955, 46649956, 46649957, 46649958, 46649959, 46649960, 46649961, 46649962, 46649963, 46649964, 46649965, 46649966, 46649967, 46649968, 46649969, 46649970, 46649971, 46649972, 46649973, 46649974, 46649975, 46649976, 46649977, 46649978, 46649979, 46649980, 46649981, 46649982, 46649983, 46649984, 46649985, 46649986, 46649987, 46649988, 46649989, 46649990, 46649991, 46649992, 46649993, 46649994, 46649995, 46649996, 46649997, 46649998, 46649999, 46650000, 46650001, 46650002, 46650003, 46650004, 46650005, 46650006, 46650007, 46650008, 46650009, 46650010, 46650011, 46650012, 46650013, 46650014, 46650015, 46650016, 46650017, 46650018, 46650019, 46650020, 46650021, 46650022, 46650023, 46650024, 46650025, 46650026, 46650027, 46650028, 46650029, 46650030, 46650031, 46650032, 46650033, 46650034, 46650035, 46650036, 46650037, 46650038, 46650039, 46650040, 46650041, 46650042, 46650043, 46650044, 46650045, 46650046, 46650047, 46650048, 46650049, 46650050, 46650051, 46650052, 46650053, 46650054, 46650055, 46650056, 46650057, 46650058, 46650059, 46650060, 46650061, 46650062, 46650063, 46650064, 46650065, 46650066, 46650067, 46650068, 46650069, 46650070, 46650071, 46650072, 46650073, 46650074, 46650075, 46650076, 46650077, 46650078, 46650079, 46650080, 46650081, 46650082, 46650083, 46650084, 46650085, 46650086, 46650087, 46650088, 46650089, 46650090, 46650091, 46650092, 46650093, 46650094, 46650095, 46650096, 46650097, 46650098, 46650099, 46650100, 46650101, 46650102, 46650103, 46650104, 46650105, 46650106, 46650107, 46650108, 46650109, 46650110, 46650111, 46650112, 46650113, 46650114, 46650115, 46650116, 46650117, 46650118, 46650119, 46650120, 46650121, 46650122, 46650123, 46650124, 46650125, 46650126, 46650127, 46650128, 46650129, 46650130, 46650131, 46650132, 46650133, 46650134, 46650135, 46650136, 46650137, 46650138, 46650139, 46650140, 46650141, 46650142, 46650143, 46650144, 46650145, 46650146, 46650147, 46650148, 46650149, 46650150, 46650151, 46650152, 46650153, 46650154, 46650155, 46650156, 46650157, 46650158, 46650159, 46650160, 46650161, 46650162, 46650163, 46650164, 46650165, 46650166, 46650167, 46650168, 46650169, 46650170, 46650171, 46650172, 46650173, 46650174, 46650175, 46650176, 46650177, 46650178, 46650179, 46650180, 46650181, 46650182, 46650183, 46650184, 46650185, 46650186, 46650187, 46650188, 46650189, 46650190, 46650191, 46650192, 46650193, 46650194, 46650195, 46650196, 46650197, 46650198, 46650199, 46650200, 46650201, 46650202, 46650203, 46650204, 46650205, 46650206, 46650207, 46650208, 46650209, 46650210, 46650211, 46650212, 46650213, 46650214, 46650215, 46650216, 46650217, 46650218, 46650219, 46650220, 46650221, 46650222, 46650223, 46650224, 46650225, 46650226, 46650227, 46650228, 46650229, 46650230, 46650231, 46650232, 46650233, 46650234, 46650235, 46650236, 46650237, 46650238, 46650239, 46650240, 46650241, 46650242, 46650243, 46650244, 46650245, 46650246, 46650247, 46650248, 46650249, 46650250, 46650251, 46650252, 46650253, 46650254, 46650255, 46650256, 46650257, 46650258, 46650259, 46650260, 46650261, 46650262, 46650263, 46650264, 46650265, 46650266, 46650267, 46650268, 46650269, 46650270, 46650271, 46650272, 46650273, 46650274, 46650275, 46650276, 46650277, 46650278, 46650279, 46650280, 46650281, 46650282, 46650283, 46650284, 46650285, 46650286, 46650287, 46650288, 46650289, 46650290, 46650291, 46650292, 46650293, 46650294, 46650295, 46650296, 46650297, 46650298, 46650299, 46650300, 46650301, 46650302, 46650303, 46650304, 46650305, 46650306, 46650307, 46650308, 46650309, 46650310, 46650311, 46650312, 46650313, 46650314, 46650315, 46650316, 46650317, 46650318, 46650319, 46650320, 46650321, 46650322, 46650323, 46650324, 46650325, 46650326, 46650327, 46650328, 46650329, 46650330, 46650331, 46650332, 46650333, 46650334, 46650335, 46650336, 46650337, 46650338, 46650339, 46650340, 46650341, 46650342, 46650343, 46650344, 46650345, 46650346, 46650347, 46650348, 46650349, 46650350, 46650351, 46650352, 46650353, 46650354, 46650355, 46650356, 46650357, 46650358, 46650359, 46650360, 46650361, 46650362, 46650363, 46650364, 46650365, 46650366, 46650367, 46650368, 46650369, 46650370, 46650371, 46650372, 46650373, 46650374, 46650375, 46650376, 46650377, 46650378, 46650379, 46650380, 46650381, 46650382, 46650383, 46650384, 46650385, 46650386, 46650387, 46650388, 46650389, 46650390, 46650391, 46650392, 46650393, 46650394, 46650395, 46650396, 46650397, 46650398, 46650399, 46650400, 46650401, 46650402, 46650403, 46650404, 46650405, 46650406, 46650407, 46650408, 46650409, 46650410, 46650411, 46650412, 46650413, 46650414, 46650415, 46650416, 46650417, 46650418, 46650419, 46650420, 46650421, 46650422, 46650423, 46650424, 46650425, 46650426, 46650427, 46650428, 46650429, 46650430, 46650431, 46650432, 46650433, 46650434, 46650435, 46650436, 46650437, 46650438, 46650439, 46650440, 46650441, 46650442, 46650443, 46650444, 46650445, 46650446, 46650447, 46650448, 46650449, 46650450, 46650451, 46650452, 46650453, 46650454, 46650455, 46650456, 46650457, 46650458, 46650459, 46650460, 46650461, 46650462, 46650463, 46650464, 46650465, 46650466, 46650467, 46650468, 46650469, 46650470, 46650471, 46650472, 46650473, 46650474, 46650475, 46650476, 46650477, 46650478, 46650479, 46650480, 46650481, 46650482, 46650483, 46650484, 46650485, 46650486, 46650487, 46650488, 46650489, 46650490, 46650491, 46650492, 46650493, 46650494, 46650495, 46650496, 46650497, 46650498, 46650499, 46650500, 46650501, 46650502, 46650503, 46650504, 46650505, 46650506, 46650507, 46650508, 46650509, 46650510, 46650511, 46650512, 46650513, 46650514, 46650515, 46650516, 46650517, 46650518, 46650519, 46650520, 46650521, 46650522, 46650523, 46650524, 46650525, 46650526, 46650527, 46650528, 46650529, 46650530, 46650531, 46650532, 46650533, 46650534, 46650535, 46650536, 46650537, 46650538, 46650539, 46650540, 46650541, 46650542, 46650543, 46650544, 46650545, 46650546, 46650547, 46650548, 46650549, 46650550, 46650551, 46650552, 46650553, 46650554, 46650555, 46650556, 46650557, 46650558, 46650559, 46650560, 46650561, 46650562, 46650563, 46650564, 46650565, 46650566, 46650567, 46650568, 46650569, 46650570, 46650571, 46650572, 46650573, 46650574, 46650575, 46650576, 46650577, 46650578, 46650579)
Date: 2024-04-06 01:34:03