-
Global information
- Generated on Sat Feb 3 23:50:23 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 205,253 log entries in 22s
- Log start from 2024-02-03 00:00:03 to 2024-02-03 23:48:41
-
Overview
Global Stats
- 200 Number of unique normalized queries
- 70,838 Number of queries
- 11h43m35s Total query duration
- 2024-02-03 00:00:03 First query
- 2024-02-03 23:48:41 Last query
- 16 queries/s at 2024-02-03 12:39:28 Query peak
- 11h43m35s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 11h43m35s Execute total duration
- 3,164 Number of events
- 4 Number of unique normalized events
- 1,933 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
- 70,838 Average queries per session
- 11h43m35s 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
- 16 queries/s Query Peak
- 2024-02-03 12:39:28 Date
SELECT Traffic
Key values
- 16 queries/s Query Peak
- 2024-02-03 12:39:28 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 4 queries/s Query Peak
- 2024-02-03 09:01:20 Date
Queries duration
Key values
- 11h43m35s 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) Feb 03 00 1,918 120ms 15s389ms 929ms 1m9s 1m10s 1m11s 01 3,413 120ms 17s493ms 1s238ms 2m22s 2m28s 2m30s 02 51 0ms 394ms 228ms 2s608ms 2s683ms 2s683ms 03 89 0ms 468ms 204ms 3s598ms 3s682ms 3s682ms 04 3,076 120ms 6s65ms 542ms 43s346ms 45s287ms 47s205ms 05 1,976 120ms 1s53ms 587ms 20s494ms 20s806ms 22s444ms 06 1,912 120ms 31s535ms 569ms 33s336ms 52s614ms 1m7s 07 319 0ms 417ms 149ms 1s466ms 2s360ms 5s273ms 08 2,040 120ms 6s641ms 646ms 1m6s 1m31s 1m41s 09 6,444 120ms 3m50s 1s31ms 2m36s 2m53s 3m53s 10 4,119 120ms 3s133ms 633ms 2m26s 2m31s 2m37s 11 2,445 120ms 6s447ms 435ms 28s781ms 29s700ms 46s87ms 12 3,728 120ms 6s149ms 508ms 1m13s 1m17s 1m22s 13 5,305 120ms 1s768ms 494ms 51s56ms 1m1s 1m13s 14 5,494 120ms 1s552ms 488ms 58s514ms 1m2s 1m5s 15 5,484 120ms 14s340ms 477ms 46s808ms 47s88ms 1m 16 6,724 120ms 4s302ms 484ms 1m27s 2m1s 2m21s 17 5,138 120ms 2s632ms 480ms 55s825ms 1m11s 1m32s 18 4,810 120ms 2s156ms 471ms 56s363ms 59s757ms 1m 19 3,229 120ms 1s195ms 469ms 33s250ms 36s170ms 37s990ms 20 1,929 120ms 1s44ms 499ms 22s339ms 23s191ms 23s995ms 21 370 0ms 552ms 236ms 2s826ms 3s749ms 10s32ms 22 481 120ms 981ms 217ms 3s211ms 3s754ms 11s247ms 23 344 121ms 518ms 229ms 3s125ms 4s125ms 9s167ms Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Feb 03 00 1,371 0 285ms 10s382ms 10s837ms 12s591ms 01 2,198 0 541ms 30s564ms 34s937ms 39s698ms 02 51 0 228ms 1s658ms 2s608ms 2s683ms 03 89 0 204ms 1s883ms 3s598ms 3s682ms 04 2,552 0 626ms 39s673ms 41s58ms 43s454ms 05 1,714 0 657ms 19s617ms 19s908ms 20s463ms 06 1,679 0 540ms 20s490ms 22s141ms 28s191ms 07 319 0 149ms 1s45ms 1s466ms 2s985ms 08 1,943 0 555ms 39s599ms 49s588ms 1m1s 09 4,782 97 769ms 1m12s 1m26s 1m51s 10 3,495 0 540ms 30s661ms 1m4s 1m10s 11 2,306 0 454ms 26s623ms 27s750ms 31s118ms 12 3,245 0 562ms 56s99ms 1m9s 1m14s 13 4,288 0 578ms 41s31ms 47s794ms 1m1s 14 4,426 0 572ms 42s494ms 54s905ms 1m1s 15 4,498 0 551ms 43s163ms 43s604ms 45s164ms 16 5,545 0 557ms 1m2s 1m24s 1m59s 17 4,415 0 537ms 50s804ms 54s69ms 1m14s 18 4,121 0 528ms 46s813ms 54s413ms 57s826ms 19 2,936 0 504ms 30s809ms 32s382ms 36s587ms 20 1,686 0 553ms 20s974ms 21s600ms 23s331ms 21 370 0 236ms 2s295ms 2s826ms 4s678ms 22 481 0 217ms 2s316ms 3s211ms 3s913ms 23 344 0 229ms 2s560ms 3s125ms 9s167ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Feb 03 00 0 542 0 0 2s471ms 19s177ms 58s994ms 1m 01 0 1,210 0 0 2s456ms 55s513ms 1m50s 1m54s 02 0 0 0 0 0ms 0ms 0ms 0ms 03 0 0 0 0 0ms 0ms 0ms 0ms 04 0 2 0 0 306ms 0ms 0ms 0ms 05 0 0 0 0 0ms 0ms 0ms 0ms 06 0 0 22 0 7s81ms 0ms 0ms 23s386ms 07 0 0 0 0 0ms 0ms 0ms 0ms 08 0 93 0 0 2s457ms 0ms 0ms 59s102ms 09 0 1,092 0 0 2s582ms 1m18s 1m20s 1m23s 10 0 261 0 0 2s582ms 0ms 0ms 1m21s 11 0 3 0 0 304ms 0ms 0ms 0ms 12 0 3 0 0 305ms 0ms 0ms 304ms 13 0 0 0 0 0ms 0ms 0ms 0ms 14 0 4 0 0 604ms 0ms 0ms 0ms 15 0 13 0 0 272ms 0ms 0ms 0ms 16 0 0 0 0 0ms 0ms 0ms 0ms 17 0 0 0 0 0ms 0ms 0ms 0ms 18 0 1 0 0 304ms 0ms 0ms 0ms 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 0 0 0ms 0ms 0ms 0ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Feb 03 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 Feb 03 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 Feb 03 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 Feb 03 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 Feb 03 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) Feb 03 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 Feb 03 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 Feb 03 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 Feb 03 00 0 0 01 0 0 02 0 0 03 0 0 04 0 0 05 0 0 06 0 0 07 0 0 08 0 0 09 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 - 0 sec Highest CPU-cost vacuum
-
Locks
Locks by types
Key values
- ShareLock Main Lock Type
- 3 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query 1 3 5s290ms 1s467ms 2s432ms 1s763ms update branch_product_method set method_update_date = now() at time zone ?, method = ? where id in (...);-
update branch_product_method set method_update_date = NOW() at time zone 'UTC', method = 8 where id in (541991);
Date: 2024-02-03 09:30:11
-
update branch_product_method set method_update_date = NOW() at time zone 'UTC', method = 2 where id in (557531);
Date: 2024-02-03 10:03:10
-
update branch_product_method set method_update_date = NOW() at time zone 'UTC', method = 8 where id in (549385);
Date: 2024-02-03 09:37:24
Queries that waited the most
Rank Wait time Query 1 2s432ms update branch_product_method set method_update_date = NOW() at time zone 'UTC', method = 8 where id in (541991);[ Date: 2024-02-03 09:30:11 ]
2 1s467ms update branch_product_method set method_update_date = NOW() at time zone 'UTC', method = 2 where id in (557531);[ Date: 2024-02-03 10:03:10 ]
3 1s390ms update branch_product_method set method_update_date = NOW() at time zone 'UTC', method = 8 where id in (549385);[ Date: 2024-02-03 09:37:24 ]
-
Queries
Queries by type
Key values
- 58,854 Total read queries
- 11,984 Total write queries
Queries by database
Key values
- unknown Main database
- 70,838 Requests
- 11h43m35s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 71,030 Requests
User Request type Count Duration unknown Total 71,030 11h44m31s copy to 97 12m41s cte 8,641 21m46s delete 22 2m35s select 59,046 8h53m23s update 3,224 2h14m3s Duration by user
Key values
- 11h44m31s (unknown) Main time consuming user
User Request type Count Duration unknown Total 71,030 11h44m31s copy to 97 12m41s cte 8,641 21m46s delete 22 2m35s select 59,046 8h53m23s update 3,224 2h14m3s Queries by host
Key values
- unknown Main host
- 71,030 Requests
- 11h44m31s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 70,838 Requests
- 11h43m35s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-02-03 15:02:13 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 42,513 100-500ms duration
Slowest individual queries
Rank Duration Query 1 3m50s 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-02-03 09:08:52 ]
2 1m43s 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-02-03 09:03:18 ]
3 1m34s 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-02-03 09:05:00 ]
4 1m9s 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-02-03 09:12:50 ]
5 44s580ms COPY public.website_track (id, visitor_id, page_id, url, visit_datetime, product_id) TO stdout;[ Date: 2024-02-03 09:11:40 ]
6 31s535ms DELETE FROM account_move_line WHERE id IN (4124403, 4124404, 4094258, 4094259, 4094260, 4094261, 4094262, 4094263, 4094264, 4094265, 4094266, 4094267, 4094268, 4094269, 4094270, 4094271, 4094272, 4094273, 4094274, 4094275, 4094276, 4094277);[ Date: 2024-02-03 06:08:41 ]
7 27s207ms 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-02-03 09:00:44 ]
8 20s899ms 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-02-03 09:10:21 ]
9 20s230ms DELETE FROM account_move_line WHERE id IN (4009275, 4009276, 4009277, 4009278, 4009279, 4009280, 4009281, 4009282, 4009283, 4009284, 4009285, 4009286, 4100003, 4100004);[ Date: 2024-02-03 06:06:49 ]
10 17s493ms with data as ( select distinct shl.id as record, 3832, 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-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545) UNION ALL ( select distinct sol.id as record, 3832, 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-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545)) UNION ALL ( select distinct sm.id as record, 3832, 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-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545))) 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 3832, 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-02-03 01:12:11 ]
11 17s262ms DELETE FROM account_move_line WHERE id IN (4126276, 4126277, 4126278, 4126279, 4126280, 4126281, 4126282, 4126211, 4126212, 4126213, 4126304, 4126305);[ Date: 2024-02-03 06:12:28 ]
12 15s759ms 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-02-03 09:01:07 ]
13 15s389ms with data as ( select distinct shl.id as record, 3825, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 37 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235) UNION ALL ( select distinct sol.id as record, 3825, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 37 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235)) UNION ALL ( select distinct sm.id as record, 3825, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 37 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235))) 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 3825, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 37);[ Date: 2024-02-03 00:30:18 ]
14 15s263ms with data as ( select distinct shl.id as record, 3834, 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-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567) UNION ALL ( select distinct sol.id as record, 3834, 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-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567)) UNION ALL ( select distinct sm.id as record, 3834, 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-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567))) 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 3834, 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-02-03 01:37:01 ]
15 14s729ms with data as ( select distinct shl.id as record, 3833, 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-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209495, 209496, 209433, 209435, 209198, 190640, 197240, 197248, 197276, 180822, 202387, 203802, 209451, 209485, 209566, 209214, 209560, 209362, 209565, 209280, 209514, 209209, 209247, 209524, 209346, 209571, 209515, 209178, 209501, 209342, 209238, 209234, 209335, 209239, 209507, 209299, 209473, 209509, 209236, 209192, 209491, 209174, 209185, 209472, 209506, 209393, 209330, 209245, 209528, 209230, 209502, 173241, 209527, 209359, 209216, 209246, 209324, 209257, 209568, 209340, 209251, 209252, 209366, 209447, 209546, 209361, 209529, 209306, 209286, 209567, 209221, 209391, 209525, 209555, 209345, 209492, 209446, 209211, 209175, 209421, 209225, 209258, 209199, 209427, 209413, 209339, 209176, 209267, 209201, 209370, 209466, 209503, 209318, 209284, 209308, 209358, 209241, 209333, 209452, 209331, 209563, 209416, 209265, 209250, 209312, 209279, 209412, 209186, 209232, 209484, 209422, 209194, 209235, 209195, 209374, 209538, 209207, 209475, 209307, 209398, 209327, 209322, 209220, 209309, 209456, 209512, 209497, 209277, 209510, 209229, 238907, 209513, 209273, 209302, 209303, 209320, 209328, 209338, 209193, 209180, 209381, 209439, 209470, 209572, 209573, 209255, 209282, 209468, 209316, 209379, 209372, 209378, 209425, 209424, 209317, 209569, 209380, 209323, 209382, 209438, 193763, 209474, 209310, 209442, 209511, 209384, 209304, 209521, 209242, 209305, 209517, 209519, 209482, 209281, 209268, 209357, 209253, 209173, 209457, 209197, 209263, 209266, 209343, 209389, 209430, 209437, 209556, 209191, 209487, 209545, 209483, 209516, 209334, 209262, 209212, 209184, 209347, 179976, 209313, 209321, 204352, 209488, 253493, 209226, 197227, 209367, 209558, 180735, 209464, 209332, 209526, 209356, 209227, 209269, 209190, 209471, 209390, 209256, 209493, 209189, 209231, 209264, 209537, 209196, 209505, 209559, 209392, 209228, 209276, 209344, 209462, 209315, 209329, 209219, 209403, 209518, 209177, 209260, 209469, 209187, 209418, 209562, 209233, 209441, 209436, 209271, 209278, 209181, 209183, 209459, 209326, 209415, 209440, 209460, 209298, 209520, 209360, 209423, 209554, 209396, 209325, 209243, 209319, 209259, 209179, 209202, 209365, 209188, 209494, 209480, 209352, 209354, 173349, 209261, 209479, 209210, 209270, 209561, 209172, 209203, 228221, 209182, 209272, 193768, 209244, 209434, 209414, 209200, 209254, 209314, 209570, 190639, 209311, 193739, 209206) UNION ALL ( select distinct sol.id as record, 3833, 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-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209495, 209496, 209433, 209435, 209198, 190640, 197240, 197248, 197276, 180822, 202387, 203802, 209451, 209485, 209566, 209214, 209560, 209362, 209565, 209280, 209514, 209209, 209247, 209524, 209346, 209571, 209515, 209178, 209501, 209342, 209238, 209234, 209335, 209239, 209507, 209299, 209473, 209509, 209236, 209192, 209491, 209174, 209185, 209472, 209506, 209393, 209330, 209245, 209528, 209230, 209502, 173241, 209527, 209359, 209216, 209246, 209324, 209257, 209568, 209340, 209251, 209252, 209366, 209447, 209546, 209361, 209529, 209306, 209286, 209567, 209221, 209391, 209525, 209555, 209345, 209492, 209446, 209211, 209175, 209421, 209225, 209258, 209199, 209427, 209413, 209339, 209176, 209267, 209201, 209370, 209466, 209503, 209318, 209284, 209308, 209358, 209241, 209333, 209452, 209331, 209563, 209416, 209265, 209250, 209312, 209279, 209412, 209186, 209232, 209484, 209422, 209194, 209235, 209195, 209374, 209538, 209207, 209475, 209307, 209398, 209327, 209322, 209220, 209309, 209456, 209512, 209497, 209277, 209510, 209229, 238907, 209513, 209273, 209302, 209303, 209320, 209328, 209338, 209193, 209180, 209381, 209439, 209470, 209572, 209573, 209255, 209282, 209468, 209316, 209379, 209372, 209378, 209425, 209424, 209317, 209569, 209380, 209323, 209382, 209438, 193763, 209474, 209310, 209442, 209511, 209384, 209304, 209521, 209242, 209305, 209517, 209519, 209482, 209281, 209268, 209357, 209253, 209173, 209457, 209197, 209263, 209266, 209343, 209389, 209430, 209437, 209556, 209191, 209487, 209545, 209483, 209516, 209334, 209262, 209212, 209184, 209347, 179976, 209313, 209321, 204352, 209488, 253493, 209226, 197227, 209367, 209558, 180735, 209464, 209332, 209526, 209356, 209227, 209269, 209190, 209471, 209390, 209256, 209493, 209189, 209231, 209264, 209537, 209196, 209505, 209559, 209392, 209228, 209276, 209344, 209462, 209315, 209329, 209219, 209403, 209518, 209177, 209260, 209469, 209187, 209418, 209562, 209233, 209441, 209436, 209271, 209278, 209181, 209183, 209459, 209326, 209415, 209440, 209460, 209298, 209520, 209360, 209423, 209554, 209396, 209325, 209243, 209319, 209259, 209179, 209202, 209365, 209188, 209494, 209480, 209352, 209354, 173349, 209261, 209479, 209210, 209270, 209561, 209172, 209203, 228221, 209182, 209272, 193768, 209244, 209434, 209414, 209200, 209254, 209314, 209570, 190639, 209311, 193739, 209206)) UNION ALL ( select distinct sm.id as record, 3833, 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-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209495, 209496, 209433, 209435, 209198, 190640, 197240, 197248, 197276, 180822, 202387, 203802, 209451, 209485, 209566, 209214, 209560, 209362, 209565, 209280, 209514, 209209, 209247, 209524, 209346, 209571, 209515, 209178, 209501, 209342, 209238, 209234, 209335, 209239, 209507, 209299, 209473, 209509, 209236, 209192, 209491, 209174, 209185, 209472, 209506, 209393, 209330, 209245, 209528, 209230, 209502, 173241, 209527, 209359, 209216, 209246, 209324, 209257, 209568, 209340, 209251, 209252, 209366, 209447, 209546, 209361, 209529, 209306, 209286, 209567, 209221, 209391, 209525, 209555, 209345, 209492, 209446, 209211, 209175, 209421, 209225, 209258, 209199, 209427, 209413, 209339, 209176, 209267, 209201, 209370, 209466, 209503, 209318, 209284, 209308, 209358, 209241, 209333, 209452, 209331, 209563, 209416, 209265, 209250, 209312, 209279, 209412, 209186, 209232, 209484, 209422, 209194, 209235, 209195, 209374, 209538, 209207, 209475, 209307, 209398, 209327, 209322, 209220, 209309, 209456, 209512, 209497, 209277, 209510, 209229, 238907, 209513, 209273, 209302, 209303, 209320, 209328, 209338, 209193, 209180, 209381, 209439, 209470, 209572, 209573, 209255, 209282, 209468, 209316, 209379, 209372, 209378, 209425, 209424, 209317, 209569, 209380, 209323, 209382, 209438, 193763, 209474, 209310, 209442, 209511, 209384, 209304, 209521, 209242, 209305, 209517, 209519, 209482, 209281, 209268, 209357, 209253, 209173, 209457, 209197, 209263, 209266, 209343, 209389, 209430, 209437, 209556, 209191, 209487, 209545, 209483, 209516, 209334, 209262, 209212, 209184, 209347, 179976, 209313, 209321, 204352, 209488, 253493, 209226, 197227, 209367, 209558, 180735, 209464, 209332, 209526, 209356, 209227, 209269, 209190, 209471, 209390, 209256, 209493, 209189, 209231, 209264, 209537, 209196, 209505, 209559, 209392, 209228, 209276, 209344, 209462, 209315, 209329, 209219, 209403, 209518, 209177, 209260, 209469, 209187, 209418, 209562, 209233, 209441, 209436, 209271, 209278, 209181, 209183, 209459, 209326, 209415, 209440, 209460, 209298, 209520, 209360, 209423, 209554, 209396, 209325, 209243, 209319, 209259, 209179, 209202, 209365, 209188, 209494, 209480, 209352, 209354, 173349, 209261, 209479, 209210, 209270, 209561, 209172, 209203, 228221, 209182, 209272, 193768, 209244, 209434, 209414, 209200, 209254, 209314, 209570, 190639, 209311, 193739, 209206))) 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 3833, 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-02-03 01:23:43 ]
16 14s483ms DELETE FROM account_move_line WHERE id IN (4119287, 4119288, 4119289, 4119290, 4119291, 4119292, 4119293, 4119294, 4124651, 4124652);[ Date: 2024-02-03 06:12:53 ]
17 14s458ms DELETE FROM account_move_line WHERE id IN (4118466, 4118467, 4118427, 4118428, 4118429, 4118430, 4118431, 4118432, 4118433, 4118434);[ Date: 2024-02-03 06:07:41 ]
18 14s340ms SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')) AND ("account_journal"."company_id" IS NULL OR ("account_journal"."company_id" in (1))))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (52392))) AND ("account_move"."company_id" IS NULL OR ("account_move"."company_id" in (1))) ORDER BY "account_move"."invoice_date_due";[ Date: 2024-02-03 15:35:39 ]
19 11s959ms with data as ( select distinct shl.id as record, 3826, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 38 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (195790, 199634, 218722, 193222, 193055, 193109, 193569, 204562, 239127, 181401, 198187, 228221, 179972, 177435, 193114, 173641, 193170, 173241, 179973, 187724, 187678, 183366, 183353, 212760, 248947, 202388, 179400, 179406, 180735, 240896, 253709, 239135, 239056, 179402, 208960, 184051, 193120, 193111, 239344, 193717, 253481, 179980, 253712, 179405, 197277, 227968, 179416, 239148, 205015, 239142, 179417, 193113, 239179, 193529, 260655, 179978, 190639, 206454) UNION ALL ( select distinct sol.id as record, 3826, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 38 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (195790, 199634, 218722, 193222, 193055, 193109, 193569, 204562, 239127, 181401, 198187, 228221, 179972, 177435, 193114, 173641, 193170, 173241, 179973, 187724, 187678, 183366, 183353, 212760, 248947, 202388, 179400, 179406, 180735, 240896, 253709, 239135, 239056, 179402, 208960, 184051, 193120, 193111, 239344, 193717, 253481, 179980, 253712, 179405, 197277, 227968, 179416, 239148, 205015, 239142, 179417, 193113, 239179, 193529, 260655, 179978, 190639, 206454)) UNION ALL ( select distinct sm.id as record, 3826, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 38 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (195790, 199634, 218722, 193222, 193055, 193109, 193569, 204562, 239127, 181401, 198187, 228221, 179972, 177435, 193114, 173641, 193170, 173241, 179973, 187724, 187678, 183366, 183353, 212760, 248947, 202388, 179400, 179406, 180735, 240896, 253709, 239135, 239056, 179402, 208960, 184051, 193120, 193111, 239344, 193717, 253481, 179980, 253712, 179405, 197277, 227968, 179416, 239148, 205015, 239142, 179417, 193113, 239179, 193529, 260655, 179978, 190639, 206454))) 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 3826, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 38);[ Date: 2024-02-03 00:36:20 ]
20 11s829ms 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-02-03 09:00:17 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 6h23m53s 22,946 935ms 3s517ms 1s3ms 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 Feb 03 01 794 13m14s 1s 04 1,447 23m44s 984ms 05 1,076 17m20s 966ms 06 802 12m56s 968ms 08 333 5m34s 1s4ms 09 1,863 34m16s 1s103ms 10 1,321 22m30s 1s22ms 11 521 8m28s 975ms 12 1,029 17m34s 1s24ms 13 2,127 35m1s 988ms 14 2,121 35m17s 998ms 15 2,126 34m58s 987ms 16 2,137 36m39s 1s29ms 17 1,722 28m44s 1s1ms 18 1,645 27m14s 993ms 19 1,071 17m18s 969ms 20 811 12m57s 959ms -
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 = 239393 and item_demand_plan_id = 3836 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-02-03 16:49:49 Duration: 3s517ms
-
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 = 194434 and item_demand_plan_id = 3831 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-02-03 09:37:20 Duration: 3s505ms
-
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 = 204972 and item_demand_plan_id = 3833 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-02-03 16:49:26 Duration: 3s503ms
2 1h30m34s 2,129 2s352ms 4s359ms 2s552ms 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 Feb 03 01 794 32m30s 2s457ms 09 1,080 46m53s 2s604ms 10 255 11m10s 2s629ms -
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 = 194252 and item_demand_plan_id = 3831;
Date: 2024-02-03 09:37:16 Duration: 4s359ms
-
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 = 261632 and item_demand_plan_id = 3833;
Date: 2024-02-03 09:37:15 Duration: 4s136ms
-
update item_list_line set method = 4, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 172368 and item_demand_plan_id = 3834;
Date: 2024-02-03 09:37:01 Duration: 3s748ms
3 47m42s 7,792 330ms 1s19ms 367ms 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 #3
Day Hour Count Duration Avg duration Feb 03 00 918 5m13s 341ms 01 745 4m24s 355ms 08 429 2m39s 371ms 09 924 6m13s 404ms 10 991 5m59s 362ms 11 967 5m35s 347ms 12 527 3m17s 375ms 13 1 416ms 416ms 14 65 25s864ms 397ms 15 1 355ms 355ms 16 267 1m57s 439ms 17 569 3m32s 373ms 18 677 4m9s 368ms 19 694 4m5s 353ms 20 17 6s549ms 385ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 10:06:41 Duration: 1s19ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 16:52:30 Duration: 898ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 09:35:42 Duration: 863ms
4 43m8s 1,049 2s312ms 2s903ms 2s467ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Feb 03 00 542 22m19s 2s471ms 01 415 17m1s 2s460ms 08 92 3m47s 2s475ms -
update item_list_line set product_id = 183545, supercede_product_id = 241266, superceded = True where product_id = 241266 and item_demand_plan_id = 3833;
Date: 2024-02-03 01:35:24 Duration: 2s903ms
-
update item_list_line set product_id = 239169, supercede_product_id = 239171, superceded = True where product_id = 239171 and item_demand_plan_id = 3830;
Date: 2024-02-03 01:03:07 Duration: 2s824ms
-
update item_list_line set product_id = 238924, supercede_product_id = 238926, superceded = True where product_id = 238926 and item_demand_plan_id = 3831;
Date: 2024-02-03 01:10:23 Duration: 2s822ms
5 42m40s 17,255 120ms 649ms 148ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Feb 03 00 419 58s133ms 138ms 01 625 1m37s 156ms 02 51 11s645ms 228ms 03 56 13s464ms 240ms 04 791 1m50s 140ms 05 574 1m18s 137ms 06 623 1m32s 147ms 07 274 40s539ms 147ms 08 632 1m36s 152ms 09 1,264 3m24s 161ms 10 960 2m21s 147ms 11 595 1m26s 144ms 12 839 2m13s 159ms 13 1,326 3m3s 138ms 14 1,338 3m9s 141ms 15 1,362 3m9s 138ms 16 1,509 3m54s 155ms 17 1,180 2m56s 149ms 18 1,111 2m40s 144ms 19 785 1m50s 140ms 20 556 1m18s 141ms 21 118 23s689ms 200ms 22 199 32s449ms 163ms 23 68 15s747ms 231ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-03 16:50:09') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19568]', '["pointspring_master","mail.channel",19]', '["pointspring_master","mail.channel",248]', '["pointspring_master","mail.channel",285]', '["pointspring_master","mail.channel",526]', '["pointspring_master","mail.channel",561]', '["pointspring_master","res.partner",19568]', '["pointspring_master","ir.needaction",19568]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-03 16:51:00 Duration: 649ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-03 12:59:38') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19529]', '["pointspring_master","mail.channel",157]', '["pointspring_master","mail.channel",158]', '["pointspring_master","mail.channel",159]', '["pointspring_master","mail.channel",160]', '["pointspring_master","mail.channel",485]', '["pointspring_master","mail.channel",553]', '["pointspring_master","res.partner",19529]', '["pointspring_master","ir.needaction",19529]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-03 13:00:28 Duration: 629ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-03 09:36:08') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_984"', '["pointspring_master","calendar.alarm",19522]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",329]', '["pointspring_master","mail.channel",330]', '["pointspring_master","mail.channel",422]', '["pointspring_master","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-03 09:36:59 Duration: 581ms
6 19m6s 8,451 120ms 504ms 135ms with data as ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and item_demand_plan_id = ? and date::date = date ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) select id from data where rnum > ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Feb 03 04 522 1m9s 132ms 05 262 32s602ms 124ms 06 211 26s386ms 125ms 09 471 1m10s 148ms 10 363 48s769ms 134ms 11 136 17s327ms 127ms 12 469 1m5s 140ms 13 957 2m9s 135ms 14 1,004 2m16s 136ms 15 943 2m7s 134ms 16 1,171 2m44s 140ms 17 718 1m38s 136ms 18 688 1m32s 133ms 19 293 37s210ms 126ms 20 243 30s253ms 124ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 206606 and item_demand_plan_id = 3833 AND date::date = DATE '2024-02-29' 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-02-03 16:44:15 Duration: 504ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 244259 and item_demand_plan_id = 3834 AND date::date = DATE '2024-02-29' 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-02-03 12:47:17 Duration: 459ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 206677 and item_demand_plan_id = 3832 AND date::date = DATE '2024-02-29' 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-02-03 16:51:00 Duration: 425ms
7 12m30s 5,577 120ms 305ms 134ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Feb 03 04 296 38s966ms 131ms 05 60 7s624ms 127ms 06 49 6s212ms 126ms 09 397 55s759ms 140ms 10 203 27s133ms 133ms 11 57 7s290ms 127ms 12 343 46s934ms 136ms 13 705 1m34s 133ms 14 763 1m42s 133ms 15 689 1m31s 133ms 16 911 2m6s 138ms 17 512 1m8s 134ms 18 439 58s26ms 132ms 19 104 13s167ms 126ms 20 49 6s276ms 128ms -
select id, class_code from product_warehouse_inventory where product_id = 206041 and warehouse_id = 43;
Date: 2024-02-03 16:47:26 Duration: 305ms
-
select id, class_code from product_warehouse_inventory where product_id = 204785 and warehouse_id = 43;
Date: 2024-02-03 16:54:22 Duration: 279ms
-
select id, class_code from product_warehouse_inventory where product_id = 206193 and warehouse_id = 42;
Date: 2024-02-03 16:47:46 Duration: 272ms
8 8m6s 504 891ms 2s501ms 964ms select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Feb 03 08 333 5m19s 958ms 09 162 2m37s 970ms 12 6 6s182ms 1s30ms 13 3 3s433ms 1s144ms -
select id from item_list_line where product_id = 178194 and item_demand_plan_id = 3836;
Date: 2024-02-03 08:38:36 Duration: 2s501ms
-
select id from item_list_line where product_id = 221839 and item_demand_plan_id = 3836;
Date: 2024-02-03 08:50:04 Duration: 1s467ms
-
select id from item_list_line where product_id = 173000 and item_demand_plan_id = 3835;
Date: 2024-02-03 09:11:16 Duration: 1s416ms
9 5m24s 1,110 274ms 571ms 292ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Feb 03 00 6 1s753ms 292ms 08 6 1s692ms 282ms 11 30 8s890ms 296ms 12 27 8s135ms 301ms 14 24 7s531ms 313ms 15 108 31s703ms 293ms 16 90 28s604ms 317ms 17 135 40s55ms 296ms 18 105 31s955ms 304ms 19 129 37s593ms 291ms 20 126 35s853ms 284ms 21 108 30s386ms 281ms 22 126 35s453ms 281ms 23 90 25s162ms 279ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 16:47:03 Duration: 571ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 18:21:56 Duration: 569ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 16:53:19 Duration: 567ms
10 4m18s 193 1s136ms 2s869ms 1s340ms 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 Feb 03 08 30 38s759ms 1s291ms 09 18 27s451ms 1s525ms 11 12 14s264ms 1s188ms 12 48 1m2s 1s294ms 13 10 12s994ms 1s299ms 14 16 20s687ms 1s292ms 16 40 56s611ms 1s415ms 17 19 25s854ms 1s360ms -
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 = 3826 and ill.method not in (8, 7);
Date: 2024-02-03 09:38:56 Duration: 2s869ms
-
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 = 3832 and ill.method not in (8, 7);
Date: 2024-02-03 17:05:02 Duration: 2s532ms
-
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 = 3826 and ill.method not in (8, 7);
Date: 2024-02-03 09:37:18 Duration: 2s81ms
11 3m50s 193 1s 3s639ms 1s196ms 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 Feb 03 08 30 35s469ms 1s182ms 09 18 24s526ms 1s362ms 11 12 12s747ms 1s62ms 12 48 55s368ms 1s153ms 13 10 11s343ms 1s134ms 14 16 18s743ms 1s171ms 16 40 50s181ms 1s254ms 17 19 22s521ms 1s185ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3836 and active = True;
Date: 2024-02-03 16:49:49 Duration: 3s639ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3826 and active = True;
Date: 2024-02-03 09:38:50 Duration: 2s978ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3834 and active = True;
Date: 2024-02-03 09:37:13 Duration: 1s704ms
12 3m50s 1 3m50s 3m50s 3m50s 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 #12
Day Hour Count Duration Avg duration Feb 03 09 1 3m50s 3m50s -
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-02-03 09:08:52 Duration: 3m50s
13 3m46s 193 1s7ms 1s719ms 1s174ms 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 #13
Day Hour Count Duration Avg duration Feb 03 08 30 33s786ms 1s126ms 09 18 23s112ms 1s284ms 11 12 12s337ms 1s28ms 12 48 54s300ms 1s131ms 13 10 11s765ms 1s176ms 14 16 17s868ms 1s116ms 16 40 50s400ms 1s260ms 17 19 23s158ms 1s218ms -
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 = 3836 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 16:50:43 Duration: 1s719ms
-
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 = 3834 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 09:37:17 Duration: 1s668ms
-
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 = 3836 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 16:49:45 Duration: 1s603ms
14 3m28s 193 886ms 2s632ms 1s81ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Feb 03 08 30 30s160ms 1s5ms 09 18 21s263ms 1s181ms 11 12 11s16ms 918ms 12 48 50s469ms 1s51ms 13 10 10s599ms 1s59ms 14 16 17s324ms 1s82ms 16 40 45s516ms 1s137ms 17 19 22s361ms 1s176ms -
select count(id) from item_list_line where item_demand_plan_id = 3834;
Date: 2024-02-03 17:04:37 Duration: 2s632ms
-
select count(id) from item_list_line where item_demand_plan_id = 3832;
Date: 2024-02-03 12:51:35 Duration: 2s590ms
-
select count(id) from item_list_line where item_demand_plan_id = 3834;
Date: 2024-02-03 09:37:16 Duration: 2s442ms
15 3m19s 927 199ms 594ms 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 (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Feb 03 06 3 650ms 216ms 08 6 1s549ms 258ms 11 21 4s491ms 213ms 12 24 6s156ms 256ms 14 9 2s919ms 324ms 15 69 14s441ms 209ms 16 93 21s89ms 226ms 17 90 21s249ms 236ms 18 75 16s93ms 214ms 19 114 24s334ms 213ms 20 90 18s494ms 205ms 21 93 18s982ms 204ms 22 117 23s845ms 203ms 23 123 25s123ms 204ms -
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-02-03 17:08:10 Duration: 594ms
-
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-02-03 16:51:25 Duration: 577ms
-
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-02-03 17:08:11 Duration: 534ms
16 2m44s 558 275ms 606ms 294ms 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 #16
Day Hour Count Duration Avg duration Feb 03 07 3 854ms 284ms 08 3 833ms 277ms 11 21 6s35ms 287ms 12 21 6s71ms 289ms 14 15 4s423ms 294ms 15 87 25s837ms 296ms 16 114 35s33ms 307ms 17 72 21s702ms 301ms 18 42 12s475ms 297ms 19 36 10s386ms 288ms 20 36 10s299ms 286ms 21 51 14s383ms 282ms 22 33 9s265ms 280ms 23 24 6s784ms 282ms -
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-02-03 17:55:53 Duration: 606ms
-
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-02-03 16:51:03 Duration: 583ms
-
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-02-03 16:44:31 Duration: 562ms
17 2m9s 12 1s434ms 31s535ms 10s813ms delete from account_move_line where id in (...);Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Feb 03 06 12 2m9s 10s813ms -
DELETE FROM account_move_line WHERE id IN (4124403, 4124404, 4094258, 4094259, 4094260, 4094261, 4094262, 4094263, 4094264, 4094265, 4094266, 4094267, 4094268, 4094269, 4094270, 4094271, 4094272, 4094273, 4094274, 4094275, 4094276, 4094277);
Date: 2024-02-03 06:08:41 Duration: 31s535ms
-
DELETE FROM account_move_line WHERE id IN (4009275, 4009276, 4009277, 4009278, 4009279, 4009280, 4009281, 4009282, 4009283, 4009284, 4009285, 4009286, 4100003, 4100004);
Date: 2024-02-03 06:06:49 Duration: 20s230ms
-
DELETE FROM account_move_line WHERE id IN (4126276, 4126277, 4126278, 4126279, 4126280, 4126281, 4126282, 4126211, 4126212, 4126213, 4126304, 4126305);
Date: 2024-02-03 06:12:28 Duration: 17s262ms
18 2m7s 12 3s817ms 17s493ms 10s648ms 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 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 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 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 #18
Day Hour Count Duration Avg duration Feb 03 00 5 52s761ms 10s552ms 01 5 1m4s 12s913ms 08 2 10s459ms 5s229ms -
with data as ( select distinct shl.id as record, 3832, 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-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545) UNION ALL ( select distinct sol.id as record, 3832, 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-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545)) UNION ALL ( select distinct sm.id as record, 3832, 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-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545))) 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 3832, 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-02-03 01:12:11 Duration: 17s493ms
-
with data as ( select distinct shl.id as record, 3825, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 37 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235) UNION ALL ( select distinct sol.id as record, 3825, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 37 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235)) UNION ALL ( select distinct sm.id as record, 3825, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 37 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235))) 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 3825, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 37);
Date: 2024-02-03 00:30:18 Duration: 15s389ms
-
with data as ( select distinct shl.id as record, 3834, 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-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567) UNION ALL ( select distinct sol.id as record, 3834, 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-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567)) UNION ALL ( select distinct sm.id as record, 3834, 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-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567))) 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 3834, 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-02-03 01:37:01 Duration: 15s263ms
19 1m43s 1 1m43s 1m43s 1m43s 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 #19
Day Hour Count Duration Avg duration Feb 03 09 1 1m43s 1m43s -
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-02-03 09:03:18 Duration: 1m43s
20 1m34s 1 1m34s 1m34s 1m34s 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 #20
Day Hour Count Duration Avg duration Feb 03 09 1 1m34s 1m34s -
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-02-03 09:05:00 Duration: 1m34s
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 22,946 6h23m53s 935ms 3s517ms 1s3ms 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 Feb 03 01 794 13m14s 1s 04 1,447 23m44s 984ms 05 1,076 17m20s 966ms 06 802 12m56s 968ms 08 333 5m34s 1s4ms 09 1,863 34m16s 1s103ms 10 1,321 22m30s 1s22ms 11 521 8m28s 975ms 12 1,029 17m34s 1s24ms 13 2,127 35m1s 988ms 14 2,121 35m17s 998ms 15 2,126 34m58s 987ms 16 2,137 36m39s 1s29ms 17 1,722 28m44s 1s1ms 18 1,645 27m14s 993ms 19 1,071 17m18s 969ms 20 811 12m57s 959ms -
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 = 239393 and item_demand_plan_id = 3836 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-02-03 16:49:49 Duration: 3s517ms
-
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 = 194434 and item_demand_plan_id = 3831 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-02-03 09:37:20 Duration: 3s505ms
-
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 = 204972 and item_demand_plan_id = 3833 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-02-03 16:49:26 Duration: 3s503ms
2 17,255 42m40s 120ms 649ms 148ms 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 #2
Day Hour Count Duration Avg duration Feb 03 00 419 58s133ms 138ms 01 625 1m37s 156ms 02 51 11s645ms 228ms 03 56 13s464ms 240ms 04 791 1m50s 140ms 05 574 1m18s 137ms 06 623 1m32s 147ms 07 274 40s539ms 147ms 08 632 1m36s 152ms 09 1,264 3m24s 161ms 10 960 2m21s 147ms 11 595 1m26s 144ms 12 839 2m13s 159ms 13 1,326 3m3s 138ms 14 1,338 3m9s 141ms 15 1,362 3m9s 138ms 16 1,509 3m54s 155ms 17 1,180 2m56s 149ms 18 1,111 2m40s 144ms 19 785 1m50s 140ms 20 556 1m18s 141ms 21 118 23s689ms 200ms 22 199 32s449ms 163ms 23 68 15s747ms 231ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-03 16:50:09') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19568]', '["pointspring_master","mail.channel",19]', '["pointspring_master","mail.channel",248]', '["pointspring_master","mail.channel",285]', '["pointspring_master","mail.channel",526]', '["pointspring_master","mail.channel",561]', '["pointspring_master","res.partner",19568]', '["pointspring_master","ir.needaction",19568]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-03 16:51:00 Duration: 649ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-03 12:59:38') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19529]', '["pointspring_master","mail.channel",157]', '["pointspring_master","mail.channel",158]', '["pointspring_master","mail.channel",159]', '["pointspring_master","mail.channel",160]', '["pointspring_master","mail.channel",485]', '["pointspring_master","mail.channel",553]', '["pointspring_master","res.partner",19529]', '["pointspring_master","ir.needaction",19529]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-03 13:00:28 Duration: 629ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-03 09:36:08') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_984"', '["pointspring_master","calendar.alarm",19522]', '["pointspring_master","mail.channel",39]', '["pointspring_master","mail.channel",40]', '["pointspring_master","mail.channel",50]', '["pointspring_master","mail.channel",329]', '["pointspring_master","mail.channel",330]', '["pointspring_master","mail.channel",422]', '["pointspring_master","res.partner",19522]', '["pointspring_master","ir.needaction",19522]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-03 09:36:59 Duration: 581ms
3 8,451 19m6s 120ms 504ms 135ms 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 Feb 03 04 522 1m9s 132ms 05 262 32s602ms 124ms 06 211 26s386ms 125ms 09 471 1m10s 148ms 10 363 48s769ms 134ms 11 136 17s327ms 127ms 12 469 1m5s 140ms 13 957 2m9s 135ms 14 1,004 2m16s 136ms 15 943 2m7s 134ms 16 1,171 2m44s 140ms 17 718 1m38s 136ms 18 688 1m32s 133ms 19 293 37s210ms 126ms 20 243 30s253ms 124ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 206606 and item_demand_plan_id = 3833 AND date::date = DATE '2024-02-29' 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-02-03 16:44:15 Duration: 504ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 244259 and item_demand_plan_id = 3834 AND date::date = DATE '2024-02-29' 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-02-03 12:47:17 Duration: 459ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 206677 and item_demand_plan_id = 3832 AND date::date = DATE '2024-02-29' 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-02-03 16:51:00 Duration: 425ms
4 7,792 47m42s 330ms 1s19ms 367ms 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 #4
Day Hour Count Duration Avg duration Feb 03 00 918 5m13s 341ms 01 745 4m24s 355ms 08 429 2m39s 371ms 09 924 6m13s 404ms 10 991 5m59s 362ms 11 967 5m35s 347ms 12 527 3m17s 375ms 13 1 416ms 416ms 14 65 25s864ms 397ms 15 1 355ms 355ms 16 267 1m57s 439ms 17 569 3m32s 373ms 18 677 4m9s 368ms 19 694 4m5s 353ms 20 17 6s549ms 385ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 10:06:41 Duration: 1s19ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 16:52:30 Duration: 898ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 09:35:42 Duration: 863ms
5 5,577 12m30s 120ms 305ms 134ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Feb 03 04 296 38s966ms 131ms 05 60 7s624ms 127ms 06 49 6s212ms 126ms 09 397 55s759ms 140ms 10 203 27s133ms 133ms 11 57 7s290ms 127ms 12 343 46s934ms 136ms 13 705 1m34s 133ms 14 763 1m42s 133ms 15 689 1m31s 133ms 16 911 2m6s 138ms 17 512 1m8s 134ms 18 439 58s26ms 132ms 19 104 13s167ms 126ms 20 49 6s276ms 128ms -
select id, class_code from product_warehouse_inventory where product_id = 206041 and warehouse_id = 43;
Date: 2024-02-03 16:47:26 Duration: 305ms
-
select id, class_code from product_warehouse_inventory where product_id = 204785 and warehouse_id = 43;
Date: 2024-02-03 16:54:22 Duration: 279ms
-
select id, class_code from product_warehouse_inventory where product_id = 206193 and warehouse_id = 42;
Date: 2024-02-03 16:47:46 Duration: 272ms
6 2,129 1h30m34s 2s352ms 4s359ms 2s552ms 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 #6
Day Hour Count Duration Avg duration Feb 03 01 794 32m30s 2s457ms 09 1,080 46m53s 2s604ms 10 255 11m10s 2s629ms -
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 = 194252 and item_demand_plan_id = 3831;
Date: 2024-02-03 09:37:16 Duration: 4s359ms
-
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 = 261632 and item_demand_plan_id = 3833;
Date: 2024-02-03 09:37:15 Duration: 4s136ms
-
update item_list_line set method = 4, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 172368 and item_demand_plan_id = 3834;
Date: 2024-02-03 09:37:01 Duration: 3s748ms
7 1,110 5m24s 274ms 571ms 292ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Feb 03 00 6 1s753ms 292ms 08 6 1s692ms 282ms 11 30 8s890ms 296ms 12 27 8s135ms 301ms 14 24 7s531ms 313ms 15 108 31s703ms 293ms 16 90 28s604ms 317ms 17 135 40s55ms 296ms 18 105 31s955ms 304ms 19 129 37s593ms 291ms 20 126 35s853ms 284ms 21 108 30s386ms 281ms 22 126 35s453ms 281ms 23 90 25s162ms 279ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 16:47:03 Duration: 571ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 18:21:56 Duration: 569ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 16:53:19 Duration: 567ms
8 1,049 43m8s 2s312ms 2s903ms 2s467ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Feb 03 00 542 22m19s 2s471ms 01 415 17m1s 2s460ms 08 92 3m47s 2s475ms -
update item_list_line set product_id = 183545, supercede_product_id = 241266, superceded = True where product_id = 241266 and item_demand_plan_id = 3833;
Date: 2024-02-03 01:35:24 Duration: 2s903ms
-
update item_list_line set product_id = 239169, supercede_product_id = 239171, superceded = True where product_id = 239171 and item_demand_plan_id = 3830;
Date: 2024-02-03 01:03:07 Duration: 2s824ms
-
update item_list_line set product_id = 238924, supercede_product_id = 238926, superceded = True where product_id = 238926 and item_demand_plan_id = 3831;
Date: 2024-02-03 01:10:23 Duration: 2s822ms
9 927 3m19s 199ms 594ms 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 (...)) 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 #9
Day Hour Count Duration Avg duration Feb 03 06 3 650ms 216ms 08 6 1s549ms 258ms 11 21 4s491ms 213ms 12 24 6s156ms 256ms 14 9 2s919ms 324ms 15 69 14s441ms 209ms 16 93 21s89ms 226ms 17 90 21s249ms 236ms 18 75 16s93ms 214ms 19 114 24s334ms 213ms 20 90 18s494ms 205ms 21 93 18s982ms 204ms 22 117 23s845ms 203ms 23 123 25s123ms 204ms -
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-02-03 17:08:10 Duration: 594ms
-
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-02-03 16:51:25 Duration: 577ms
-
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-02-03 17:08:11 Duration: 534ms
10 558 2m44s 275ms 606ms 294ms 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 #10
Day Hour Count Duration Avg duration Feb 03 07 3 854ms 284ms 08 3 833ms 277ms 11 21 6s35ms 287ms 12 21 6s71ms 289ms 14 15 4s423ms 294ms 15 87 25s837ms 296ms 16 114 35s33ms 307ms 17 72 21s702ms 301ms 18 42 12s475ms 297ms 19 36 10s386ms 288ms 20 36 10s299ms 286ms 21 51 14s383ms 282ms 22 33 9s265ms 280ms 23 24 6s784ms 282ms -
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-02-03 17:55:53 Duration: 606ms
-
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-02-03 16:51:03 Duration: 583ms
-
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-02-03 16:44:31 Duration: 562ms
11 504 8m6s 891ms 2s501ms 964ms select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Feb 03 08 333 5m19s 958ms 09 162 2m37s 970ms 12 6 6s182ms 1s30ms 13 3 3s433ms 1s144ms -
select id from item_list_line where product_id = 178194 and item_demand_plan_id = 3836;
Date: 2024-02-03 08:38:36 Duration: 2s501ms
-
select id from item_list_line where product_id = 221839 and item_demand_plan_id = 3836;
Date: 2024-02-03 08:50:04 Duration: 1s467ms
-
select id from item_list_line where product_id = 173000 and item_demand_plan_id = 3835;
Date: 2024-02-03 09:11:16 Duration: 1s416ms
12 255 39s425ms 130ms 209ms 154ms 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 #12
Day Hour Count Duration Avg duration Feb 03 03 26 3s710ms 142ms 06 174 27s827ms 159ms 07 28 3s842ms 137ms 23 27 4s45ms 149ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (45344)) AND (("account_move"."id" not in (1180035)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-02-03 06:13:01 Duration: 209ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (45328)) AND (("account_move"."id" not in (1182862)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-02-03 06:07:54 Duration: 204ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (45302)) AND (("account_move"."id" not in (1184141)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-02-03 06:06:55 Duration: 203ms
13 193 4m18s 1s136ms 2s869ms 1s340ms 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 #13
Day Hour Count Duration Avg duration Feb 03 08 30 38s759ms 1s291ms 09 18 27s451ms 1s525ms 11 12 14s264ms 1s188ms 12 48 1m2s 1s294ms 13 10 12s994ms 1s299ms 14 16 20s687ms 1s292ms 16 40 56s611ms 1s415ms 17 19 25s854ms 1s360ms -
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 = 3826 and ill.method not in (8, 7);
Date: 2024-02-03 09:38:56 Duration: 2s869ms
-
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 = 3832 and ill.method not in (8, 7);
Date: 2024-02-03 17:05:02 Duration: 2s532ms
-
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 = 3826 and ill.method not in (8, 7);
Date: 2024-02-03 09:37:18 Duration: 2s81ms
14 193 3m50s 1s 3s639ms 1s196ms 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 Feb 03 08 30 35s469ms 1s182ms 09 18 24s526ms 1s362ms 11 12 12s747ms 1s62ms 12 48 55s368ms 1s153ms 13 10 11s343ms 1s134ms 14 16 18s743ms 1s171ms 16 40 50s181ms 1s254ms 17 19 22s521ms 1s185ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3836 and active = True;
Date: 2024-02-03 16:49:49 Duration: 3s639ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3826 and active = True;
Date: 2024-02-03 09:38:50 Duration: 2s978ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3834 and active = True;
Date: 2024-02-03 09:37:13 Duration: 1s704ms
15 193 3m46s 1s7ms 1s719ms 1s174ms 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 #15
Day Hour Count Duration Avg duration Feb 03 08 30 33s786ms 1s126ms 09 18 23s112ms 1s284ms 11 12 12s337ms 1s28ms 12 48 54s300ms 1s131ms 13 10 11s765ms 1s176ms 14 16 17s868ms 1s116ms 16 40 50s400ms 1s260ms 17 19 23s158ms 1s218ms -
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 = 3836 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 16:50:43 Duration: 1s719ms
-
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 = 3834 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 09:37:17 Duration: 1s668ms
-
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 = 3836 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 16:49:45 Duration: 1s603ms
16 193 3m28s 886ms 2s632ms 1s81ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Feb 03 08 30 30s160ms 1s5ms 09 18 21s263ms 1s181ms 11 12 11s16ms 918ms 12 48 50s469ms 1s51ms 13 10 10s599ms 1s59ms 14 16 17s324ms 1s82ms 16 40 45s516ms 1s137ms 17 19 22s361ms 1s176ms -
select count(id) from item_list_line where item_demand_plan_id = 3834;
Date: 2024-02-03 17:04:37 Duration: 2s632ms
-
select count(id) from item_list_line where item_demand_plan_id = 3832;
Date: 2024-02-03 12:51:35 Duration: 2s590ms
-
select count(id) from item_list_line where item_demand_plan_id = 3834;
Date: 2024-02-03 09:37:16 Duration: 2s442ms
17 178 32s354ms 120ms 329ms 181ms 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 #17
Day Hour Count Duration Avg duration Feb 03 08 2 269ms 134ms 09 2 261ms 130ms 12 11 2s73ms 188ms 13 60 13s22ms 217ms 14 60 10s480ms 174ms 15 30 4s426ms 147ms 16 8 1s128ms 141ms 17 5 692ms 138ms -
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-02-03 13:03:17 Duration: 329ms
-
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-02-03 13:11:17 Duration: 317ms
-
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-02-03 13:24:17 Duration: 313ms
18 157 22s656ms 120ms 280ms 144ms 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 #18
Day Hour Count Duration Avg duration Feb 03 08 25 3s430ms 137ms 09 16 2s643ms 165ms 11 6 746ms 124ms 12 38 5s466ms 143ms 13 9 1s245ms 138ms 14 14 2s117ms 151ms 16 33 4s697ms 142ms 17 16 2s310ms 144ms -
select count(id) as total_forecast_count from forecasted_data where is_forcast = True and item_demand_plan_id = 3834 and active = True;
Date: 2024-02-03 09:37:13 Duration: 280ms
-
select count(id) as total_forecast_count from forecasted_data where is_forcast = True and item_demand_plan_id = 3826 and active = True;
Date: 2024-02-03 09:37:13 Duration: 254ms
-
select count(id) as total_forecast_count from forecasted_data where is_forcast = True and item_demand_plan_id = 3833 and active = True;
Date: 2024-02-03 12:48:21 Duration: 240ms
19 123 18s426ms 120ms 220ms 149ms 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 Feb 03 00 1 125ms 125ms 04 5 751ms 150ms 05 4 516ms 129ms 08 2 283ms 141ms 11 7 975ms 139ms 12 17 2s614ms 153ms 13 2 274ms 137ms 15 24 3s597ms 149ms 16 25 3s978ms 159ms 17 22 3s290ms 149ms 18 10 1s462ms 146ms 19 3 425ms 141ms 20 1 133ms 133ms -
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-02-03 17:04:49 Duration: 220ms
-
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-02-03 16:59:05 Duration: 188ms
-
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-02-03 15:34:57 Duration: 182ms
20 115 14s965ms 120ms 184ms 130ms select max(id) from ir_attachment where create_uid = ? and url like ? group by name order by name;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Feb 03 00 1 132ms 132ms 01 1 124ms 124ms 09 40 5s208ms 130ms 10 9 1s154ms 128ms 11 2 253ms 126ms 12 7 892ms 127ms 14 2 263ms 131ms 16 41 5s363ms 130ms 17 12 1s573ms 131ms -
SELECT max(id) FROM ir_attachment WHERE create_uid = 1 AND url like '/web/content/%-5ea4658/web.assets_common_lazy.js' GROUP BY name ORDER BY name;
Date: 2024-02-03 09:37:16 Duration: 184ms
-
SELECT max(id) FROM ir_attachment WHERE create_uid = 1 AND url like '/web/content/%-a54df00/web.assets_common.css' GROUP BY name ORDER BY name;
Date: 2024-02-03 16:48:27 Duration: 162ms
-
SELECT max(id) FROM ir_attachment WHERE create_uid = 1 AND url like '/web/content/%-aedec04/web.assets_common_minimal_js.js' GROUP BY name ORDER BY name;
Date: 2024-02-03 09:41:13 Duration: 154ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 3m50s 3m50s 3m50s 1 3m50s 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 Feb 03 09 1 3m50s 3m50s -
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-02-03 09:08:52 Duration: 3m50s
2 1m43s 1m43s 1m43s 1 1m43s 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 Feb 03 09 1 1m43s 1m43s -
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-02-03 09:03:18 Duration: 1m43s
3 1m34s 1m34s 1m34s 1 1m34s 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 Feb 03 09 1 1m34s 1m34s -
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-02-03 09:05:00 Duration: 1m34s
4 1s434ms 31s535ms 10s813ms 12 2m9s delete from account_move_line where id in (...);Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Feb 03 06 12 2m9s 10s813ms -
DELETE FROM account_move_line WHERE id IN (4124403, 4124404, 4094258, 4094259, 4094260, 4094261, 4094262, 4094263, 4094264, 4094265, 4094266, 4094267, 4094268, 4094269, 4094270, 4094271, 4094272, 4094273, 4094274, 4094275, 4094276, 4094277);
Date: 2024-02-03 06:08:41 Duration: 31s535ms
-
DELETE FROM account_move_line WHERE id IN (4009275, 4009276, 4009277, 4009278, 4009279, 4009280, 4009281, 4009282, 4009283, 4009284, 4009285, 4009286, 4100003, 4100004);
Date: 2024-02-03 06:06:49 Duration: 20s230ms
-
DELETE FROM account_move_line WHERE id IN (4126276, 4126277, 4126278, 4126279, 4126280, 4126281, 4126282, 4126211, 4126212, 4126213, 4126304, 4126305);
Date: 2024-02-03 06:12:28 Duration: 17s262ms
5 3s817ms 17s493ms 10s648ms 12 2m7s 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 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 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 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 Feb 03 00 5 52s761ms 10s552ms 01 5 1m4s 12s913ms 08 2 10s459ms 5s229ms -
with data as ( select distinct shl.id as record, 3832, 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-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545) UNION ALL ( select distinct sol.id as record, 3832, 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-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545)) UNION ALL ( select distinct sm.id as record, 3832, 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-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193209, 209187, 181401, 193113, 193114, 250980, 184038, 209314, 209338, 209425, 216830, 213768, 213509, 203493, 183350, 209323, 209372, 209302, 209495, 209255, 209569, 209470, 209381, 209438, 209468, 209380, 209378, 209320, 209303, 209273, 209439, 209317, 209316, 209180, 209315, 209198, 209572, 209328, 209188, 209193, 209424, 223745, 240858, 242323, 172771, 199584, 188924, 209227, 209513, 209423, 209563, 209434, 213767, 209332, 187791, 203634, 209231, 209264, 209182, 209199, 209356, 193359, 172604, 209466, 209305, 202653, 209268, 183363, 209261, 209562, 239388, 216289, 215693, 209561, 202632, 209415, 209390, 209559, 209256, 209272, 203645, 193405, 209518, 209357, 209225, 209202, 209482, 209421, 209344, 209418, 193620, 209479, 209226, 209281, 209269, 209414, 209210, 183351, 209329, 209189, 209503, 209339, 209176, 184136, 202640, 177747, 209195, 209435, 203674, 209250, 202477, 209271, 204056, 215733, 209233, 189041, 209469, 209360, 209333, 209241, 209308, 209452, 209265, 209325, 209235, 209319, 209322, 209206, 209398, 209279, 209312, 209365, 193529, 209475, 209456, 209277, 209307, 209358, 209270, 209207, 209441, 209326, 209422, 209412, 209186, 193666, 209512, 209259, 209510, 193698, 209228, 209520, 209309, 209497, 209462, 203194, 209232, 175955, 209260, 209331, 186294, 176822, 193508, 186233, 209565, 209242, 209299, 209524, 209234, 193625, 209200, 209209, 209506, 209178, 209258, 209247, 209509, 209485, 209330, 209494, 209560, 209571, 209346, 209342, 209464, 209487, 209493, 186845, 215083, 209211, 209311, 209257, 209442, 209366, 202687, 220144, 216568, 189318, 189018, 216761, 202634, 209216, 209516, 209347, 209525, 214111, 216288, 209229, 209502, 209546, 209437, 209230, 209555, 209191, 209567, 209246, 209340, 209251, 209266, 209343, 209286, 209394, 209245, 209175, 209252, 209492, 209447, 193239, 209474, 209306, 209212, 177857, 209391, 209345, 209262, 202652, 209221, 173241, 209505, 209528, 176416, 183364, 238976, 217801, 215288, 216504, 187848, 209573, 190568, 184040, 208831, 209427, 247413, 258628, 209352, 188430, 248827, 188461, 244119, 209413, 190525, 181409, 199582, 209183, 209459, 209396, 209254, 209190, 209327, 209220, 209517, 209177, 209440, 209243, 209194, 209298, 209526, 209484, 209172, 209284, 209276, 209374, 215085, 209370, 209238, 190984, 209566, 220159, 193565, 209214, 261130, 209433, 209362, 209491, 209236, 209318, 209392, 209219, 249176, 209556, 258629, 253947, 209244, 209174, 209185, 209507, 209280, 209239, 209436, 259262, 219982, 186232, 209515, 209181, 209361, 186295, 203681, 209496, 193569, 209324, 188425, 209430, 209384, 219448, 209321, 209367, 209558, 209201, 209568, 209184, 176679, 209197, 209446, 209359, 209511, 234379, 209196, 197918, 209304, 209472, 209529, 209483, 218167, 193509, 209310, 186298, 197273, 202577, 209173, 209480, 209527, 209457, 209471, 193110, 203637, 215132, 181351, 197240, 183353, 193111, 202635, 209334, 209935, 209313, 209354, 217925, 209382, 189042, 193055, 193109, 206656, 196255, 193215, 253188, 190764, 209335, 209521, 209460, 209473, 209501, 209389, 184051, 209403, 203642, 209278, 209179, 204975, 209514, 209519, 209488, 209451, 209192, 209267, 209393, 209554, 209282, 209253, 175953, 209537, 209379, 180730, 209203, 190979, 203690, 261330, 192904, 209416, 209538, 209263, 209570, 209545))) 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 3832, 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-02-03 01:12:11 Duration: 17s493ms
-
with data as ( select distinct shl.id as record, 3825, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 37 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235) UNION ALL ( select distinct sol.id as record, 3825, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 37 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235)) UNION ALL ( select distinct sm.id as record, 3825, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 37 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (203756, 189098, 181363, 238911, 175876, 197240, 228221, 209416, 209549, 209331, 209179, 209398, 209181, 209520, 209460, 209180, 209316, 209298, 209484, 209365, 209423, 173771, 209469, 209374, 188456, 178710, 209195, 209512, 209319, 193529, 209333, 209475, 209538, 179979, 209327, 209459, 209456, 209309, 209425, 209207, 209307, 209183, 209422, 209497, 209462, 180397, 209270, 209278, 209440, 209241, 209277, 209279, 209435, 209260, 209265, 209358, 209412, 209452, 209271, 180400, 209441, 209186, 209434, 209360, 209325, 209233, 209314, 209188, 209354, 209329, 209256, 199082, 209470, 209513, 209318, 209305, 209457, 209439, 209391, 209361, 184675, 209483, 209527, 209205, 209340, 209321, 209190, 209382, 209505, 209198, 209545, 209245, 209324, 209572, 209430, 209251, 209196, 209478, 209263, 209302, 209529, 209525, 209498, 209556, 209286, 209175, 209306, 209229, 209310, 209262, 209230, 209568, 209558, 209347, 173241, 209313, 209515, 209573, 209342, 209209, 209200, 209495, 209381, 209242, 209560, 209485, 209509, 209236, 209494, 209174, 209234, 209571, 209464, 209378, 209566, 209247, 209493, 209280, 209214, 209239, 178625, 209379, 209172, 209433, 209226, 209526, 209317, 209479, 209521, 209352, 209192, 209210, 209418, 209421, 239268, 209344, 177173, 209356, 209281, 209390, 209328, 209182, 209202, 209561, 209238, 209488, 209330, 209436, 209506, 209276, 209519, 209282, 209261, 209334, 209554, 238904, 209322, 209228, 209326, 209339, 209357, 209372, 209403, 209517, 209569, 209299, 209332, 209335, 209338, 209220, 209563, 209193, 209308, 175893, 185856, 203752, 203231, 209227, 209396, 209255, 238921, 187994, 203735, 175890, 203723, 209471, 209189, 209254, 209253, 209518, 209503, 209413, 209427, 209199, 209466, 209267, 209559, 209176, 209264, 209415, 197227, 209367, 209272, 209392, 198387, 177857, 209257, 209345, 209511, 222244, 209437, 209343, 209211, 209570, 209315, 209414, 209246, 209191, 209212, 209389, 209303, 209184, 209284, 209304, 209201, 209496, 209203, 209177, 209269, 209546, 209362, 209173, 209320, 197258, 209273, 209384, 209424, 209480, 186099, 209473, 222245, 209472, 209244, 209185, 209491, 209393, 209231, 209442, 209477, 209446, 209501, 209628, 209507, 209531, 209514, 209487, 209528, 209565, 209499, 209346, 209178, 209252, 209516, 181336, 209567, 209258, 209197, 209502, 209370, 209187, 239141, 203860, 209366, 209438, 209359, 209380, 209225, 209323, 209445, 209451, 209206, 209232, 203730, 209259, 209562, 209250, 239344, 209311, 209268, 203787, 204971, 209275, 209492, 209468, 209266, 209194, 209447, 189036, 209510, 209221, 209537, 209555, 209474, 209524, 209219, 209482, 209312, 203794, 203750, 209243, 203809, 209216, 209532, 209235))) 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 3825, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 37);
Date: 2024-02-03 00:30:18 Duration: 15s389ms
-
with data as ( select distinct shl.id as record, 3834, 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-02-03 00:00:00' and shl.invoice_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567) UNION ALL ( select distinct sol.id as record, 3834, 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-02-03 00:00:00' and so.date_order <= '2024-02-03 00:00:00' and so.state in ('permanent_order') 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567)) UNION ALL ( select distinct sm.id as record, 3834, 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-02-03 00:00:00' and mrp.create_date <= '2024-02-03 00:00:00' 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, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209554, 209468, 173241, 209334, 209488, 209221, 209356, 209354, 209416, 209225, 184010, 213335, 197240, 213290, 213330, 176058, 176205, 240896, 228221, 211671, 209466, 209378, 209529, 209382, 209469, 209511, 209298, 209326, 209330, 209372, 209546, 209515, 209211, 209189, 209559, 209562, 209199, 209329, 209521, 209482, 209253, 209255, 209219, 209231, 209503, 183566, 209276, 209357, 209227, 217253, 209518, 209517, 209268, 209370, 209392, 209254, 209226, 209561, 209470, 209427, 209282, 209203, 209190, 209201, 209344, 209513, 209457, 209479, 209267, 209176, 209421, 209569, 209413, 209414, 209537, 209272, 209418, 209202, 209264, 209270, 186294, 209312, 209460, 209316, 209510, 186184, 183563, 209323, 209233, 209235, 209193, 209538, 214527, 206509, 209327, 209307, 209497, 209365, 209322, 209422, 209179, 209195, 209423, 209250, 209456, 209314, 209441, 209396, 209309, 209532, 209232, 209187, 209177, 209358, 209520, 209412, 209278, 209563, 209393, 209451, 209573, 209509, 171850, 209239, 209328, 209380, 209242, 209238, 209362, 209247, 209560, 209335, 209342, 209200, 209480, 209487, 209565, 209346, 209197, 209571, 209178, 209209, 209485, 209464, 209192, 209566, 209244, 209493, 209381, 209473, 206519, 209196, 209313, 209338, 209216, 209525, 209430, 209474, 209367, 209366, 209558, 209384, 209438, 209555, 209505, 209496, 186295, 209528, 209572, 209212, 209437, 209447, 209246, 209498, 209477, 209340, 209343, 209306, 209345, 209304, 209266, 209184, 209321, 209303, 209310, 209324, 209245, 209361, 209198, 209492, 239344, 252547, 209241, 180952, 209228, 209243, 209206, 209512, 209277, 209284, 209318, 210625, 186249, 209265, 244601, 209339, 209333, 209279, 209415, 210622, 209484, 250940, 209475, 209452, 180821, 209188, 209445, 209434, 209325, 190227, 209462, 185979, 209519, 209459, 209425, 209186, 209491, 209256, 209436, 209273, 193387, 209398, 209360, 209220, 252885, 209433, 209495, 209524, 209501, 218035, 245563, 209507, 209234, 207553, 209181, 209514, 209531, 209183, 209446, 209194, 207368, 209570, 209214, 217072, 185978, 246016, 209320, 209173, 209180, 209257, 209252, 216961, 209172, 193239, 246017, 209442, 209311, 209230, 209472, 209483, 209435, 209439, 209262, 209263, 209568, 209175, 209502, 209229, 209359, 209478, 209269, 209424, 209403, 209506, 209556, 209191, 209236, 176066, 209302, 209390, 209494, 209331, 209182, 209271, 209379, 172690, 209545, 209308, 209347, 209389, 209317, 209210, 209251, 209315, 209207, 209261, 209258, 209259, 209526, 209280, 209286, 209352, 186186, 209260, 209185, 209174, 209332, 209319, 209299, 209527, 209440, 193734, 209499, 210620, 217254, 209305, 209374, 209516, 209391, 209567))) 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 3834, 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-02-03 01:37:01 Duration: 15s263ms
6 2s352ms 4s359ms 2s552ms 2,129 1h30m34s 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 #6
Day Hour Count Duration Avg duration Feb 03 01 794 32m30s 2s457ms 09 1,080 46m53s 2s604ms 10 255 11m10s 2s629ms -
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 = 194252 and item_demand_plan_id = 3831;
Date: 2024-02-03 09:37:16 Duration: 4s359ms
-
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 = 261632 and item_demand_plan_id = 3833;
Date: 2024-02-03 09:37:15 Duration: 4s136ms
-
update item_list_line set method = 4, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 172368 and item_demand_plan_id = 3834;
Date: 2024-02-03 09:37:01 Duration: 3s748ms
7 2s312ms 2s903ms 2s467ms 1,049 43m8s update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Feb 03 00 542 22m19s 2s471ms 01 415 17m1s 2s460ms 08 92 3m47s 2s475ms -
update item_list_line set product_id = 183545, supercede_product_id = 241266, superceded = True where product_id = 241266 and item_demand_plan_id = 3833;
Date: 2024-02-03 01:35:24 Duration: 2s903ms
-
update item_list_line set product_id = 239169, supercede_product_id = 239171, superceded = True where product_id = 239171 and item_demand_plan_id = 3830;
Date: 2024-02-03 01:03:07 Duration: 2s824ms
-
update item_list_line set product_id = 238924, supercede_product_id = 238926, superceded = True where product_id = 238926 and item_demand_plan_id = 3831;
Date: 2024-02-03 01:10:23 Duration: 2s822ms
8 1s136ms 2s869ms 1s340ms 193 4m18s 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 #8
Day Hour Count Duration Avg duration Feb 03 08 30 38s759ms 1s291ms 09 18 27s451ms 1s525ms 11 12 14s264ms 1s188ms 12 48 1m2s 1s294ms 13 10 12s994ms 1s299ms 14 16 20s687ms 1s292ms 16 40 56s611ms 1s415ms 17 19 25s854ms 1s360ms -
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 = 3826 and ill.method not in (8, 7);
Date: 2024-02-03 09:38:56 Duration: 2s869ms
-
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 = 3832 and ill.method not in (8, 7);
Date: 2024-02-03 17:05:02 Duration: 2s532ms
-
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 = 3826 and ill.method not in (8, 7);
Date: 2024-02-03 09:37:18 Duration: 2s81ms
9 1s 3s639ms 1s196ms 193 3m50s select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Feb 03 08 30 35s469ms 1s182ms 09 18 24s526ms 1s362ms 11 12 12s747ms 1s62ms 12 48 55s368ms 1s153ms 13 10 11s343ms 1s134ms 14 16 18s743ms 1s171ms 16 40 50s181ms 1s254ms 17 19 22s521ms 1s185ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3836 and active = True;
Date: 2024-02-03 16:49:49 Duration: 3s639ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3826 and active = True;
Date: 2024-02-03 09:38:50 Duration: 2s978ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3834 and active = True;
Date: 2024-02-03 09:37:13 Duration: 1s704ms
10 1s7ms 1s719ms 1s174ms 193 3m46s 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 Feb 03 08 30 33s786ms 1s126ms 09 18 23s112ms 1s284ms 11 12 12s337ms 1s28ms 12 48 54s300ms 1s131ms 13 10 11s765ms 1s176ms 14 16 17s868ms 1s116ms 16 40 50s400ms 1s260ms 17 19 23s158ms 1s218ms -
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 = 3836 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 16:50:43 Duration: 1s719ms
-
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 = 3834 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 09:37:17 Duration: 1s668ms
-
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 = 3836 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-02-03 16:49:45 Duration: 1s603ms
11 886ms 2s632ms 1s81ms 193 3m28s select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Feb 03 08 30 30s160ms 1s5ms 09 18 21s263ms 1s181ms 11 12 11s16ms 918ms 12 48 50s469ms 1s51ms 13 10 10s599ms 1s59ms 14 16 17s324ms 1s82ms 16 40 45s516ms 1s137ms 17 19 22s361ms 1s176ms -
select count(id) from item_list_line where item_demand_plan_id = 3834;
Date: 2024-02-03 17:04:37 Duration: 2s632ms
-
select count(id) from item_list_line where item_demand_plan_id = 3832;
Date: 2024-02-03 12:51:35 Duration: 2s590ms
-
select count(id) from item_list_line where item_demand_plan_id = 3834;
Date: 2024-02-03 09:37:16 Duration: 2s442ms
12 935ms 3s517ms 1s3ms 22,946 6h23m53s 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 #12
Day Hour Count Duration Avg duration Feb 03 01 794 13m14s 1s 04 1,447 23m44s 984ms 05 1,076 17m20s 966ms 06 802 12m56s 968ms 08 333 5m34s 1s4ms 09 1,863 34m16s 1s103ms 10 1,321 22m30s 1s22ms 11 521 8m28s 975ms 12 1,029 17m34s 1s24ms 13 2,127 35m1s 988ms 14 2,121 35m17s 998ms 15 2,126 34m58s 987ms 16 2,137 36m39s 1s29ms 17 1,722 28m44s 1s1ms 18 1,645 27m14s 993ms 19 1,071 17m18s 969ms 20 811 12m57s 959ms -
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 = 239393 and item_demand_plan_id = 3836 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-02-03 16:49:49 Duration: 3s517ms
-
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 = 194434 and item_demand_plan_id = 3831 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-02-03 09:37:20 Duration: 3s505ms
-
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 = 204972 and item_demand_plan_id = 3833 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-02-03 16:49:26 Duration: 3s503ms
13 891ms 2s501ms 964ms 504 8m6s select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Feb 03 08 333 5m19s 958ms 09 162 2m37s 970ms 12 6 6s182ms 1s30ms 13 3 3s433ms 1s144ms -
select id from item_list_line where product_id = 178194 and item_demand_plan_id = 3836;
Date: 2024-02-03 08:38:36 Duration: 2s501ms
-
select id from item_list_line where product_id = 221839 and item_demand_plan_id = 3836;
Date: 2024-02-03 08:50:04 Duration: 1s467ms
-
select id from item_list_line where product_id = 173000 and item_demand_plan_id = 3835;
Date: 2024-02-03 09:11:16 Duration: 1s416ms
14 330ms 1s19ms 367ms 7,792 47m42s 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 #14
Day Hour Count Duration Avg duration Feb 03 00 918 5m13s 341ms 01 745 4m24s 355ms 08 429 2m39s 371ms 09 924 6m13s 404ms 10 991 5m59s 362ms 11 967 5m35s 347ms 12 527 3m17s 375ms 13 1 416ms 416ms 14 65 25s864ms 397ms 15 1 355ms 355ms 16 267 1m57s 439ms 17 569 3m32s 373ms 18 677 4m9s 368ms 19 694 4m5s 353ms 20 17 6s549ms 385ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 10:06:41 Duration: 1s19ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 16:52:30 Duration: 898ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-a54df00/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-03 09:35:42 Duration: 863ms
15 275ms 606ms 294ms 558 2m44s 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 Feb 03 07 3 854ms 284ms 08 3 833ms 277ms 11 21 6s35ms 287ms 12 21 6s71ms 289ms 14 15 4s423ms 294ms 15 87 25s837ms 296ms 16 114 35s33ms 307ms 17 72 21s702ms 301ms 18 42 12s475ms 297ms 19 36 10s386ms 288ms 20 36 10s299ms 286ms 21 51 14s383ms 282ms 22 33 9s265ms 280ms 23 24 6s784ms 282ms -
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-02-03 17:55:53 Duration: 606ms
-
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-02-03 16:51:03 Duration: 583ms
-
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-02-03 16:44:31 Duration: 562ms
16 274ms 571ms 292ms 1,110 5m24s select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Feb 03 00 6 1s753ms 292ms 08 6 1s692ms 282ms 11 30 8s890ms 296ms 12 27 8s135ms 301ms 14 24 7s531ms 313ms 15 108 31s703ms 293ms 16 90 28s604ms 317ms 17 135 40s55ms 296ms 18 105 31s955ms 304ms 19 129 37s593ms 291ms 20 126 35s853ms 284ms 21 108 30s386ms 281ms 22 126 35s453ms 281ms 23 90 25s162ms 279ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 16:47:03 Duration: 571ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 18:21:56 Duration: 569ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-02-03 16:53:19 Duration: 567ms
17 199ms 594ms 215ms 927 3m19s 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 #17
Day Hour Count Duration Avg duration Feb 03 06 3 650ms 216ms 08 6 1s549ms 258ms 11 21 4s491ms 213ms 12 24 6s156ms 256ms 14 9 2s919ms 324ms 15 69 14s441ms 209ms 16 93 21s89ms 226ms 17 90 21s249ms 236ms 18 75 16s93ms 214ms 19 114 24s334ms 213ms 20 90 18s494ms 205ms 21 93 18s982ms 204ms 22 117 23s845ms 203ms 23 123 25s123ms 204ms -
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-02-03 17:08:10 Duration: 594ms
-
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-02-03 16:51:25 Duration: 577ms
-
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-02-03 17:08:11 Duration: 534ms
18 120ms 329ms 181ms 178 32s354ms 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 Feb 03 08 2 269ms 134ms 09 2 261ms 130ms 12 11 2s73ms 188ms 13 60 13s22ms 217ms 14 60 10s480ms 174ms 15 30 4s426ms 147ms 16 8 1s128ms 141ms 17 5 692ms 138ms -
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-02-03 13:03:17 Duration: 329ms
-
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-02-03 13:11:17 Duration: 317ms
-
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-02-03 13:24:17 Duration: 313ms
19 130ms 209ms 154ms 255 39s425ms 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 #19
Day Hour Count Duration Avg duration Feb 03 03 26 3s710ms 142ms 06 174 27s827ms 159ms 07 28 3s842ms 137ms 23 27 4s45ms 149ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (45344)) AND (("account_move"."id" not in (1180035)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-02-03 06:13:01 Duration: 209ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (45328)) AND (("account_move"."id" not in (1182862)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-02-03 06:07:54 Duration: 204ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (45302)) AND (("account_move"."id" not in (1184141)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-02-03 06:06:55 Duration: 203ms
20 120ms 220ms 149ms 123 18s426ms 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 #20
Day Hour Count Duration Avg duration Feb 03 00 1 125ms 125ms 04 5 751ms 150ms 05 4 516ms 129ms 08 2 283ms 141ms 11 7 975ms 139ms 12 17 2s614ms 153ms 13 2 274ms 137ms 15 24 3s597ms 149ms 16 25 3s978ms 159ms 17 22 3s290ms 149ms 18 10 1s462ms 146ms 19 3 425ms 141ms 20 1 133ms 133ms -
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-02-03 17:04:49 Duration: 220ms
-
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-02-03 16:59:05 Duration: 188ms
-
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-02-03 15:34:57 Duration: 182ms
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
- 77,188 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 3164 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 1,933 Max number of times the same event was reported
- 3,164 Total events found
Rank Times reported Error 1 1,933 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #1
Day Hour Count Feb 03 00 184 01 181 03 1 06 1 07 1 08 100 09 212 10 244 11 207 12 120 13 3 14 22 16 82 17 161 18 212 19 199 20 3 - ERROR: could not serialize access due to concurrent update
Statement: DELETE FROM ir_attachment WHERE id IN ( SELECT id FROM ir_attachment WHERE id in (4964002) FOR NO KEY UPDATE SKIP LOCKED )
Date: 2024-02-03 11:51:07
2 1,206 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #2
Day Hour Count Feb 03 00 222 01 357 02 31 03 23 04 21 05 18 06 52 07 87 08 72 09 34 10 23 11 19 12 24 13 22 14 18 15 18 16 24 17 19 18 23 19 18 20 21 21 20 22 28 23 12 - 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-02-03 11:50:24
3 22 ERROR: current transaction is aborted, commands ignored until end of transaction block
Times Reported Most Frequent Error / Event #3
Day Hour Count Feb 03 00 5 01 1 08 1 09 1 10 5 11 5 17 2 18 1 19 1 - ERROR: current transaction is aborted, commands ignored until end of transaction block
Statement: SELECT "ir_ui_view".id FROM "ir_ui_view" LEFT JOIN "website" AS "ir_ui_view__website_id" ON ("ir_ui_view"."website_id" = "ir_ui_view__website_id"."id") WHERE (("ir_ui_view"."active" = true) AND (("ir_ui_view"."key" = 'http_routing.http_error') AND (("ir_ui_view"."website_id" in (1)) OR "ir_ui_view"."website_id" IS NULL))) ORDER BY "ir_ui_view__website_id"."id" LIMIT 1
Date: 2024-02-03 11:56:10
4 3 LOG: process ... still waiting for ShareLock on transaction ... after ... ms
Times Reported Most Frequent Error / Event #4
Day Hour Count Feb 03 09 2 10 1 - ERROR: process 1862180 still waiting for ShareLock on transaction 236780792 after 1000.066 ms
- ERROR: process 1862180 still waiting for ShareLock on transaction 236782313 after 1000.073 ms
- ERROR: process 1848805 still waiting for ShareLock on transaction 236787970 after 1000.074 ms
Detail: Process holding the lock: 1862179. Wait queue: 1862180.
Context: while updating tuple (1256,70) in relation "branch_product_method"
Statement: update branch_product_method set method_update_date = NOW() at time zone 'UTC',method=8 where id in (541991)Date: 2024-02-03 09:30:09
Detail: Process holding the lock: 1862179. Wait queue: 1862180.
Context: while updating tuple (1261,39) in relation "branch_product_method"
Statement: update branch_product_method set method_update_date = NOW() at time zone 'UTC',method=8 where id in (549385)Date: 2024-02-03 09:37:24
Detail: Process holding the lock: 1862179. Wait queue: 1848805.
Context: while updating tuple (1087,112) in relation "branch_product_method"
Statement: update branch_product_method set method_update_date = NOW() at time zone 'UTC',method=2 where id in (557531)Date: 2024-02-03 10:03:09