-
Global information
- Generated on Sat Dec 2 23:50:21 2023
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 146,030 log entries in 20s
- Log start from 2023-12-02 00:00:00 to 2023-12-02 23:50:00
-
Overview
Global Stats
- 274 Number of unique normalized queries
- 41,074 Number of queries
- 12h33m43s Total query duration
- 2023-12-02 00:00:00 First query
- 2023-12-02 23:50:00 Last query
- 26 queries/s at 2023-12-02 14:16:05 Query peak
- 12h33m43s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 12h33m43s Execute total duration
- 12,552 Number of events
- 3 Number of unique normalized events
- 10,934 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
- 41,074 Average queries per session
- 12h33m43s 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
- 26 queries/s Query Peak
- 2023-12-02 14:16:05 Date
SELECT Traffic
Key values
- 26 queries/s Query Peak
- 2023-12-02 14:16:05 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 5 queries/s Query Peak
- 2023-12-02 17:24:31 Date
Queries duration
Key values
- 12h33m43s 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) Dec 02 00 7,611 0ms 15s346ms 759ms 8m19s 8m55s 9m13s 01 599 0ms 17s181ms 2s177ms 59s532ms 1m 1m 02 2,233 0ms 3s729ms 839ms 53s9ms 57s590ms 1m1s 03 116 0ms 12s505ms 583ms 4s67ms 11s647ms 18s98ms 04 366 0ms 5s559ms 644ms 15s469ms 16s621ms 21s697ms 05 96 0ms 384ms 231ms 1s35ms 3s708ms 6s118ms 06 211 0ms 33s820ms 992ms 11s12ms 31s483ms 52s873ms 07 107 0ms 12s547ms 606ms 4s393ms 11s654ms 18s607ms 08 46 0ms 1s44ms 253ms 0ms 1s44ms 6s332ms 09 129 0ms 3m47s 5s325ms 52s209ms 1m26s 4m30s 10 26 0ms 332ms 203ms 0ms 139ms 2s547ms 11 20 0ms 349ms 204ms 0ms 143ms 3s396ms 12 125 0ms 596ms 307ms 794ms 6s865ms 11s881ms 13 386 0ms 982ms 289ms 9s554ms 11s775ms 15s629ms 14 2,946 0ms 1s445ms 176ms 28s677ms 32s754ms 40s402ms 15 1,318 0ms 3s340ms 173ms 14s839ms 29s648ms 42s698ms 16 3,578 0ms 14s265ms 1s122ms 1m49s 2m2s 2m25s 17 3,517 120ms 2s541ms 1s277ms 1m18s 1m21s 1m22s 18 3,089 120ms 5s491ms 1s426ms 1m16s 1m27s 1m39s 19 2,995 120ms 2s569ms 1s456ms 1m14s 1m23s 1m23s 20 2,917 120ms 2s597ms 1s488ms 1m13s 1m15s 1m27s 21 2,953 120ms 2s953ms 1s470ms 1m13s 1m14s 1m20s 22 3,142 120ms 2s508ms 1s405ms 1m14s 1m22s 1m36s 23 2,548 120ms 12s629ms 1s443ms 1m15s 1m21s 1m30s Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Dec 02 00 6,975 0 600ms 1m49s 7m23s 8m6s 01 35 0 498ms 0ms 1s202ms 2s581ms 02 2,215 0 831ms 46s608ms 53s9ms 1m 03 104 0 208ms 136ms 979ms 4s67ms 04 337 0 687ms 14s738ms 15s469ms 20s701ms 05 96 0 231ms 0ms 1s35ms 5s417ms 06 183 0 174ms 402ms 2s311ms 4s470ms 07 95 0 197ms 388ms 680ms 4s393ms 08 45 0 235ms 0ms 0ms 4s262ms 09 36 92 5s365ms 595ms 51s368ms 1m38s 10 26 0 203ms 0ms 0ms 2s459ms 11 20 0 204ms 0ms 0ms 413ms 12 125 0 307ms 0ms 794ms 10s774ms 13 382 0 289ms 3s306ms 9s554ms 12s974ms 14 2,934 0 172ms 21s598ms 28s482ms 37s279ms 15 1,316 0 171ms 1s832ms 14s839ms 38s831ms 16 2,619 0 708ms 47s772ms 1m1s 1m11s 17 2,064 0 643ms 24s191ms 25s122ms 29s557ms 18 1,647 0 759ms 20s154ms 24s687ms 36s639ms 19 1,569 0 776ms 19s898ms 21s791ms 30s162ms 20 1,491 0 798ms 19s874ms 20s472ms 21s692ms 21 1,526 0 778ms 20s125ms 20s439ms 21s161ms 22 1,717 0 731ms 20s623ms 21s308ms 34s578ms 23 1,349 0 746ms 20s457ms 21s344ms 23s208ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Dec 02 00 0 619 0 0 2s458ms 41s6ms 58s183ms 1m 01 0 560 0 0 2s202ms 15s192ms 59s65ms 1m 02 0 12 0 0 2s260ms 0ms 0ms 0ms 03 0 0 12 0 3s837ms 0ms 0ms 11s519ms 04 0 4 0 0 287ms 0ms 0ms 232ms 05 0 0 0 0 0ms 0ms 0ms 0ms 06 0 0 28 0 6s335ms 0ms 0ms 27s761ms 07 0 0 12 0 3s840ms 0ms 0ms 11s317ms 08 0 1 0 0 1s44ms 0ms 0ms 0ms 09 1 0 0 0 125ms 0ms 0ms 0ms 10 0 0 0 0 0ms 0ms 0ms 0ms 11 0 0 0 0 0ms 0ms 0ms 0ms 12 0 0 0 0 0ms 0ms 0ms 0ms 13 0 4 0 0 286ms 0ms 0ms 0ms 14 0 1 11 0 1s199ms 0ms 0ms 1s398ms 15 0 0 2 0 1s252ms 0ms 0ms 0ms 16 0 954 2 0 2s258ms 52s973ms 53s409ms 54s208ms 17 2 1,443 7 0 2s180ms 53s328ms 53s658ms 54s636ms 18 0 1,426 0 0 2s211ms 53s331ms 53s512ms 53s898ms 19 0 1,426 0 0 2s205ms 53s220ms 53s537ms 53s907ms 20 0 1,426 0 0 2s209ms 53s191ms 53s481ms 54s110ms 21 0 1,427 0 0 2s209ms 53s251ms 53s568ms 53s952ms 22 0 1,425 0 0 2s217ms 53s514ms 53s731ms 54s137ms 23 0 1,191 8 0 2s227ms 53s402ms 53s596ms 53s899ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Dec 02 00 0 0 0.00 0.00% 01 0 0 0.00 0.00% 02 0 0 0.00 0.00% 03 0 0 0.00 0.00% 04 0 0 0.00 0.00% 05 0 0 0.00 0.00% 06 0 0 0.00 0.00% 07 0 0 0.00 0.00% 08 0 0 0.00 0.00% 09 0 0 0.00 0.00% 10 0 0 0.00 0.00% 11 0 0 0.00 0.00% 12 0 0 0.00 0.00% 13 0 0 0.00 0.00% 14 0 0 0.00 0.00% 15 0 0 0.00 0.00% 16 0 0 0.00 0.00% 17 0 0 0.00 0.00% 18 0 0 0.00 0.00% 19 0 0 0.00 0.00% 20 0 0 0.00 0.00% 21 0 0 0.00 0.00% 22 0 0 0.00 0.00% 23 0 0 0.00 0.00% Day Hour Count Average / Second Dec 02 00 0 0.00/s 01 0 0.00/s 02 0 0.00/s 03 0 0.00/s 04 0 0.00/s 05 0 0.00/s 06 0 0.00/s 07 0 0.00/s 08 0 0.00/s 09 0 0.00/s 10 0 0.00/s 11 0 0.00/s 12 0 0.00/s 13 0 0.00/s 14 0 0.00/s 15 0 0.00/s 16 0 0.00/s 17 0 0.00/s 18 0 0.00/s 19 0 0.00/s 20 0 0.00/s 21 0 0.00/s 22 0 0.00/s 23 0 0.00/s Day Hour Count Average Duration Average idle time Dec 02 00 0 0ms 0ms 01 0 0ms 0ms 02 0 0ms 0ms 03 0 0ms 0ms 04 0 0ms 0ms 05 0 0ms 0ms 06 0 0ms 0ms 07 0 0ms 0ms 08 0 0ms 0ms 09 0 0ms 0ms 10 0 0ms 0ms 11 0 0ms 0ms 12 0 0ms 0ms 13 0 0ms 0ms 14 0 0ms 0ms 15 0 0ms 0ms 16 0 0ms 0ms 17 0 0ms 0ms 18 0 0ms 0ms 19 0 0ms 0ms 20 0 0ms 0ms 21 0 0ms 0ms 22 0 0ms 0ms 23 0 0ms 0ms -
Connections
Established Connections
Key values
- 0 connections Connection Peak
- Date
Connections per database
Key values
- unknown Main Database
- 0 connections Total
Connections per user
Key values
- unknown Main User
- 0 connections Total
-
Sessions
Simultaneous sessions
Key values
- 0 sessions Session Peak
- Date
Histogram of session times
Key values
- duration
Sessions per database
Key values
- unknown Main Database
- 0 sessions Total
Sessions per user
Key values
- unknown Main User
- 0 sessions Total
Sessions per host
Key values
- unknown Main Host
- 0 sessions Total
-
Checkpoints / Restartpoints
Checkpoints Buffers
Key values
- 0 buffers Checkpoint Peak
- Date
- seconds Highest write time
- seconds Sync time
Checkpoint write buffers (5 minutes period)
NO DATASET
Checkpoints Wal files
Key values
- 0 files Wal files usage Peak
- Date
Checkpoint Wal files usage (5 minutes period)
NO DATASET
Checkpoints distance
Key values
- 0 Mo Distance Peak
- Date
Checkpoints Activity
Day Hour Written buffers Write time Sync time Total time Dec 02 00 0 0s 0s 0s 01 0 0s 0s 0s 02 0 0s 0s 0s 03 0 0s 0s 0s 04 0 0s 0s 0s 05 0 0s 0s 0s 06 0 0s 0s 0s 07 0 0s 0s 0s 08 0 0s 0s 0s 09 0 0s 0s 0s 10 0 0s 0s 0s 11 0 0s 0s 0s 12 0 0s 0s 0s 13 0 0s 0s 0s 14 0 0s 0s 0s 15 0 0s 0s 0s 16 0 0s 0s 0s 17 0 0s 0s 0s 18 0 0s 0s 0s 19 0 0s 0s 0s 20 0 0s 0s 0s 21 0 0s 0s 0s 22 0 0s 0s 0s 23 0 0s 0s 0s Day Hour Added Removed Recycled Synced files Longest sync Average sync Dec 02 00 0 0 0 0 0s 0s 01 0 0 0 0 0s 0s 02 0 0 0 0 0s 0s 03 0 0 0 0 0s 0s 04 0 0 0 0 0s 0s 05 0 0 0 0 0s 0s 06 0 0 0 0 0s 0s 07 0 0 0 0 0s 0s 08 0 0 0 0 0s 0s 09 0 0 0 0 0s 0s 10 0 0 0 0 0s 0s 11 0 0 0 0 0s 0s 12 0 0 0 0 0s 0s 13 0 0 0 0 0s 0s 14 0 0 0 0 0s 0s 15 0 0 0 0 0s 0s 16 0 0 0 0 0s 0s 17 0 0 0 0 0s 0s 18 0 0 0 0 0s 0s 19 0 0 0 0 0s 0s 20 0 0 0 0 0s 0s 21 0 0 0 0 0s 0s 22 0 0 0 0 0s 0s 23 0 0 0 0 0s 0s Day Hour Count Avg time (sec) Dec 02 00 0 0s 01 0 0s 02 0 0s 03 0 0s 04 0 0s 05 0 0s 06 0 0s 07 0 0s 08 0 0s 09 0 0s 10 0 0s 11 0 0s 12 0 0s 13 0 0s 14 0 0s 15 0 0s 16 0 0s 17 0 0s 18 0 0s 19 0 0s 20 0 0s 21 0 0s 22 0 0s 23 0 0s Day Hour Mean distance Mean estimate Dec 02 00 0.00 kB 0.00 kB 01 0.00 kB 0.00 kB 02 0.00 kB 0.00 kB 03 0.00 kB 0.00 kB 04 0.00 kB 0.00 kB 05 0.00 kB 0.00 kB 06 0.00 kB 0.00 kB 07 0.00 kB 0.00 kB 08 0.00 kB 0.00 kB 09 0.00 kB 0.00 kB 10 0.00 kB 0.00 kB 11 0.00 kB 0.00 kB 12 0.00 kB 0.00 kB 13 0.00 kB 0.00 kB 14 0.00 kB 0.00 kB 15 0.00 kB 0.00 kB 16 0.00 kB 0.00 kB 17 0.00 kB 0.00 kB 18 0.00 kB 0.00 kB 19 0.00 kB 0.00 kB 20 0.00 kB 0.00 kB 21 0.00 kB 0.00 kB 22 0.00 kB 0.00 kB 23 0.00 kB 0.00 kB -
Temporary Files
Size of temporary files
Key values
- 0 Temp Files size Peak
- Date
Size of temporary files (5 minutes period)
NO DATASET
Number of temporary files
Key values
- 0 per second Temp Files Peak
- Date
Number of temporary files (5 minutes period)
NO DATASET
Temporary Files Activity
Day Hour Count Total size Average size Dec 02 00 0 0 0 01 0 0 0 02 0 0 0 03 0 0 0 04 0 0 0 05 0 0 0 06 0 0 0 07 0 0 0 08 0 0 0 09 0 0 0 10 0 0 0 11 0 0 0 12 0 0 0 13 0 0 0 14 0 0 0 15 0 0 0 16 0 0 0 17 0 0 0 18 0 0 0 19 0 0 0 20 0 0 0 21 0 0 0 22 0 0 0 23 0 0 0 -
Vacuums
Vacuums / Analyzes Distribution
Key values
- 0 sec Highest CPU-cost vacuum
Table
Database - Date
- 0 sec Highest CPU-cost analyze
Table
Database - Date
Autovacuum actions (5 minutes period)
NO DATASET
Analyzes per table
Key values
- unknown (0) Main table analyzed (database )
- 0 analyzes Total
Vacuums per table
Key values
- unknown (0) Main table vacuumed on database
- 0 vacuums Total
Tuples removed per table
Key values
- unknown (0) Main table with removed tuples on database
- 0 tuples Total removed
Pages removed per table
Key values
- unknown (0) Main table with removed pages on database unknown
- 0 pages Total removed
Autovacuum Activity
Day Hour VACUUMs ANALYZEs Dec 02 00 0 0 01 0 0 02 0 0 03 0 0 04 0 0 05 0 0 06 0 0 07 0 0 08 0 0 09 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 - 0 sec Highest CPU-cost vacuum
-
Locks
Locks by types
Key values
- unknown Main Lock Type
- 0 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query NO DATASET
Queries that waited the most
Rank Wait time Query NO DATASET
-
Queries
Queries by type
Key values
- 28,906 Total read queries
- 12,168 Total write queries
Queries by database
Key values
- unknown Main database
- 41,074 Requests
- 12h33m43s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 45,318 Requests
User Request type Count Duration unknown Total 45,318 13h56m18s copy to 92 11m19s cte 81 2m14s delete 88 6m48s insert 3 561ms select 33,097 6h11m35s update 11,957 7h24m19s Duration by user
Key values
- 13h56m18s (unknown) Main time consuming user
User Request type Count Duration unknown Total 45,318 13h56m18s copy to 92 11m19s cte 81 2m14s delete 88 6m48s insert 3 561ms select 33,097 6h11m35s update 11,957 7h24m19s Queries by host
Key values
- unknown Main host
- 45,318 Requests
- 13h56m18s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 41,074 Requests
- 12h33m43s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2023-12-02 18:37:37 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 14,508 500-1000ms duration
Slowest individual queries
Rank Duration Query 1 3m47s 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: 2023-12-02 09:08:13 ]
2 1m33s 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: 2023-12-02 09:02:53 ]
3 1m25s 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: 2023-12-02 09:04:25 ]
4 51s368ms 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: 2023-12-02 09:11:27 ]
5 33s820ms DELETE FROM account_move_line WHERE id IN (3702577, 3702578, 3702579, 3702580, 3702581, 3702582, 3702583, 3702584, 3702585, 3702586, 3702587, 3702588, 3702589, 3702590, 3702591, 3702592, 3702593, 3702594, 3702595, 3702596, 3702597, 3702598, 3702599, 3702600, 3702601, 3717575, 3717576);[ Date: 2023-12-02 06:08:47 ]
6 33s98ms COPY public.website_track (id, visitor_id, page_id, url, visit_datetime, product_id) TO stdout;[ Date: 2023-12-02 09:10:36 ]
7 22s951ms 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) TO stdout;[ Date: 2023-12-02 09:00:37 ]
8 19s988ms 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) TO stdout;[ Date: 2023-12-02 09:09:33 ]
9 17s535ms DELETE FROM account_move_line WHERE id IN (3691814, 3691815, 3691816, 3691817, 3691818, 3691819, 3691820, 3691821, 3691822, 3691823, 3691824, 3691825, 3709842, 3709843);[ Date: 2023-12-02 06:07:09 ]
10 17s181ms with data as ( select distinct shl.id as record, 3808, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430) UNION ALL ( select distinct sol.id as record, 3808, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430)) UNION ALL ( select distinct sm.id as record, 3808, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430))) 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 3808, 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: 2023-12-02 01:05:37 ]
11 15s346ms with data as ( select distinct shl.id as record, 3801, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485) UNION ALL ( select distinct sol.id as record, 3801, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485)) UNION ALL ( select distinct sm.id as record, 3801, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485))) 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 3801, 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: 2023-12-02 00:30:26 ]
12 15s154ms DELETE FROM account_move_line WHERE id IN (3712915, 3712916, 3712917, 3712918, 3712919, 3712920, 3712921, 3712910, 3712911, 3712912, 3712913, 3712914);[ Date: 2023-12-02 06:00:52 ]
13 15s46ms DELETE FROM account_move_line WHERE id IN (3703268, 3703269, 3703270, 3703271, 3703272, 3703273, 3703274, 3703275, 3703276, 3703277, 3718104, 3718105);[ Date: 2023-12-02 06:06:44 ]
14 14s758ms with data as ( select distinct shl.id as record, 3810, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393) UNION ALL ( select distinct sol.id as record, 3810, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393)) UNION ALL ( select distinct sm.id as record, 3810, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3810, 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: 2023-12-02 01:27:55 ]
15 14s444ms with data as ( select distinct shl.id as record, 3809, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (173349, 173241, 209178, 209234, 209273, 209299, 209174, 209200, 209192, 209472, 209494, 209495, 209566, 209573, 209362, 209565, 209372, 209239, 209506, 209480, 209436, 209320, 209380, 209514, 209571, 209242, 209433, 209334, 209173, 209524, 209236, 209342, 209346, 209172, 209185, 209197, 209485, 209487, 209493, 209507, 209509, 209491, 209258, 209335, 197276, 202387, 209328, 209330, 209238, 209244, 209317, 209214, 209473, 209501, 209554, 245930, 209247, 209280, 209209, 209393, 209451, 209464, 209515, 209560, 209424, 209378, 209230, 209303, 209439, 209570, 209528, 209211, 209384, 209366, 209447, 209496, 209502, 209525, 209382, 253493, 209246, 197248, 204352, 190635, 209324, 209251, 209262, 209184, 209252, 209257, 209212, 209340, 209359, 209555, 209361, 209367, 209389, 209391, 209437, 209474, 209483, 209556, 209558, 209572, 209457, 209245, 209263, 209266, 209286, 209302, 209310, 209311, 209343, 209347, 209175, 209191, 209196, 209403, 209442, 209446, 209492, 209505, 209511, 209545, 209198, 209216, 209546, 209567, 209568, 209221, 209229, 209306, 209313, 209321, 209338, 209430, 209438, 209516, 209527, 209529, 209488, 209332, 209466, 209518, 209227, 209352, 209356, 209521, 209561, 180735, 209562, 209503, 209256, 209261, 209267, 209272, 209281, 209282, 209318, 209344, 209189, 209182, 209190, 209176, 209202, 209203, 209421, 209470, 209471, 209479, 209482, 209537, 209519, 209517, 209180, 209305, 197240, 228221, 209225, 209226, 209231, 209268, 209269, 209329, 209339, 209199, 209201, 209219, 209357, 209370, 209390, 209392, 209413, 209414, 209415, 209418, 209559, 209233, 209235, 209241, 209284, 209307, 209309, 209181, 209195, 209179, 209183, 209177, 209186, 209220, 209396, 209422, 209440, 209441, 209459, 209484, 209512, 209250, 209319, 209326, 209327, 209331, 238907, 209264, 209469, 209253, 209254, 209427, 209276, 209210, 209260, 209277, 209278, 209279, 209423, 209460, 209468, 209520, 209563, 209271, 209308, 209312, 209323, 209333, 209360, 209416, 209497, 209255, 209354, 209379, 209513, 209526, 209569, 209316, 209452, 209325, 209398, 209538, 209228, 209232, 209259, 209265, 209270, 209314, 209315, 209322, 209193, 209194, 209207, 209358, 209365, 209374, 209434, 209435, 203802, 190639, 209298, 209188, 209187, 209243, 209425, 209510, 209456, 209462, 209412, 209304, 209345, 209381, 209475, 209206) UNION ALL ( select distinct sol.id as record, 3809, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (173349, 173241, 209178, 209234, 209273, 209299, 209174, 209200, 209192, 209472, 209494, 209495, 209566, 209573, 209362, 209565, 209372, 209239, 209506, 209480, 209436, 209320, 209380, 209514, 209571, 209242, 209433, 209334, 209173, 209524, 209236, 209342, 209346, 209172, 209185, 209197, 209485, 209487, 209493, 209507, 209509, 209491, 209258, 209335, 197276, 202387, 209328, 209330, 209238, 209244, 209317, 209214, 209473, 209501, 209554, 245930, 209247, 209280, 209209, 209393, 209451, 209464, 209515, 209560, 209424, 209378, 209230, 209303, 209439, 209570, 209528, 209211, 209384, 209366, 209447, 209496, 209502, 209525, 209382, 253493, 209246, 197248, 204352, 190635, 209324, 209251, 209262, 209184, 209252, 209257, 209212, 209340, 209359, 209555, 209361, 209367, 209389, 209391, 209437, 209474, 209483, 209556, 209558, 209572, 209457, 209245, 209263, 209266, 209286, 209302, 209310, 209311, 209343, 209347, 209175, 209191, 209196, 209403, 209442, 209446, 209492, 209505, 209511, 209545, 209198, 209216, 209546, 209567, 209568, 209221, 209229, 209306, 209313, 209321, 209338, 209430, 209438, 209516, 209527, 209529, 209488, 209332, 209466, 209518, 209227, 209352, 209356, 209521, 209561, 180735, 209562, 209503, 209256, 209261, 209267, 209272, 209281, 209282, 209318, 209344, 209189, 209182, 209190, 209176, 209202, 209203, 209421, 209470, 209471, 209479, 209482, 209537, 209519, 209517, 209180, 209305, 197240, 228221, 209225, 209226, 209231, 209268, 209269, 209329, 209339, 209199, 209201, 209219, 209357, 209370, 209390, 209392, 209413, 209414, 209415, 209418, 209559, 209233, 209235, 209241, 209284, 209307, 209309, 209181, 209195, 209179, 209183, 209177, 209186, 209220, 209396, 209422, 209440, 209441, 209459, 209484, 209512, 209250, 209319, 209326, 209327, 209331, 238907, 209264, 209469, 209253, 209254, 209427, 209276, 209210, 209260, 209277, 209278, 209279, 209423, 209460, 209468, 209520, 209563, 209271, 209308, 209312, 209323, 209333, 209360, 209416, 209497, 209255, 209354, 209379, 209513, 209526, 209569, 209316, 209452, 209325, 209398, 209538, 209228, 209232, 209259, 209265, 209270, 209314, 209315, 209322, 209193, 209194, 209207, 209358, 209365, 209374, 209434, 209435, 203802, 190639, 209298, 209188, 209187, 209243, 209425, 209510, 209456, 209462, 209412, 209304, 209345, 209381, 209475, 209206)) UNION ALL ( select distinct sm.id as record, 3809, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (173349, 173241, 209178, 209234, 209273, 209299, 209174, 209200, 209192, 209472, 209494, 209495, 209566, 209573, 209362, 209565, 209372, 209239, 209506, 209480, 209436, 209320, 209380, 209514, 209571, 209242, 209433, 209334, 209173, 209524, 209236, 209342, 209346, 209172, 209185, 209197, 209485, 209487, 209493, 209507, 209509, 209491, 209258, 209335, 197276, 202387, 209328, 209330, 209238, 209244, 209317, 209214, 209473, 209501, 209554, 245930, 209247, 209280, 209209, 209393, 209451, 209464, 209515, 209560, 209424, 209378, 209230, 209303, 209439, 209570, 209528, 209211, 209384, 209366, 209447, 209496, 209502, 209525, 209382, 253493, 209246, 197248, 204352, 190635, 209324, 209251, 209262, 209184, 209252, 209257, 209212, 209340, 209359, 209555, 209361, 209367, 209389, 209391, 209437, 209474, 209483, 209556, 209558, 209572, 209457, 209245, 209263, 209266, 209286, 209302, 209310, 209311, 209343, 209347, 209175, 209191, 209196, 209403, 209442, 209446, 209492, 209505, 209511, 209545, 209198, 209216, 209546, 209567, 209568, 209221, 209229, 209306, 209313, 209321, 209338, 209430, 209438, 209516, 209527, 209529, 209488, 209332, 209466, 209518, 209227, 209352, 209356, 209521, 209561, 180735, 209562, 209503, 209256, 209261, 209267, 209272, 209281, 209282, 209318, 209344, 209189, 209182, 209190, 209176, 209202, 209203, 209421, 209470, 209471, 209479, 209482, 209537, 209519, 209517, 209180, 209305, 197240, 228221, 209225, 209226, 209231, 209268, 209269, 209329, 209339, 209199, 209201, 209219, 209357, 209370, 209390, 209392, 209413, 209414, 209415, 209418, 209559, 209233, 209235, 209241, 209284, 209307, 209309, 209181, 209195, 209179, 209183, 209177, 209186, 209220, 209396, 209422, 209440, 209441, 209459, 209484, 209512, 209250, 209319, 209326, 209327, 209331, 238907, 209264, 209469, 209253, 209254, 209427, 209276, 209210, 209260, 209277, 209278, 209279, 209423, 209460, 209468, 209520, 209563, 209271, 209308, 209312, 209323, 209333, 209360, 209416, 209497, 209255, 209354, 209379, 209513, 209526, 209569, 209316, 209452, 209325, 209398, 209538, 209228, 209232, 209259, 209265, 209270, 209314, 209315, 209322, 209193, 209194, 209207, 209358, 209365, 209374, 209434, 209435, 203802, 190639, 209298, 209188, 209187, 209243, 209425, 209510, 209456, 209462, 209412, 209304, 209345, 209381, 209475, 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 3809, 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: 2023-12-02 01:15:50 ]
16 14s265ms SELECT min("account_move_line".id) AS id, count("account_move_line".id) AS "account_id_count", min("account_move_line"."date") AS "date", sum("account_move_line"."debit") AS "debit", sum("account_move_line"."credit") AS "credit", sum("account_move_line"."balance") AS "balance", sum("account_move_line"."amount_currency") AS "amount_currency", "account_move_line"."account_id" as "account_id" FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN "account_account" AS "account_move_line__account_id" ON ("account_move_line"."account_id" = "account_move_line__account_id"."id") LEFT JOIN "res_company" AS "account_move_line__account_id__company_id" ON ("account_move_line__account_id"."company_id" = "account_move_line__account_id__company_id"."id") WHERE ((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line"."parent_state" = 'posted') AND (((unaccent ("account_move_line__move_id"."name"::text) ilike unaccent ('%X-BILL-05984%')) OR (unaccent ("account_move_line__move_id"."ref"::text) ilike unaccent ('%X-BILL-05984%'))) OR FALSE))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY "account_move_line"."account_id", COALESCE("account_move_line__account_id"."is_off_balance", false), "account_move_line__account_id"."code", "account_move_line__account_id__company_id"."sequence", "account_move_line__account_id__company_id"."name" ORDER BY COALESCE("account_move_line__account_id"."is_off_balance", false), "account_move_line__account_id"."code", "account_move_line__account_id__company_id"."sequence", "account_move_line__account_id__company_id"."name" LIMIT 80;[ Date: 2023-12-02 16:42:22 ]
17 14s201ms COPY public.base_import_import (id, res_model, file, file_name, file_type, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2023-12-02 09:00:58 ]
18 13s831ms SELECT min("account_move_line".id) AS id, count("account_move_line".id) AS "account_root_id_count", "account_move_line"."account_root_id" as "account_root_id" FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") LEFT JOIN "account_root" AS "account_move_line__account_root_id" ON ("account_move_line"."account_root_id" = "account_move_line__account_root_id"."id") WHERE (((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line"."parent_state" = 'posted') AND (((unaccent ("account_move_line__move_id"."name"::text) ilike unaccent ('%X-BILL-05984%')) OR (unaccent ("account_move_line__move_id"."ref"::text) ilike unaccent ('%X-BILL-05984%'))) OR FALSE))) AND "account_move_line"."account_root_id" IS NOT NULL) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY "account_move_line"."account_root_id", "account_move_line__account_root_id"."id" ORDER BY "account_move_line__account_root_id"."id";[ Date: 2023-12-02 16:42:08 ]
19 12s629ms DELETE FROM account_move_line WHERE id IN (3720821, 3720822, 3720823, 3720824, 3720825, 3720826, 3720827, 3720828, 3720829, 3720830);[ Date: 2023-12-02 23:12:31 ]
20 12s547ms DELETE FROM account_move_line WHERE id IN (3720652, 3720653, 3720654, 3720655, 3720656, 3720657, 3720658, 3720659, 3720660, 3720661);[ Date: 2023-12-02 07:12:22 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 6h42m1s 10,719 2s133ms 5s696ms 2s250ms 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 #1
Day Hour Count Duration Avg duration Dec 02 00 109 7m3s 3s889ms 16 948 35m57s 2s276ms 17 1,413 52m34s 2s232ms 18 1,412 52m31s 2s231ms 19 1,414 52m23s 2s223ms 20 1,414 52m29s 2s227ms 21 1,415 52m31s 2s227ms 22 1,413 52m37s 2s234ms 23 1,181 43m51s 2s228ms -
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 = 210004 and item_demand_plan_id = 3799;
Date: 2023-12-02 00:02:39 Duration: 5s696ms
-
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 = 210023 and item_demand_plan_id = 3792;
Date: 2023-12-02 00:05:08 Duration: 5s567ms
-
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 = 210093 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:04:10 Duration: 5s486ms
2 3h5m25s 12,687 788ms 6s93ms 876ms 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 #2
Day Hour Count Duration Avg duration Dec 02 00 492 15m37s 1s905ms 02 1,009 15m1s 893ms 04 242 3m18s 818ms 16 1,254 18m4s 864ms 17 1,413 19m25s 824ms 18 1,439 19m50s 826ms 19 1,415 19m28s 825ms 20 1,414 19m30s 827ms 21 1,416 19m28s 825ms 22 1,412 19m27s 827ms 23 1,181 16m13s 824ms -
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 = 209982 and item_demand_plan_id = 3792 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: 2023-12-02 00:02:29 Duration: 6s93ms
-
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 = 210094 and item_demand_plan_id = 3795 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: 2023-12-02 00:03:52 Duration: 5s818ms
-
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 = 210011 and item_demand_plan_id = 3792 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: 2023-12-02 00:04:40 Duration: 5s728ms
3 39m18s 1,080 2s110ms 2s391ms 2s183ms 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 #3
Day Hour Count Duration Avg duration Dec 02 00 508 18m17s 2s160ms 01 560 20m33s 2s202ms 02 12 27s129ms 2s260ms -
update item_list_line set product_id = 172999, supercede_product_id = 172992, superceded = True where product_id = 172992 and item_demand_plan_id = 3810;
Date: 2023-12-02 01:40:01 Duration: 2s391ms
-
update item_list_line set product_id = 251688, supercede_product_id = 206029, superceded = True where product_id = 206029 and item_demand_plan_id = 3804;
Date: 2023-12-02 00:49:26 Duration: 2s346ms
-
update item_list_line set product_id = 226040, supercede_product_id = 242275, superceded = True where product_id = 242275 and item_demand_plan_id = 3811;
Date: 2023-12-02 02:00:09 Duration: 2s330ms
4 26m29s 1,621 743ms 5s587ms 980ms select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Dec 02 00 127 5m22s 2s540ms 02 1,036 14m42s 852ms 16 458 6m23s 837ms -
select id from item_list_line where product_id = 210040 and item_demand_plan_id = 3792;
Date: 2023-12-02 00:04:16 Duration: 5s587ms
-
select id from item_list_line where product_id = 209912 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:01:17 Duration: 5s407ms
-
select id from item_list_line where product_id = 209965 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:03:00 Duration: 5s404ms
5 12m38s 284 1s9ms 8s996ms 2s669ms select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Dec 02 00 284 12m38s 2s669ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209375)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3796)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:02:42 Duration: 8s996ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209857)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3798)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:04:16 Duration: 8s725ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209609)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3798)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:02:42 Duration: 8s613ms
6 11m49s 1,622 305ms 987ms 437ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ((("product_warehouse_inventory"."inventory_vendor_id" = ?) and ("product_warehouse_inventory"."product_id" = ?)) and ((("product_warehouse_inventory"."is_active" = true) and (("product_warehouse_inventory"."has_core" = true) or (("product_warehouse_inventory"."has_core" is null or "product_warehouse_inventory"."has_core" = false) and ("product_warehouse_inventory"."is_core" is null or "product_warehouse_inventory"."is_core" = false)))) and ("product_warehouse_inventory"."branch_id" in ( select "res_branch".id from "res_branch" where (unaccent ("res_branch"."name"::text) ilike unaccent (?)) and true)))) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Dec 02 00 1,622 11m49s 437ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3103) AND ("product_warehouse_inventory"."product_id" = 192721)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:05:03 Duration: 987ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3098) AND ("product_warehouse_inventory"."product_id" = 189106)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:00:55 Duration: 979ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3098) AND ("product_warehouse_inventory"."product_id" = 188494)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:01:13 Duration: 926ms
7 11m34s 1,780 295ms 1s162ms 390ms select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Dec 02 00 708 5m52s 497ms 12 99 31s365ms 316ms 13 301 1m32s 308ms 14 155 47s377ms 305ms 15 41 12s573ms 306ms 16 179 1m 340ms 17 132 42s306ms 320ms 18 107 35s250ms 329ms 19 46 15s636ms 339ms 20 12 3s723ms 310ms -
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: 2023-12-02 00:02:25 Duration: 1s162ms
-
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: 2023-12-02 00:03:49 Duration: 1s140ms
-
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: 2023-12-02 00:02:34 Duration: 1s108ms
8 9m18s 3,986 129ms 257ms 140ms 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)) and exists ( select ? from "product_public_category_product_template_rel" AS "product_template__public_categ_ids" where "product_template__public_categ_ids"."product_template_id" = "product_template".id and "product_template__public_categ_ids"."product_public_category_id" in (...)))) order by coalesce("product_template"."is_published", false) desc, "product_template"."website_sequence" asc, "product_template"."id" desc;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Dec 02 00 3 729ms 243ms 01 3 421ms 140ms 02 6 817ms 136ms 04 3 408ms 136ms 05 12 1s658ms 138ms 06 9 1s269ms 141ms 07 12 1s642ms 136ms 09 9 1s238ms 137ms 11 3 413ms 137ms 13 30 4s156ms 138ms 14 2,624 6m7s 139ms 15 1,125 2m37s 139ms 16 48 6s946ms 144ms 17 42 6s107ms 145ms 18 39 5s606ms 143ms 20 3 435ms 145ms 21 9 1s243ms 138ms 22 3 419ms 139ms 23 3 438ms 146ms -
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)) AND EXISTS ( SELECT 1 FROM "product_public_category_product_template_rel" AS "product_template__public_categ_ids" WHERE "product_template__public_categ_ids"."product_template_id" = "product_template".id AND "product_template__public_categ_ids"."product_public_category_id" IN (12382, 12625, 12626, 12627, 12628, 12629, 12630, 12631, 12632, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12640, 12641, 12642, 12643, 12645, 12646, 12647, 12648, 12649, 12651, 12652, 12655, 12656, 12657, 12658, 12659, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 12672, 12673, 12674, 12676, 12677, 12678, 12680, 12681, 12682, 12684, 12686, 12687, 12688, 12689, 12690, 12692, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701, 12702, 12703, 12704, 12705, 12706, 12707, 12708, 12709, 12710, 12711, 12712, 12714, 12715, 12716, 12717, 12718, 12719, 12720, 12721, 12722, 12723, 12724, 12725, 12726, 12728, 12730, 12731, 12732, 12734, 12735, 12736, 12748, 12750, 12751, 12752, 12753, 12754, 12755, 12756, 12757, 12758, 12759, 12761, 12762, 12764, 12765, 12766, 12767, 12768, 12769, 12770, 12771, 12772, 12773, 12774, 12775, 12776, 12778, 12779, 12780, 12781, 12782, 12783, 12784, 12785, 12786, 12787, 12788, 12789, 12790, 12791, 12792, 12793, 12795, 12796, 12797, 12799, 12800, 12801, 12802, 12804, 12806, 12807, 12808, 12810, 12811, 12812, 12813, 12814, 12815, 12816, 12817, 12819, 12820, 12821, 12822, 12823, 12824, 12825, 12826, 12827, 12828, 12830, 12831, 12832, 12833, 12834, 12835, 12836, 12838, 12839, 12840, 12842, 12843, 12844, 12846, 12847, 12848, 12850, 12851, 12852, 12853, 12854, 12856, 12857, 12858, 12859, 12860, 12861, 12862, 12863, 12865, 12866, 13835, 13836, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13844, 13845, 13846, 13847, 13848, 13849, 13850, 13851, 13852, 13853, 13854, 13855, 13856, 13857, 13858, 13859, 13860, 13862, 13863, 13864, 13865, 13866, 13867, 13868, 13869, 13870, 13871, 13872, 13874, 13875, 13876, 13877, 13878, 13879, 13880, 13881, 13882, 13883, 13884, 13885, 13886, 13889, 13890, 13891, 13892, 13893, 13894, 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962, 13963, 13964, 13965, 13967, 13968, 13969, 13971, 13972, 13973, 13974, 13975, 13976, 13978, 13979, 13980, 13981, 13982, 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14058, 14059, 14061, 14062, 14063, 14065, 14066, 14068, 14069, 14070, 14071, 14072, 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, 14108, 14109, 14111, 14112, 14113, 14114, 14115, 14116, 14117, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, 14138, 14139, 14140, 14142, 14143, 14144, 14145, 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14172, 14173, 14174, 14175, 14176, 14178, 14179, 14180, 14181, 14182, 14185, 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14264, 14265, 14267, 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277, 14278, 14279, 14280, 14281, 14282, 14283, 14285, 14286, 14287, 14288, 14289, 14290, 14291, 14292, 14294, 14295, 14296, 14297, 14299, 14300, 14301, 14302, 14303, 14304, 14305, 14306, 14307, 14308, 14309, 14310, 14311, 14312, 14313, 14314, 14316, 14317, 14318, 14320, 14321, 14322, 14323, 14324, 14325, 14326, 14327, 14328, 14329, 14332, 14335, 14336, 14345, 14346, 14347, 14348, 14353, 14354, 14355, 14356, 14357, 14358, 14359, 14360, 14361, 14362, 14363, 14364, 14365, 14366, 14367, 14368, 14369, 14370, 14371, 14372, 14373, 14374, 14375, 14376, 14377, 14378, 14379, 14380, 14381, 14382, 14383, 14384, 14385, 14386, 14387, 14388, 14389, 14390, 14391, 14392, 14393, 14394, 14395, 14396, 14397, 14398)))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2023-12-02 00:07:30 Duration: 257ms
-
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)) AND EXISTS ( SELECT 1 FROM "product_public_category_product_template_rel" AS "product_template__public_categ_ids" WHERE "product_template__public_categ_ids"."product_template_id" = "product_template".id AND "product_template__public_categ_ids"."product_public_category_id" IN (12382, 12625, 12626, 12627, 12628, 12629, 12630, 12631, 12632, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12640, 12641, 12642, 12643, 12645, 12646, 12647, 12648, 12649, 12651, 12652, 12655, 12656, 12657, 12658, 12659, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 12672, 12673, 12674, 12676, 12677, 12678, 12680, 12681, 12682, 12684, 12686, 12687, 12688, 12689, 12690, 12692, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701, 12702, 12703, 12704, 12705, 12706, 12707, 12708, 12709, 12710, 12711, 12712, 12714, 12715, 12716, 12717, 12718, 12719, 12720, 12721, 12722, 12723, 12724, 12725, 12726, 12728, 12730, 12731, 12732, 12734, 12735, 12736, 12748, 12750, 12751, 12752, 12753, 12754, 12755, 12756, 12757, 12758, 12759, 12761, 12762, 12764, 12765, 12766, 12767, 12768, 12769, 12770, 12771, 12772, 12773, 12774, 12775, 12776, 12778, 12779, 12780, 12781, 12782, 12783, 12784, 12785, 12786, 12787, 12788, 12789, 12790, 12791, 12792, 12793, 12795, 12796, 12797, 12799, 12800, 12801, 12802, 12804, 12806, 12807, 12808, 12810, 12811, 12812, 12813, 12814, 12815, 12816, 12817, 12819, 12820, 12821, 12822, 12823, 12824, 12825, 12826, 12827, 12828, 12830, 12831, 12832, 12833, 12834, 12835, 12836, 12838, 12839, 12840, 12842, 12843, 12844, 12846, 12847, 12848, 12850, 12851, 12852, 12853, 12854, 12856, 12857, 12858, 12859, 12860, 12861, 12862, 12863, 12865, 12866, 13835, 13836, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13844, 13845, 13846, 13847, 13848, 13849, 13850, 13851, 13852, 13853, 13854, 13855, 13856, 13857, 13858, 13859, 13860, 13862, 13863, 13864, 13865, 13866, 13867, 13868, 13869, 13870, 13871, 13872, 13874, 13875, 13876, 13877, 13878, 13879, 13880, 13881, 13882, 13883, 13884, 13885, 13886, 13889, 13890, 13891, 13892, 13893, 13894, 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962, 13963, 13964, 13965, 13967, 13968, 13969, 13971, 13972, 13973, 13974, 13975, 13976, 13978, 13979, 13980, 13981, 13982, 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14058, 14059, 14061, 14062, 14063, 14065, 14066, 14068, 14069, 14070, 14071, 14072, 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, 14108, 14109, 14111, 14112, 14113, 14114, 14115, 14116, 14117, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, 14138, 14139, 14140, 14142, 14143, 14144, 14145, 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14172, 14173, 14174, 14175, 14176, 14178, 14179, 14180, 14181, 14182, 14185, 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14264, 14265, 14267, 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277, 14278, 14279, 14280, 14281, 14282, 14283, 14285, 14286, 14287, 14288, 14289, 14290, 14291, 14292, 14294, 14295, 14296, 14297, 14299, 14300, 14301, 14302, 14303, 14304, 14305, 14306, 14307, 14308, 14309, 14310, 14311, 14312, 14313, 14314, 14316, 14317, 14318, 14320, 14321, 14322, 14323, 14324, 14325, 14326, 14327, 14328, 14329, 14332, 14335, 14336, 14345, 14346, 14347, 14348, 14353, 14354, 14355, 14356, 14357, 14358, 14359, 14360, 14361, 14362, 14363, 14364, 14365, 14366, 14367, 14368, 14369, 14370, 14371, 14372, 14373, 14374, 14375, 14376, 14377, 14378, 14379, 14380, 14381, 14382, 14383, 14384, 14385, 14386, 14387, 14388, 14389, 14390, 14391, 14392, 14393, 14394, 14395, 14396, 14397, 14398)))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2023-12-02 00:07:30 Duration: 257ms
-
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)) AND EXISTS ( SELECT 1 FROM "product_public_category_product_template_rel" AS "product_template__public_categ_ids" WHERE "product_template__public_categ_ids"."product_template_id" = "product_template".id AND "product_template__public_categ_ids"."product_public_category_id" IN (12382, 12625, 12626, 12627, 12628, 12629, 12630, 12631, 12632, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12640, 12641, 12642, 12643, 12645, 12646, 12647, 12648, 12649, 12651, 12652, 12655, 12656, 12657, 12658, 12659, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 12672, 12673, 12674, 12676, 12677, 12678, 12680, 12681, 12682, 12684, 12686, 12687, 12688, 12689, 12690, 12692, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701, 12702, 12703, 12704, 12705, 12706, 12707, 12708, 12709, 12710, 12711, 12712, 12714, 12715, 12716, 12717, 12718, 12719, 12720, 12721, 12722, 12723, 12724, 12725, 12726, 12728, 12730, 12731, 12732, 12734, 12735, 12736, 12748, 12750, 12751, 12752, 12753, 12754, 12755, 12756, 12757, 12758, 12759, 12761, 12762, 12764, 12765, 12766, 12767, 12768, 12769, 12770, 12771, 12772, 12773, 12774, 12775, 12776, 12778, 12779, 12780, 12781, 12782, 12783, 12784, 12785, 12786, 12787, 12788, 12789, 12790, 12791, 12792, 12793, 12795, 12796, 12797, 12799, 12800, 12801, 12802, 12804, 12806, 12807, 12808, 12810, 12811, 12812, 12813, 12814, 12815, 12816, 12817, 12819, 12820, 12821, 12822, 12823, 12824, 12825, 12826, 12827, 12828, 12830, 12831, 12832, 12833, 12834, 12835, 12836, 12838, 12839, 12840, 12842, 12843, 12844, 12846, 12847, 12848, 12850, 12851, 12852, 12853, 12854, 12856, 12857, 12858, 12859, 12860, 12861, 12862, 12863, 12865, 12866, 13835, 13836, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13844, 13845, 13846, 13847, 13848, 13849, 13850, 13851, 13852, 13853, 13854, 13855, 13856, 13857, 13858, 13859, 13860, 13862, 13863, 13864, 13865, 13866, 13867, 13868, 13869, 13870, 13871, 13872, 13874, 13875, 13876, 13877, 13878, 13879, 13880, 13881, 13882, 13883, 13884, 13885, 13886, 13889, 13890, 13891, 13892, 13893, 13894, 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962, 13963, 13964, 13965, 13967, 13968, 13969, 13971, 13972, 13973, 13974, 13975, 13976, 13978, 13979, 13980, 13981, 13982, 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14058, 14059, 14061, 14062, 14063, 14065, 14066, 14068, 14069, 14070, 14071, 14072, 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, 14108, 14109, 14111, 14112, 14113, 14114, 14115, 14116, 14117, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, 14138, 14139, 14140, 14142, 14143, 14144, 14145, 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14172, 14173, 14174, 14175, 14176, 14178, 14179, 14180, 14181, 14182, 14185, 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14264, 14265, 14267, 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277, 14278, 14279, 14280, 14281, 14282, 14283, 14285, 14286, 14287, 14288, 14289, 14290, 14291, 14292, 14294, 14295, 14296, 14297, 14299, 14300, 14301, 14302, 14303, 14304, 14305, 14306, 14307, 14308, 14309, 14310, 14311, 14312, 14313, 14314, 14316, 14317, 14318, 14320, 14321, 14322, 14323, 14324, 14325, 14326, 14327, 14328, 14329, 14332, 14335, 14336, 14345, 14346, 14347, 14348, 14353, 14354, 14355, 14356, 14357, 14358, 14359, 14360, 14361, 14362, 14363, 14364, 14365, 14366, 14367, 14368, 14369, 14370, 14371, 14372, 14373, 14374, 14375, 14376, 14377, 14378, 14379, 14380, 14381, 14382, 14383, 14384, 14385, 14386, 14387, 14388, 14389, 14390, 14391, 14392, 14393, 14394, 14395, 14396, 14397, 14398)))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2023-12-02 17:21:07 Duration: 222ms
9 7m5s 1,693 120ms 694ms 251ms 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 #9
Day Hour Count Duration Avg duration Dec 02 00 350 1m30s 258ms 01 15 3s130ms 208ms 02 140 34s161ms 244ms 03 91 19s973ms 219ms 04 60 13s494ms 224ms 05 84 20s606ms 245ms 06 78 18s407ms 235ms 07 45 10s848ms 241ms 08 45 10s595ms 235ms 09 23 5s488ms 238ms 10 26 5s281ms 203ms 11 17 3s677ms 216ms 12 20 4s440ms 222ms 13 24 5s101ms 212ms 14 40 11s289ms 282ms 15 92 25s928ms 281ms 16 113 29s153ms 257ms 17 156 37s438ms 239ms 18 35 7s620ms 217ms 19 92 28s751ms 312ms 20 47 14s427ms 306ms 21 27 7s834ms 290ms 23 73 17s951ms 245ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-01 23:59:13') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19566]', '["pointspring_master","mail.channel",242]', '["pointspring_master","mail.channel",431]', '["pointspring_master","mail.channel",505]', '["pointspring_master","mail.channel",523]', '["pointspring_master","res.partner",19566]', '["pointspring_master","ir.needaction",19566]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:00:04 Duration: 694ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-02 00:02:13') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_952"', '["pointspring_master","calendar.alarm",19490]', '["pointspring_master","mail.channel",68]', '["pointspring_master","mail.channel",70]', '["pointspring_master","mail.channel",522]', '["pointspring_master","res.partner",19490]', '["pointspring_master","ir.needaction",19490]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:03:04 Duration: 610ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-02 00:00:17') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19507]', '["pointspring_master","mail.channel",78]', '["pointspring_master","mail.channel",79]', '["pointspring_master","mail.channel",80]', '["pointspring_master","mail.channel",81]', '["pointspring_master","mail.channel",82]', '["pointspring_master","mail.channel",527]', '["pointspring_master","res.partner",19507]', '["pointspring_master","ir.needaction",19507]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:01:07 Duration: 606ms
10 5m38s 2,140 120ms 422ms 157ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ("product_warehouse_inventory"."product_id" in (...)) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Dec 02 00 1,937 5m7s 158ms 16 153 23s598ms 154ms 17 50 7s208ms 144ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (209932, 209121, 209151, 209162, 209163, 209166, 209168, 209169, 209349, 209350, 209373, 209522, 209603, 209605, 209609, 209612, 209613, 209617, 209626, 209645, 209648, 209656, 209681, 209717, 209730, 209766, 209767, 209776, 209781, 209782, 209789, 209800, 209801, 209802, 209824, 209826, 209840, 209851, 209857, 209862, 209881, 209885, 209886, 209933, 209941, 209992, 210020, 210024, 210025, 210038, 210041)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:04:57 Duration: 422ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (209617, 209162, 209168, 209371, 209373, 209375, 209397, 209603, 209604, 209608, 209609, 209612, 209616, 209635, 209645, 209678, 209706, 209710, 209716, 209857, 209919, 210022, 210025, 210041, 210059, 210121, 248391)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:03:10 Duration: 401ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (209373, 209371, 209603, 209608, 209610, 209612, 209620, 209633, 209643, 209644, 209677, 209694, 209766, 209775, 209789, 209795, 209800, 209818, 209819, 209844, 209857, 209859, 209860, 209873, 209885, 209888, 209899, 209901, 209906, 209909, 209914, 209993, 210021, 210025, 210041, 210042, 210092, 210101, 210103, 210113)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:03:02 Duration: 388ms
11 4m32s 45 1s246ms 33s820ms 6s65ms delete from account_move_line where id in (...);Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Dec 02 03 6 37s969ms 6s328ms 06 15 2m27s 9s808ms 07 6 38s17ms 6s336ms 14 11 14s267ms 1s297ms 15 2 2s504ms 1s252ms 17 1 1s270ms 1s270ms 23 4 31s773ms 7s943ms -
DELETE FROM account_move_line WHERE id IN (3702577, 3702578, 3702579, 3702580, 3702581, 3702582, 3702583, 3702584, 3702585, 3702586, 3702587, 3702588, 3702589, 3702590, 3702591, 3702592, 3702593, 3702594, 3702595, 3702596, 3702597, 3702598, 3702599, 3702600, 3702601, 3717575, 3717576);
Date: 2023-12-02 06:08:47 Duration: 33s820ms
-
DELETE FROM account_move_line WHERE id IN (3691814, 3691815, 3691816, 3691817, 3691818, 3691819, 3691820, 3691821, 3691822, 3691823, 3691824, 3691825, 3709842, 3709843);
Date: 2023-12-02 06:07:09 Duration: 17s535ms
-
DELETE FROM account_move_line WHERE id IN (3712915, 3712916, 3712917, 3712918, 3712919, 3712920, 3712921, 3712910, 3712911, 3712912, 3712913, 3712914);
Date: 2023-12-02 06:00:52 Duration: 15s154ms
12 3m47s 1 3m47s 3m47s 3m47s 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 Dec 02 09 1 3m47s 3m47s -
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: 2023-12-02 09:08:13 Duration: 3m47s
13 2m13s 81 962ms 6s666ms 1s652ms 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 Dec 02 00 58 1m49s 1s884ms 16 23 24s567ms 1s68ms -
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 = 3795 and ill.method not in (8, 7);
Date: 2023-12-02 00:01:05 Duration: 6s666ms
-
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 = 3794 and ill.method not in (8, 7);
Date: 2023-12-02 00:05:59 Duration: 6s26ms
-
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 = 3797 and ill.method not in (8, 7);
Date: 2023-12-02 00:02:28 Duration: 4s637ms
14 2m7s 81 837ms 6s505ms 1s569ms 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 Dec 02 00 58 1m43s 1s779ms 16 23 23s968ms 1s42ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3799 and active = True;
Date: 2023-12-02 00:01:13 Duration: 6s505ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3798 and active = True;
Date: 2023-12-02 00:02:31 Duration: 6s134ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3796 and active = True;
Date: 2023-12-02 00:05:09 Duration: 6s18ms
15 2m5s 12 3s729ms 17s181ms 10s453ms 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 #15
Day Hour Count Duration Avg duration Dec 02 00 7 1m8s 9s826ms 01 4 52s927ms 13s231ms 02 1 3s729ms 3s729ms -
with data as ( select distinct shl.id as record, 3808, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430) UNION ALL ( select distinct sol.id as record, 3808, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430)) UNION ALL ( select distinct sm.id as record, 3808, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430))) 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 3808, 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: 2023-12-02 01:05:37 Duration: 17s181ms
-
with data as ( select distinct shl.id as record, 3801, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485) UNION ALL ( select distinct sol.id as record, 3801, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485)) UNION ALL ( select distinct sm.id as record, 3801, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485))) 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 3801, 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: 2023-12-02 00:30:26 Duration: 15s346ms
-
with data as ( select distinct shl.id as record, 3810, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393) UNION ALL ( select distinct sol.id as record, 3810, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393)) UNION ALL ( select distinct sm.id as record, 3810, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3810, 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: 2023-12-02 01:27:55 Duration: 14s758ms
16 1m50s 81 829ms 5s643ms 1s363ms select ill.item_demand_plan_id from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where ill.method is null and idp.active = true and ill.item_demand_plan_id = ? group by ill.item_demand_plan_id having count(ill.id) > ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Dec 02 00 58 1m28s 1s519ms 16 23 22s323ms 970ms -
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 = 3795 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:00:58 Duration: 5s643ms
-
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 = 3800 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:03:07 Duration: 4s800ms
-
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 = 3794 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:05:53 Duration: 3s524ms
17 1m42s 81 731ms 5s175ms 1s260ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Dec 02 00 58 1m22s 1s426ms 16 23 19s385ms 842ms -
select count(id) from item_list_line where item_demand_plan_id = 3795;
Date: 2023-12-02 00:00:53 Duration: 5s175ms
-
select count(id) from item_list_line where item_demand_plan_id = 3794;
Date: 2023-12-02 00:05:50 Duration: 4s978ms
-
select count(id) from item_list_line where item_demand_plan_id = 3800;
Date: 2023-12-02 00:03:02 Duration: 3s833ms
18 1m33s 1 1m33s 1m33s 1m33s 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 #18
Day Hour Count Duration Avg duration Dec 02 09 1 1m33s 1m33s -
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: 2023-12-02 09:02:53 Duration: 1m33s
19 1m25s 1 1m25s 1m25s 1m25s 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 #19
Day Hour Count Duration Avg duration Dec 02 09 1 1m25s 1m25s -
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: 2023-12-02 09:04:25 Duration: 1m25s
20 1m18s 258 120ms 951ms 302ms select id from ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and date::date = date ?::timestamp and item_demand_plan_id = ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) t where t.rnum > ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Dec 02 00 258 1m18s 302ms -
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 209706 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3798 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:03:50 Duration: 951ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 209612 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3798 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:02:55 Duration: 888ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 210010 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3796 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:04:56 Duration: 869ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 12,687 3h5m25s 788ms 6s93ms 876ms 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 Dec 02 00 492 15m37s 1s905ms 02 1,009 15m1s 893ms 04 242 3m18s 818ms 16 1,254 18m4s 864ms 17 1,413 19m25s 824ms 18 1,439 19m50s 826ms 19 1,415 19m28s 825ms 20 1,414 19m30s 827ms 21 1,416 19m28s 825ms 22 1,412 19m27s 827ms 23 1,181 16m13s 824ms -
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 = 209982 and item_demand_plan_id = 3792 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: 2023-12-02 00:02:29 Duration: 6s93ms
-
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 = 210094 and item_demand_plan_id = 3795 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: 2023-12-02 00:03:52 Duration: 5s818ms
-
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 = 210011 and item_demand_plan_id = 3792 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: 2023-12-02 00:04:40 Duration: 5s728ms
2 10,719 6h42m1s 2s133ms 5s696ms 2s250ms 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 Dec 02 00 109 7m3s 3s889ms 16 948 35m57s 2s276ms 17 1,413 52m34s 2s232ms 18 1,412 52m31s 2s231ms 19 1,414 52m23s 2s223ms 20 1,414 52m29s 2s227ms 21 1,415 52m31s 2s227ms 22 1,413 52m37s 2s234ms 23 1,181 43m51s 2s228ms -
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 = 210004 and item_demand_plan_id = 3799;
Date: 2023-12-02 00:02:39 Duration: 5s696ms
-
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 = 210023 and item_demand_plan_id = 3792;
Date: 2023-12-02 00:05:08 Duration: 5s567ms
-
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 = 210093 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:04:10 Duration: 5s486ms
3 3,986 9m18s 129ms 257ms 140ms 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)) and exists ( select ? from "product_public_category_product_template_rel" AS "product_template__public_categ_ids" where "product_template__public_categ_ids"."product_template_id" = "product_template".id and "product_template__public_categ_ids"."product_public_category_id" in (...)))) order by coalesce("product_template"."is_published", false) desc, "product_template"."website_sequence" asc, "product_template"."id" desc;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Dec 02 00 3 729ms 243ms 01 3 421ms 140ms 02 6 817ms 136ms 04 3 408ms 136ms 05 12 1s658ms 138ms 06 9 1s269ms 141ms 07 12 1s642ms 136ms 09 9 1s238ms 137ms 11 3 413ms 137ms 13 30 4s156ms 138ms 14 2,624 6m7s 139ms 15 1,125 2m37s 139ms 16 48 6s946ms 144ms 17 42 6s107ms 145ms 18 39 5s606ms 143ms 20 3 435ms 145ms 21 9 1s243ms 138ms 22 3 419ms 139ms 23 3 438ms 146ms -
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)) AND EXISTS ( SELECT 1 FROM "product_public_category_product_template_rel" AS "product_template__public_categ_ids" WHERE "product_template__public_categ_ids"."product_template_id" = "product_template".id AND "product_template__public_categ_ids"."product_public_category_id" IN (12382, 12625, 12626, 12627, 12628, 12629, 12630, 12631, 12632, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12640, 12641, 12642, 12643, 12645, 12646, 12647, 12648, 12649, 12651, 12652, 12655, 12656, 12657, 12658, 12659, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 12672, 12673, 12674, 12676, 12677, 12678, 12680, 12681, 12682, 12684, 12686, 12687, 12688, 12689, 12690, 12692, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701, 12702, 12703, 12704, 12705, 12706, 12707, 12708, 12709, 12710, 12711, 12712, 12714, 12715, 12716, 12717, 12718, 12719, 12720, 12721, 12722, 12723, 12724, 12725, 12726, 12728, 12730, 12731, 12732, 12734, 12735, 12736, 12748, 12750, 12751, 12752, 12753, 12754, 12755, 12756, 12757, 12758, 12759, 12761, 12762, 12764, 12765, 12766, 12767, 12768, 12769, 12770, 12771, 12772, 12773, 12774, 12775, 12776, 12778, 12779, 12780, 12781, 12782, 12783, 12784, 12785, 12786, 12787, 12788, 12789, 12790, 12791, 12792, 12793, 12795, 12796, 12797, 12799, 12800, 12801, 12802, 12804, 12806, 12807, 12808, 12810, 12811, 12812, 12813, 12814, 12815, 12816, 12817, 12819, 12820, 12821, 12822, 12823, 12824, 12825, 12826, 12827, 12828, 12830, 12831, 12832, 12833, 12834, 12835, 12836, 12838, 12839, 12840, 12842, 12843, 12844, 12846, 12847, 12848, 12850, 12851, 12852, 12853, 12854, 12856, 12857, 12858, 12859, 12860, 12861, 12862, 12863, 12865, 12866, 13835, 13836, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13844, 13845, 13846, 13847, 13848, 13849, 13850, 13851, 13852, 13853, 13854, 13855, 13856, 13857, 13858, 13859, 13860, 13862, 13863, 13864, 13865, 13866, 13867, 13868, 13869, 13870, 13871, 13872, 13874, 13875, 13876, 13877, 13878, 13879, 13880, 13881, 13882, 13883, 13884, 13885, 13886, 13889, 13890, 13891, 13892, 13893, 13894, 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962, 13963, 13964, 13965, 13967, 13968, 13969, 13971, 13972, 13973, 13974, 13975, 13976, 13978, 13979, 13980, 13981, 13982, 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14058, 14059, 14061, 14062, 14063, 14065, 14066, 14068, 14069, 14070, 14071, 14072, 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, 14108, 14109, 14111, 14112, 14113, 14114, 14115, 14116, 14117, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, 14138, 14139, 14140, 14142, 14143, 14144, 14145, 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14172, 14173, 14174, 14175, 14176, 14178, 14179, 14180, 14181, 14182, 14185, 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14264, 14265, 14267, 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277, 14278, 14279, 14280, 14281, 14282, 14283, 14285, 14286, 14287, 14288, 14289, 14290, 14291, 14292, 14294, 14295, 14296, 14297, 14299, 14300, 14301, 14302, 14303, 14304, 14305, 14306, 14307, 14308, 14309, 14310, 14311, 14312, 14313, 14314, 14316, 14317, 14318, 14320, 14321, 14322, 14323, 14324, 14325, 14326, 14327, 14328, 14329, 14332, 14335, 14336, 14345, 14346, 14347, 14348, 14353, 14354, 14355, 14356, 14357, 14358, 14359, 14360, 14361, 14362, 14363, 14364, 14365, 14366, 14367, 14368, 14369, 14370, 14371, 14372, 14373, 14374, 14375, 14376, 14377, 14378, 14379, 14380, 14381, 14382, 14383, 14384, 14385, 14386, 14387, 14388, 14389, 14390, 14391, 14392, 14393, 14394, 14395, 14396, 14397, 14398)))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2023-12-02 00:07:30 Duration: 257ms
-
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)) AND EXISTS ( SELECT 1 FROM "product_public_category_product_template_rel" AS "product_template__public_categ_ids" WHERE "product_template__public_categ_ids"."product_template_id" = "product_template".id AND "product_template__public_categ_ids"."product_public_category_id" IN (12382, 12625, 12626, 12627, 12628, 12629, 12630, 12631, 12632, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12640, 12641, 12642, 12643, 12645, 12646, 12647, 12648, 12649, 12651, 12652, 12655, 12656, 12657, 12658, 12659, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 12672, 12673, 12674, 12676, 12677, 12678, 12680, 12681, 12682, 12684, 12686, 12687, 12688, 12689, 12690, 12692, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701, 12702, 12703, 12704, 12705, 12706, 12707, 12708, 12709, 12710, 12711, 12712, 12714, 12715, 12716, 12717, 12718, 12719, 12720, 12721, 12722, 12723, 12724, 12725, 12726, 12728, 12730, 12731, 12732, 12734, 12735, 12736, 12748, 12750, 12751, 12752, 12753, 12754, 12755, 12756, 12757, 12758, 12759, 12761, 12762, 12764, 12765, 12766, 12767, 12768, 12769, 12770, 12771, 12772, 12773, 12774, 12775, 12776, 12778, 12779, 12780, 12781, 12782, 12783, 12784, 12785, 12786, 12787, 12788, 12789, 12790, 12791, 12792, 12793, 12795, 12796, 12797, 12799, 12800, 12801, 12802, 12804, 12806, 12807, 12808, 12810, 12811, 12812, 12813, 12814, 12815, 12816, 12817, 12819, 12820, 12821, 12822, 12823, 12824, 12825, 12826, 12827, 12828, 12830, 12831, 12832, 12833, 12834, 12835, 12836, 12838, 12839, 12840, 12842, 12843, 12844, 12846, 12847, 12848, 12850, 12851, 12852, 12853, 12854, 12856, 12857, 12858, 12859, 12860, 12861, 12862, 12863, 12865, 12866, 13835, 13836, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13844, 13845, 13846, 13847, 13848, 13849, 13850, 13851, 13852, 13853, 13854, 13855, 13856, 13857, 13858, 13859, 13860, 13862, 13863, 13864, 13865, 13866, 13867, 13868, 13869, 13870, 13871, 13872, 13874, 13875, 13876, 13877, 13878, 13879, 13880, 13881, 13882, 13883, 13884, 13885, 13886, 13889, 13890, 13891, 13892, 13893, 13894, 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962, 13963, 13964, 13965, 13967, 13968, 13969, 13971, 13972, 13973, 13974, 13975, 13976, 13978, 13979, 13980, 13981, 13982, 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14058, 14059, 14061, 14062, 14063, 14065, 14066, 14068, 14069, 14070, 14071, 14072, 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, 14108, 14109, 14111, 14112, 14113, 14114, 14115, 14116, 14117, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, 14138, 14139, 14140, 14142, 14143, 14144, 14145, 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14172, 14173, 14174, 14175, 14176, 14178, 14179, 14180, 14181, 14182, 14185, 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14264, 14265, 14267, 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277, 14278, 14279, 14280, 14281, 14282, 14283, 14285, 14286, 14287, 14288, 14289, 14290, 14291, 14292, 14294, 14295, 14296, 14297, 14299, 14300, 14301, 14302, 14303, 14304, 14305, 14306, 14307, 14308, 14309, 14310, 14311, 14312, 14313, 14314, 14316, 14317, 14318, 14320, 14321, 14322, 14323, 14324, 14325, 14326, 14327, 14328, 14329, 14332, 14335, 14336, 14345, 14346, 14347, 14348, 14353, 14354, 14355, 14356, 14357, 14358, 14359, 14360, 14361, 14362, 14363, 14364, 14365, 14366, 14367, 14368, 14369, 14370, 14371, 14372, 14373, 14374, 14375, 14376, 14377, 14378, 14379, 14380, 14381, 14382, 14383, 14384, 14385, 14386, 14387, 14388, 14389, 14390, 14391, 14392, 14393, 14394, 14395, 14396, 14397, 14398)))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2023-12-02 00:07:30 Duration: 257ms
-
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)) AND EXISTS ( SELECT 1 FROM "product_public_category_product_template_rel" AS "product_template__public_categ_ids" WHERE "product_template__public_categ_ids"."product_template_id" = "product_template".id AND "product_template__public_categ_ids"."product_public_category_id" IN (12382, 12625, 12626, 12627, 12628, 12629, 12630, 12631, 12632, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12640, 12641, 12642, 12643, 12645, 12646, 12647, 12648, 12649, 12651, 12652, 12655, 12656, 12657, 12658, 12659, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 12672, 12673, 12674, 12676, 12677, 12678, 12680, 12681, 12682, 12684, 12686, 12687, 12688, 12689, 12690, 12692, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701, 12702, 12703, 12704, 12705, 12706, 12707, 12708, 12709, 12710, 12711, 12712, 12714, 12715, 12716, 12717, 12718, 12719, 12720, 12721, 12722, 12723, 12724, 12725, 12726, 12728, 12730, 12731, 12732, 12734, 12735, 12736, 12748, 12750, 12751, 12752, 12753, 12754, 12755, 12756, 12757, 12758, 12759, 12761, 12762, 12764, 12765, 12766, 12767, 12768, 12769, 12770, 12771, 12772, 12773, 12774, 12775, 12776, 12778, 12779, 12780, 12781, 12782, 12783, 12784, 12785, 12786, 12787, 12788, 12789, 12790, 12791, 12792, 12793, 12795, 12796, 12797, 12799, 12800, 12801, 12802, 12804, 12806, 12807, 12808, 12810, 12811, 12812, 12813, 12814, 12815, 12816, 12817, 12819, 12820, 12821, 12822, 12823, 12824, 12825, 12826, 12827, 12828, 12830, 12831, 12832, 12833, 12834, 12835, 12836, 12838, 12839, 12840, 12842, 12843, 12844, 12846, 12847, 12848, 12850, 12851, 12852, 12853, 12854, 12856, 12857, 12858, 12859, 12860, 12861, 12862, 12863, 12865, 12866, 13835, 13836, 13837, 13838, 13839, 13840, 13841, 13842, 13843, 13844, 13845, 13846, 13847, 13848, 13849, 13850, 13851, 13852, 13853, 13854, 13855, 13856, 13857, 13858, 13859, 13860, 13862, 13863, 13864, 13865, 13866, 13867, 13868, 13869, 13870, 13871, 13872, 13874, 13875, 13876, 13877, 13878, 13879, 13880, 13881, 13882, 13883, 13884, 13885, 13886, 13889, 13890, 13891, 13892, 13893, 13894, 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962, 13963, 13964, 13965, 13967, 13968, 13969, 13971, 13972, 13973, 13974, 13975, 13976, 13978, 13979, 13980, 13981, 13982, 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14058, 14059, 14061, 14062, 14063, 14065, 14066, 14068, 14069, 14070, 14071, 14072, 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, 14108, 14109, 14111, 14112, 14113, 14114, 14115, 14116, 14117, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14133, 14134, 14135, 14136, 14137, 14138, 14139, 14140, 14142, 14143, 14144, 14145, 14146, 14147, 14148, 14149, 14150, 14151, 14152, 14153, 14154, 14155, 14156, 14157, 14158, 14159, 14160, 14161, 14162, 14163, 14164, 14165, 14166, 14167, 14168, 14169, 14170, 14172, 14173, 14174, 14175, 14176, 14178, 14179, 14180, 14181, 14182, 14185, 14186, 14187, 14188, 14189, 14190, 14191, 14192, 14193, 14194, 14195, 14196, 14197, 14198, 14199, 14200, 14201, 14202, 14203, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, 14219, 14220, 14221, 14222, 14223, 14224, 14225, 14226, 14227, 14228, 14229, 14230, 14231, 14232, 14233, 14234, 14235, 14236, 14237, 14238, 14239, 14240, 14241, 14242, 14243, 14244, 14245, 14246, 14247, 14248, 14249, 14250, 14251, 14252, 14253, 14254, 14255, 14256, 14257, 14258, 14259, 14260, 14261, 14262, 14264, 14265, 14267, 14268, 14269, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277, 14278, 14279, 14280, 14281, 14282, 14283, 14285, 14286, 14287, 14288, 14289, 14290, 14291, 14292, 14294, 14295, 14296, 14297, 14299, 14300, 14301, 14302, 14303, 14304, 14305, 14306, 14307, 14308, 14309, 14310, 14311, 14312, 14313, 14314, 14316, 14317, 14318, 14320, 14321, 14322, 14323, 14324, 14325, 14326, 14327, 14328, 14329, 14332, 14335, 14336, 14345, 14346, 14347, 14348, 14353, 14354, 14355, 14356, 14357, 14358, 14359, 14360, 14361, 14362, 14363, 14364, 14365, 14366, 14367, 14368, 14369, 14370, 14371, 14372, 14373, 14374, 14375, 14376, 14377, 14378, 14379, 14380, 14381, 14382, 14383, 14384, 14385, 14386, 14387, 14388, 14389, 14390, 14391, 14392, 14393, 14394, 14395, 14396, 14397, 14398)))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2023-12-02 17:21:07 Duration: 222ms
4 2,140 5m38s 120ms 422ms 157ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ("product_warehouse_inventory"."product_id" in (...)) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Dec 02 00 1,937 5m7s 158ms 16 153 23s598ms 154ms 17 50 7s208ms 144ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (209932, 209121, 209151, 209162, 209163, 209166, 209168, 209169, 209349, 209350, 209373, 209522, 209603, 209605, 209609, 209612, 209613, 209617, 209626, 209645, 209648, 209656, 209681, 209717, 209730, 209766, 209767, 209776, 209781, 209782, 209789, 209800, 209801, 209802, 209824, 209826, 209840, 209851, 209857, 209862, 209881, 209885, 209886, 209933, 209941, 209992, 210020, 210024, 210025, 210038, 210041)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:04:57 Duration: 422ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (209617, 209162, 209168, 209371, 209373, 209375, 209397, 209603, 209604, 209608, 209609, 209612, 209616, 209635, 209645, 209678, 209706, 209710, 209716, 209857, 209919, 210022, 210025, 210041, 210059, 210121, 248391)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:03:10 Duration: 401ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (209373, 209371, 209603, 209608, 209610, 209612, 209620, 209633, 209643, 209644, 209677, 209694, 209766, 209775, 209789, 209795, 209800, 209818, 209819, 209844, 209857, 209859, 209860, 209873, 209885, 209888, 209899, 209901, 209906, 209909, 209914, 209993, 210021, 210025, 210041, 210042, 210092, 210101, 210103, 210113)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:03:02 Duration: 388ms
5 1,780 11m34s 295ms 1s162ms 390ms 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 #5
Day Hour Count Duration Avg duration Dec 02 00 708 5m52s 497ms 12 99 31s365ms 316ms 13 301 1m32s 308ms 14 155 47s377ms 305ms 15 41 12s573ms 306ms 16 179 1m 340ms 17 132 42s306ms 320ms 18 107 35s250ms 329ms 19 46 15s636ms 339ms 20 12 3s723ms 310ms -
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: 2023-12-02 00:02:25 Duration: 1s162ms
-
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: 2023-12-02 00:03:49 Duration: 1s140ms
-
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: 2023-12-02 00:02:34 Duration: 1s108ms
6 1,693 7m5s 120ms 694ms 251ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Dec 02 00 350 1m30s 258ms 01 15 3s130ms 208ms 02 140 34s161ms 244ms 03 91 19s973ms 219ms 04 60 13s494ms 224ms 05 84 20s606ms 245ms 06 78 18s407ms 235ms 07 45 10s848ms 241ms 08 45 10s595ms 235ms 09 23 5s488ms 238ms 10 26 5s281ms 203ms 11 17 3s677ms 216ms 12 20 4s440ms 222ms 13 24 5s101ms 212ms 14 40 11s289ms 282ms 15 92 25s928ms 281ms 16 113 29s153ms 257ms 17 156 37s438ms 239ms 18 35 7s620ms 217ms 19 92 28s751ms 312ms 20 47 14s427ms 306ms 21 27 7s834ms 290ms 23 73 17s951ms 245ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-01 23:59:13') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19566]', '["pointspring_master","mail.channel",242]', '["pointspring_master","mail.channel",431]', '["pointspring_master","mail.channel",505]', '["pointspring_master","mail.channel",523]', '["pointspring_master","res.partner",19566]', '["pointspring_master","ir.needaction",19566]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:00:04 Duration: 694ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-02 00:02:13') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_952"', '["pointspring_master","calendar.alarm",19490]', '["pointspring_master","mail.channel",68]', '["pointspring_master","mail.channel",70]', '["pointspring_master","mail.channel",522]', '["pointspring_master","res.partner",19490]', '["pointspring_master","ir.needaction",19490]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:03:04 Duration: 610ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-02 00:00:17') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19507]', '["pointspring_master","mail.channel",78]', '["pointspring_master","mail.channel",79]', '["pointspring_master","mail.channel",80]', '["pointspring_master","mail.channel",81]', '["pointspring_master","mail.channel",82]', '["pointspring_master","mail.channel",527]', '["pointspring_master","res.partner",19507]', '["pointspring_master","ir.needaction",19507]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:01:07 Duration: 606ms
7 1,622 11m49s 305ms 987ms 437ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ((("product_warehouse_inventory"."inventory_vendor_id" = ?) and ("product_warehouse_inventory"."product_id" = ?)) and ((("product_warehouse_inventory"."is_active" = true) and (("product_warehouse_inventory"."has_core" = true) or (("product_warehouse_inventory"."has_core" is null or "product_warehouse_inventory"."has_core" = false) and ("product_warehouse_inventory"."is_core" is null or "product_warehouse_inventory"."is_core" = false)))) and ("product_warehouse_inventory"."branch_id" in ( select "res_branch".id from "res_branch" where (unaccent ("res_branch"."name"::text) ilike unaccent (?)) and true)))) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Dec 02 00 1,622 11m49s 437ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3103) AND ("product_warehouse_inventory"."product_id" = 192721)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:05:03 Duration: 987ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3098) AND ("product_warehouse_inventory"."product_id" = 189106)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:00:55 Duration: 979ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3098) AND ("product_warehouse_inventory"."product_id" = 188494)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:01:13 Duration: 926ms
8 1,621 26m29s 743ms 5s587ms 980ms 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 Dec 02 00 127 5m22s 2s540ms 02 1,036 14m42s 852ms 16 458 6m23s 837ms -
select id from item_list_line where product_id = 210040 and item_demand_plan_id = 3792;
Date: 2023-12-02 00:04:16 Duration: 5s587ms
-
select id from item_list_line where product_id = 209912 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:01:17 Duration: 5s407ms
-
select id from item_list_line where product_id = 209965 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:03:00 Duration: 5s404ms
9 1,080 39m18s 2s110ms 2s391ms 2s183ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Dec 02 00 508 18m17s 2s160ms 01 560 20m33s 2s202ms 02 12 27s129ms 2s260ms -
update item_list_line set product_id = 172999, supercede_product_id = 172992, superceded = True where product_id = 172992 and item_demand_plan_id = 3810;
Date: 2023-12-02 01:40:01 Duration: 2s391ms
-
update item_list_line set product_id = 251688, supercede_product_id = 206029, superceded = True where product_id = 206029 and item_demand_plan_id = 3804;
Date: 2023-12-02 00:49:26 Duration: 2s346ms
-
update item_list_line set product_id = 226040, supercede_product_id = 242275, superceded = True where product_id = 242275 and item_demand_plan_id = 3811;
Date: 2023-12-02 02:00:09 Duration: 2s330ms
10 554 1m12s 120ms 201ms 131ms select max(id) from ir_attachment where create_uid = ? and url like ? group by name order by name;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Dec 02 00 554 1m12s 131ms -
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: 2023-12-02 00:03:51 Duration: 201ms
-
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: 2023-12-02 00:04:48 Duration: 187ms
-
SELECT max(id) FROM ir_attachment WHERE create_uid = 1 AND url like '/web/content/%-cc80a45/web.assets_frontend_minimal_js.js' GROUP BY name ORDER BY name;
Date: 2023-12-02 00:03:04 Duration: 180ms
11 356 49s743ms 120ms 357ms 139ms 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 #11
Day Hour Count Duration Avg duration Dec 02 00 21 4s518ms 215ms 02 4 632ms 158ms 17 1 129ms 129ms 19 2 292ms 146ms 20 5 610ms 122ms 21 62 8s433ms 136ms 22 220 29s750ms 135ms 23 41 5s374ms 131ms -
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: 2023-12-02 00:01:34 Duration: 357ms
-
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: 2023-12-02 00:01:34 Duration: 348ms
-
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: 2023-12-02 00:01:34 Duration: 326ms
12 284 12m38s 1s9ms 8s996ms 2s669ms select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Dec 02 00 284 12m38s 2s669ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209375)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3796)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:02:42 Duration: 8s996ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209857)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3798)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:04:16 Duration: 8s725ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209609)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3798)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:02:42 Duration: 8s613ms
13 258 1m18s 120ms 951ms 302ms select id from ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and date::date = date ?::timestamp and item_demand_plan_id = ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) t where t.rnum > ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Dec 02 00 258 1m18s 302ms -
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 209706 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3798 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:03:50 Duration: 951ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 209612 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3798 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:02:55 Duration: 888ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 210010 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3796 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:04:56 Duration: 869ms
14 137 22s498ms 120ms 901ms 164ms 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 #14
Day Hour Count Duration Avg duration Dec 02 00 15 6s497ms 433ms 03 6 783ms 130ms 06 83 10s649ms 128ms 07 14 1s834ms 131ms 23 19 2s732ms 143ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (41362)) AND (("account_move"."id" not in (1053869)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2023-12-02 00:00:32 Duration: 901ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (41311)) AND (("account_move"."id" not in (1054751)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2023-12-02 00:00:23 Duration: 827ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (41311)) AND (("account_move"."id" not in (1054751)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2023-12-02 00:00:21 Duration: 812ms
15 102 18s755ms 171ms 304ms 183ms select res_partner.id from "res_partner" where ("res_partner"."active" = true) and (((("res_partner"."partner_share" is null or "res_partner"."partner_share" = false) or ("res_partner"."company_id" in (...))) or "res_partner"."company_id" is null) and (((("res_partner"."type" != ?) or "res_partner"."type" is null) or "res_partner"."type" is null) or ("res_partner"."type" = ?))) and (unaccent (res_partner.email) ilike unaccent (?) or unaccent (res_partner.display_name) ilike unaccent (?) or unaccent (res_partner.ref) ilike unaccent (?) or unaccent (res_partner.vat) ilike unaccent (?)) unaccent (res_partner.display_name);Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Dec 02 16 55 10s117ms 183ms 17 47 8s637ms 183ms -
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%X-BILL-04661%') OR unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-04661%') OR unaccent (res_partner.ref) ilike unaccent ('%X-BILL-04661%') OR unaccent (res_partner.vat) ilike unaccent ('X-BILL-04661')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-04661%') desc, unaccent (res_partner.display_name);
Date: 2023-12-02 16:49:45 Duration: 304ms
-
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%X-BILL-04663%') OR unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-04663%') OR unaccent (res_partner.ref) ilike unaccent ('%X-BILL-04663%') OR unaccent (res_partner.vat) ilike unaccent ('X-BILL-04663')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-04663%') desc, unaccent (res_partner.display_name);
Date: 2023-12-02 16:49:46 Duration: 273ms
-
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%X-BILL-00749%') OR unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-00749%') OR unaccent (res_partner.ref) ilike unaccent ('%X-BILL-00749%') OR unaccent (res_partner.vat) ilike unaccent ('X-BILL-00749')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-00749%') desc, unaccent (res_partner.display_name);
Date: 2023-12-02 16:50:18 Duration: 251ms
16 89 13s320ms 120ms 197ms 149ms update account_bank_statement_line set is_processed = false where statement_id = ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Dec 02 00 1 126ms 126ms 14 1 127ms 127ms 16 6 898ms 149ms 17 11 1s418ms 128ms 18 12 1s710ms 142ms 19 12 1s690ms 140ms 20 12 1s789ms 149ms 21 12 1s857ms 154ms 22 12 2s11ms 167ms 23 10 1s687ms 168ms -
UPDATE account_bank_statement_line SET is_processed = False where statement_id = 119;
Date: 2023-12-02 22:33:17 Duration: 197ms
-
UPDATE account_bank_statement_line SET is_processed = False where statement_id = 119;
Date: 2023-12-02 16:28:09 Duration: 195ms
-
UPDATE account_bank_statement_line SET is_processed = False where statement_id = 119;
Date: 2023-12-02 16:33:10 Duration: 192ms
17 81 2m13s 962ms 6s666ms 1s652ms 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 #17
Day Hour Count Duration Avg duration Dec 02 00 58 1m49s 1s884ms 16 23 24s567ms 1s68ms -
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 = 3795 and ill.method not in (8, 7);
Date: 2023-12-02 00:01:05 Duration: 6s666ms
-
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 = 3794 and ill.method not in (8, 7);
Date: 2023-12-02 00:05:59 Duration: 6s26ms
-
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 = 3797 and ill.method not in (8, 7);
Date: 2023-12-02 00:02:28 Duration: 4s637ms
18 81 2m7s 837ms 6s505ms 1s569ms select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Dec 02 00 58 1m43s 1s779ms 16 23 23s968ms 1s42ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3799 and active = True;
Date: 2023-12-02 00:01:13 Duration: 6s505ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3798 and active = True;
Date: 2023-12-02 00:02:31 Duration: 6s134ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3796 and active = True;
Date: 2023-12-02 00:05:09 Duration: 6s18ms
19 81 1m50s 829ms 5s643ms 1s363ms 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 #19
Day Hour Count Duration Avg duration Dec 02 00 58 1m28s 1s519ms 16 23 22s323ms 970ms -
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 = 3795 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:00:58 Duration: 5s643ms
-
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 = 3800 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:03:07 Duration: 4s800ms
-
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 = 3794 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:05:53 Duration: 3s524ms
20 81 1m42s 731ms 5s175ms 1s260ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Dec 02 00 58 1m22s 1s426ms 16 23 19s385ms 842ms -
select count(id) from item_list_line where item_demand_plan_id = 3795;
Date: 2023-12-02 00:00:53 Duration: 5s175ms
-
select count(id) from item_list_line where item_demand_plan_id = 3794;
Date: 2023-12-02 00:05:50 Duration: 4s978ms
-
select count(id) from item_list_line where item_demand_plan_id = 3800;
Date: 2023-12-02 00:03:02 Duration: 3s833ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 3m47s 3m47s 3m47s 1 3m47s 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 Dec 02 09 1 3m47s 3m47s -
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: 2023-12-02 09:08:13 Duration: 3m47s
2 1m33s 1m33s 1m33s 1 1m33s 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 Dec 02 09 1 1m33s 1m33s -
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: 2023-12-02 09:02:53 Duration: 1m33s
3 1m25s 1m25s 1m25s 1 1m25s 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 Dec 02 09 1 1m25s 1m25s -
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: 2023-12-02 09:04:25 Duration: 1m25s
4 3s729ms 17s181ms 10s453ms 12 2m5s 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 #4
Day Hour Count Duration Avg duration Dec 02 00 7 1m8s 9s826ms 01 4 52s927ms 13s231ms 02 1 3s729ms 3s729ms -
with data as ( select distinct shl.id as record, 3808, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430) UNION ALL ( select distinct sol.id as record, 3808, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430)) UNION ALL ( select distinct sm.id as record, 3808, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (189318, 173241, 202632, 202640, 209210, 183363, 202635, 193055, 193528, 193529, 202477, 193565, 187918, 202653, 209518, 209382, 209267, 209269, 209281, 209329, 209339, 209199, 209182, 209201, 209219, 209413, 209414, 209457, 209466, 209482, 209488, 177924, 177926, 209344, 209561, 193359, 193405, 209318, 209225, 209305, 209559, 193620, 188461, 183353, 209203, 209418, 209357, 189042, 248827, 209255, 209176, 209513, 183350, 209470, 209282, 209332, 209189, 209202, 209427, 209471, 209479, 209519, 209521, 216289, 177872, 177949, 209390, 209256, 209254, 216830, 206656, 209421, 209517, 209356, 187791, 177876, 177890, 209379, 183351, 209268, 209190, 209562, 244119, 177743, 192904, 209261, 209259, 215693, 209227, 209352, 209370, 209392, 209415, 209537, 209456, 193698, 209187, 209235, 209319, 209193, 209195, 177947, 177894, 177886, 177948, 209333, 190764, 209233, 203674, 213509, 209188, 189041, 209226, 209253, 209503, 209526, 209569, 172604, 177899, 177887, 239388, 177896, 209374, 209469, 176822, 209308, 177747, 209312, 209243, 209323, 209228, 213768, 209179, 209265, 209271, 209316, 209322, 209325, 209416, 209462, 186294, 193666, 215733, 209241, 209250, 209206, 209468, 209326, 209207, 209220, 209358, 209425, 209422, 177882, 209331, 209360, 209398, 209538, 209563, 204056, 209232, 209270, 209277, 209284, 209298, 209307, 209309, 209180, 209194, 209183, 209177, 209186, 209396, 209412, 209434, 209440, 209441, 209459, 209484, 209497, 209510, 209512, 209520, 209935, 209475, 209327, 209181, 209315, 177900, 213767, 209560, 209278, 209279, 209314, 209423, 209452, 209460, 209365, 209435, 188924, 245930, 177853, 209380, 193113, 202577, 209334, 183364, 209200, 203690, 209335, 177893, 186845, 193508, 209372, 209362, 209320, 209381, 209299, 187848, 209491, 209507, 258629, 253947, 259262, 249176, 209566, 209487, 190979, 209244, 209247, 209280, 209317, 209342, 209172, 209173, 209174, 209185, 209192, 209197, 209393, 209424, 209436, 209451, 209464, 209480, 209485, 209494, 209509, 209514, 209571, 177861, 177873, 250980, 186233, 186232, 209573, 209378, 209234, 209506, 209554, 209346, 209258, 193625, 204975, 177891, 209565, 177927, 209236, 209328, 209330, 190984, 209238, 209239, 209178, 209472, 209433, 209473, 209493, 209515, 209209, 238976, 177917, 215132, 203681, 209528, 209495, 209501, 209524, 192957, 209242, 209273, 209214, 218167, 209389, 193109, 216288, 193209, 177880, 177884, 209313, 193509, 217801, 202634, 188425, 209570, 209545, 209384, 209221, 209257, 209198, 209211, 209216, 209394, 209505, 209546, 209567, 202687, 209502, 202652, 253188, 209251, 209311, 209347, 209361, 209366, 209516, 209527, 209529, 209572, 186298, 209184, 186295, 209245, 177892, 217925, 176416, 210627, 219448, 209266, 209303, 209304, 209306, 209310, 209338, 209343, 209345, 209175, 209196, 209367, 209437, 209438, 209442, 209446, 209474, 209483, 209492, 209568, 209340, 234379, 176679, 197918, 177885, 209359, 209391, 209556, 209558, 193110, 177878, 177908, 209302, 209403, 190710, 214111, 209262, 209229, 209230, 209252, 209263, 209286, 209324, 209212, 193111, 209439, 209511, 209525, 209555, 209246, 209321, 177922, 193569, 189018, 209191, 209496, 209447, 240858, 177857, 223745, 188430, 258628, 209354, 209272, 193114, 193215, 209231, 209276, 209260, 208831, 219982, 209264, 209430))) 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 3808, 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: 2023-12-02 01:05:37 Duration: 17s181ms
-
with data as ( select distinct shl.id as record, 3801, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485) UNION ALL ( select distinct sol.id as record, 3801, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485)) UNION ALL ( select distinct sm.id as record, 3801, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (209380, 173241, 184675, 190567, 198387, 209518, 209232, 209206, 209177, 209358, 209398, 209440, 209441, 209452, 209459, 209460, 209462, 209532, 209309, 209425, 209250, 209271, 209277, 209422, 209323, 209193, 209308, 209270, 209183, 209265, 209475, 209456, 209241, 188456, 209186, 209316, 209195, 209374, 209326, 175893, 175890, 173771, 209235, 209243, 209260, 209278, 209307, 209314, 209331, 209188, 209181, 209179, 209510, 209180, 209327, 209194, 209360, 209365, 209563, 179979, 209228, 209259, 209279, 209284, 209298, 209312, 209322, 209325, 209220, 209396, 209412, 209484, 209497, 209520, 209549, 193529, 209469, 209254, 178710, 209233, 209333, 209416, 209435, 209512, 209538, 239268, 209225, 209226, 209256, 209190, 209332, 209561, 209562, 209503, 209471, 209315, 189098, 209423, 209468, 177173, 209379, 209305, 209370, 178705, 209227, 209329, 209344, 209210, 209352, 209569, 228221, 209513, 209207, 175876, 209253, 209264, 209267, 209269, 209272, 209276, 209282, 209189, 209199, 209182, 209176, 209203, 209413, 209414, 209415, 209457, 209479, 209482, 209526, 209537, 209201, 209219, 209390, 209392, 209427, 209470, 209517, 209519, 209521, 209261, 209268, 209339, 209391, 209231, 209255, 209318, 209356, 209357, 209418, 209354, 209421, 209466, 209559, 209245, 209384, 209437, 209447, 209555, 209198, 209216, 209505, 209567, 209572, 209367, 209347, 209430, 209251, 209324, 209361, 209366, 209474, 209511, 186099, 209229, 209359, 209496, 209527, 209558, 209211, 209439, 209477, 209478, 209498, 209257, 209382, 209545, 239344, 209311, 209338, 222244, 209628, 209246, 209262, 209263, 209266, 209302, 209303, 209304, 209306, 209310, 209343, 209345, 209175, 209184, 209191, 209212, 209403, 209438, 209442, 209446, 209483, 209492, 209528, 209529, 209568, 209321, 209340, 209221, 209230, 209252, 209275, 209286, 209313, 209205, 209196, 209389, 209502, 209516, 209525, 209546, 209556, 209570, 209372, 204971, 239141, 209200, 209334, 209473, 209506, 209565, 209480, 209209, 209424, 245930, 209247, 209258, 209393, 209464, 209493, 209494, 209514, 209515, 209566, 209571, 222245, 209342, 209330, 209239, 209244, 209299, 209317, 209346, 209185, 209192, 209178, 209362, 209433, 209436, 209451, 209491, 209499, 209501, 209507, 209531, 209554, 209560, 209234, 209320, 209328, 209381, 209487, 209509, 185856, 209573, 209378, 209187, 209242, 209495, 209524, 238911, 209236, 209238, 209335, 209172, 209173, 209174, 209197, 197240, 209445, 209434, 209281, 209202, 209488, 209319, 209273, 209280, 209214, 209472, 209485))) 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 3801, 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: 2023-12-02 00:30:26 Duration: 15s346ms
-
with data as ( select distinct shl.id as record, 3810, 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 >= '2017-12-02 00:00:00' and shl.invoice_date <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393) UNION ALL ( select distinct sol.id as record, 3810, 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 >= '2017-12-02 00:00:00' and so.date_order <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393)) UNION ALL ( select distinct sm.id as record, 3810, 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 >= '2017-12-02 00:00:00' and mrp.create_date <= '2023-12-02 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 (209518, 186294, 209261, 209201, 209176, 209413, 209370, 209390, 209269, 209357, 209537, 209519, 209457, 186249, 209226, 209253, 209199, 209190, 213335, 213290, 209189, 209182, 209418, 209466, 217253, 176066, 209254, 209210, 209231, 209503, 190227, 228221, 209227, 209329, 209513, 209561, 209569, 183566, 209264, 209267, 209305, 209332, 209344, 209202, 209203, 209219, 209414, 209526, 209559, 244601, 245563, 209562, 209255, 209276, 209318, 209339, 209352, 209356, 209392, 209415, 209479, 209517, 209521, 216961, 209470, 209225, 209256, 209268, 209272, 209282, 209421, 209482, 209488, 197240, 209445, 209379, 210625, 209206, 209427, 209186, 209452, 209484, 209193, 209520, 209323, 209270, 209308, 209312, 209412, 209563, 186184, 252885, 209316, 214527, 209468, 213330, 209326, 209298, 209510, 209497, 209538, 209532, 210622, 209243, 209232, 209233, 209322, 209333, 209416, 209456, 209469, 209475, 209235, 240896, 209228, 209325, 209331, 209207, 209220, 206509, 209271, 209277, 209309, 209180, 209181, 209195, 209179, 209183, 209177, 209396, 209423, 209425, 209434, 209194, 209358, 209360, 209365, 209440, 209441, 209459, 209462, 209512, 209422, 174240, 209241, 209250, 209259, 209260, 209265, 209284, 209314, 209315, 209319, 209327, 209435, 183563, 246016, 186186, 250941, 209239, 209258, 209200, 209424, 209480, 209451, 209278, 209279, 209307, 209187, 209460, 250940, 209398, 217072, 176058, 209372, 209320, 209335, 209515, 209380, 250872, 209433, 245930, 209571, 209499, 209234, 209236, 209346, 209185, 209192, 209214, 209464, 209493, 209507, 209514, 209573, 209378, 209238, 209485, 184010, 209247, 209491, 209342, 209473, 209495, 209554, 176205, 252547, 209509, 209565, 209334, 218035, 171850, 209317, 209173, 209174, 209197, 209209, 209501, 209531, 209566, 211671, 209328, 209330, 209178, 209362, 209436, 209560, 209244, 209280, 209172, 209494, 209524, 217254, 209257, 246017, 247335, 193387, 209242, 209381, 209487, 209506, 209472, 209273, 209299, 209198, 209212, 209211, 209505, 209572, 209545, 209511, 209556, 209568, 209570, 209478, 209498, 209246, 209251, 186295, 209382, 239344, 173241, 172690, 209252, 209311, 209361, 209384, 209437, 209438, 209446, 209527, 209528, 209529, 207553, 209502, 209221, 209310, 209313, 209447, 209229, 209263, 209303, 209304, 209306, 209338, 209340, 209359, 209367, 209439, 209230, 209262, 209347, 209366, 209245, 209302, 209343, 209345, 209175, 209184, 209191, 209196, 209216, 209474, 209546, 209567, 209286, 209391, 209555, 209558, 185978, 209403, 209324, 209483, 209516, 209389, 209442, 209496, 209477, 210620, 185979, 209266, 209354, 209188, 209430, 209374, 209321, 209492, 209525, 209393))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3810, 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: 2023-12-02 01:27:55 Duration: 14s758ms
5 1s246ms 33s820ms 6s65ms 45 4m32s delete from account_move_line where id in (...);Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Dec 02 03 6 37s969ms 6s328ms 06 15 2m27s 9s808ms 07 6 38s17ms 6s336ms 14 11 14s267ms 1s297ms 15 2 2s504ms 1s252ms 17 1 1s270ms 1s270ms 23 4 31s773ms 7s943ms -
DELETE FROM account_move_line WHERE id IN (3702577, 3702578, 3702579, 3702580, 3702581, 3702582, 3702583, 3702584, 3702585, 3702586, 3702587, 3702588, 3702589, 3702590, 3702591, 3702592, 3702593, 3702594, 3702595, 3702596, 3702597, 3702598, 3702599, 3702600, 3702601, 3717575, 3717576);
Date: 2023-12-02 06:08:47 Duration: 33s820ms
-
DELETE FROM account_move_line WHERE id IN (3691814, 3691815, 3691816, 3691817, 3691818, 3691819, 3691820, 3691821, 3691822, 3691823, 3691824, 3691825, 3709842, 3709843);
Date: 2023-12-02 06:07:09 Duration: 17s535ms
-
DELETE FROM account_move_line WHERE id IN (3712915, 3712916, 3712917, 3712918, 3712919, 3712920, 3712921, 3712910, 3712911, 3712912, 3712913, 3712914);
Date: 2023-12-02 06:00:52 Duration: 15s154ms
6 1s9ms 8s996ms 2s669ms 284 12m38s select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Dec 02 00 284 12m38s 2s669ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209375)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3796)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:02:42 Duration: 8s996ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209857)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3798)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:04:16 Duration: 8s725ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 209609)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3798)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2023-12-02 00:02:42 Duration: 8s613ms
7 2s133ms 5s696ms 2s250ms 10,719 6h42m1s 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 #7
Day Hour Count Duration Avg duration Dec 02 00 109 7m3s 3s889ms 16 948 35m57s 2s276ms 17 1,413 52m34s 2s232ms 18 1,412 52m31s 2s231ms 19 1,414 52m23s 2s223ms 20 1,414 52m29s 2s227ms 21 1,415 52m31s 2s227ms 22 1,413 52m37s 2s234ms 23 1,181 43m51s 2s228ms -
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 = 210004 and item_demand_plan_id = 3799;
Date: 2023-12-02 00:02:39 Duration: 5s696ms
-
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 = 210023 and item_demand_plan_id = 3792;
Date: 2023-12-02 00:05:08 Duration: 5s567ms
-
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 = 210093 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:04:10 Duration: 5s486ms
8 2s110ms 2s391ms 2s183ms 1,080 39m18s 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 Dec 02 00 508 18m17s 2s160ms 01 560 20m33s 2s202ms 02 12 27s129ms 2s260ms -
update item_list_line set product_id = 172999, supercede_product_id = 172992, superceded = True where product_id = 172992 and item_demand_plan_id = 3810;
Date: 2023-12-02 01:40:01 Duration: 2s391ms
-
update item_list_line set product_id = 251688, supercede_product_id = 206029, superceded = True where product_id = 206029 and item_demand_plan_id = 3804;
Date: 2023-12-02 00:49:26 Duration: 2s346ms
-
update item_list_line set product_id = 226040, supercede_product_id = 242275, superceded = True where product_id = 242275 and item_demand_plan_id = 3811;
Date: 2023-12-02 02:00:09 Duration: 2s330ms
9 962ms 6s666ms 1s652ms 81 2m13s select distinct ill.product_id from item_list_line as ill left join res_forecast_method as fm on fm.id = ill.method where ill.item_demand_plan_id = ? and ill.method not in (...);Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Dec 02 00 58 1m49s 1s884ms 16 23 24s567ms 1s68ms -
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 = 3795 and ill.method not in (8, 7);
Date: 2023-12-02 00:01:05 Duration: 6s666ms
-
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 = 3794 and ill.method not in (8, 7);
Date: 2023-12-02 00:05:59 Duration: 6s26ms
-
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 = 3797 and ill.method not in (8, 7);
Date: 2023-12-02 00:02:28 Duration: 4s637ms
10 837ms 6s505ms 1s569ms 81 2m7s select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Dec 02 00 58 1m43s 1s779ms 16 23 23s968ms 1s42ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3799 and active = True;
Date: 2023-12-02 00:01:13 Duration: 6s505ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3798 and active = True;
Date: 2023-12-02 00:02:31 Duration: 6s134ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3796 and active = True;
Date: 2023-12-02 00:05:09 Duration: 6s18ms
11 829ms 5s643ms 1s363ms 81 1m50s select ill.item_demand_plan_id from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where ill.method is null and idp.active = true and ill.item_demand_plan_id = ? group by ill.item_demand_plan_id having count(ill.id) > ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Dec 02 00 58 1m28s 1s519ms 16 23 22s323ms 970ms -
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 = 3795 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:00:58 Duration: 5s643ms
-
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 = 3800 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:03:07 Duration: 4s800ms
-
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 = 3794 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2023-12-02 00:05:53 Duration: 3s524ms
12 731ms 5s175ms 1s260ms 81 1m42s select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Dec 02 00 58 1m22s 1s426ms 16 23 19s385ms 842ms -
select count(id) from item_list_line where item_demand_plan_id = 3795;
Date: 2023-12-02 00:00:53 Duration: 5s175ms
-
select count(id) from item_list_line where item_demand_plan_id = 3794;
Date: 2023-12-02 00:05:50 Duration: 4s978ms
-
select count(id) from item_list_line where item_demand_plan_id = 3800;
Date: 2023-12-02 00:03:02 Duration: 3s833ms
13 743ms 5s587ms 980ms 1,621 26m29s 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 Dec 02 00 127 5m22s 2s540ms 02 1,036 14m42s 852ms 16 458 6m23s 837ms -
select id from item_list_line where product_id = 210040 and item_demand_plan_id = 3792;
Date: 2023-12-02 00:04:16 Duration: 5s587ms
-
select id from item_list_line where product_id = 209912 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:01:17 Duration: 5s407ms
-
select id from item_list_line where product_id = 209965 and item_demand_plan_id = 3795;
Date: 2023-12-02 00:03:00 Duration: 5s404ms
14 788ms 6s93ms 876ms 12,687 3h5m25s 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 #14
Day Hour Count Duration Avg duration Dec 02 00 492 15m37s 1s905ms 02 1,009 15m1s 893ms 04 242 3m18s 818ms 16 1,254 18m4s 864ms 17 1,413 19m25s 824ms 18 1,439 19m50s 826ms 19 1,415 19m28s 825ms 20 1,414 19m30s 827ms 21 1,416 19m28s 825ms 22 1,412 19m27s 827ms 23 1,181 16m13s 824ms -
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 = 209982 and item_demand_plan_id = 3792 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: 2023-12-02 00:02:29 Duration: 6s93ms
-
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 = 210094 and item_demand_plan_id = 3795 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: 2023-12-02 00:03:52 Duration: 5s818ms
-
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 = 210011 and item_demand_plan_id = 3792 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: 2023-12-02 00:04:40 Duration: 5s728ms
15 305ms 987ms 437ms 1,622 11m49s select "product_warehouse_inventory".id from "product_warehouse_inventory" where ((("product_warehouse_inventory"."inventory_vendor_id" = ?) and ("product_warehouse_inventory"."product_id" = ?)) and ((("product_warehouse_inventory"."is_active" = true) and (("product_warehouse_inventory"."has_core" = true) or (("product_warehouse_inventory"."has_core" is null or "product_warehouse_inventory"."has_core" = false) and ("product_warehouse_inventory"."is_core" is null or "product_warehouse_inventory"."is_core" = false)))) and ("product_warehouse_inventory"."branch_id" in ( select "res_branch".id from "res_branch" where (unaccent ("res_branch"."name"::text) ilike unaccent (?)) and true)))) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Dec 02 00 1,622 11m49s 437ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3103) AND ("product_warehouse_inventory"."product_id" = 192721)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:05:03 Duration: 987ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3098) AND ("product_warehouse_inventory"."product_id" = 189106)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:00:55 Duration: 979ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ((("product_warehouse_inventory"."inventory_vendor_id" = 3098) AND ("product_warehouse_inventory"."product_id" = 188494)) AND ((("product_warehouse_inventory"."is_active" = true) AND (("product_warehouse_inventory"."has_core" = true) OR (("product_warehouse_inventory"."has_core" IS NULL or "product_warehouse_inventory"."has_core" = false) AND ("product_warehouse_inventory"."is_core" IS NULL or "product_warehouse_inventory"."is_core" = false)))) AND ("product_warehouse_inventory"."branch_id" in ( SELECT "res_branch".id FROM "res_branch" WHERE (unaccent ("res_branch"."name"::text) ilike unaccent ('%castle%')) AND TRUE)))) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2023-12-02 00:01:13 Duration: 926ms
16 295ms 1s162ms 390ms 1,780 11m34s select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Dec 02 00 708 5m52s 497ms 12 99 31s365ms 316ms 13 301 1m32s 308ms 14 155 47s377ms 305ms 15 41 12s573ms 306ms 16 179 1m 340ms 17 132 42s306ms 320ms 18 107 35s250ms 329ms 19 46 15s636ms 339ms 20 12 3s723ms 310ms -
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: 2023-12-02 00:02:25 Duration: 1s162ms
-
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: 2023-12-02 00:03:49 Duration: 1s140ms
-
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: 2023-12-02 00:02:34 Duration: 1s108ms
17 120ms 951ms 302ms 258 1m18s select id from ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and date::date = date ?::timestamp and item_demand_plan_id = ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) t where t.rnum > ?;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Dec 02 00 258 1m18s 302ms -
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 209706 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3798 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:03:50 Duration: 951ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 209612 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3798 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:02:55 Duration: 888ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 210010 and date::date = DATE '2023-12-31T00:00:00'::timestamp and item_demand_plan_id = 3796 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2023-12-02 00:04:56 Duration: 869ms
18 120ms 694ms 251ms 1,693 7m5s 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 #18
Day Hour Count Duration Avg duration Dec 02 00 350 1m30s 258ms 01 15 3s130ms 208ms 02 140 34s161ms 244ms 03 91 19s973ms 219ms 04 60 13s494ms 224ms 05 84 20s606ms 245ms 06 78 18s407ms 235ms 07 45 10s848ms 241ms 08 45 10s595ms 235ms 09 23 5s488ms 238ms 10 26 5s281ms 203ms 11 17 3s677ms 216ms 12 20 4s440ms 222ms 13 24 5s101ms 212ms 14 40 11s289ms 282ms 15 92 25s928ms 281ms 16 113 29s153ms 257ms 17 156 37s438ms 239ms 18 35 7s620ms 217ms 19 92 28s751ms 312ms 20 47 14s427ms 306ms 21 27 7s834ms 290ms 23 73 17s951ms 245ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-01 23:59:13') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19566]', '["pointspring_master","mail.channel",242]', '["pointspring_master","mail.channel",431]', '["pointspring_master","mail.channel",505]', '["pointspring_master","mail.channel",523]', '["pointspring_master","res.partner",19566]', '["pointspring_master","ir.needaction",19566]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:00:04 Duration: 694ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-02 00:02:13') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_952"', '["pointspring_master","calendar.alarm",19490]', '["pointspring_master","mail.channel",68]', '["pointspring_master","mail.channel",70]', '["pointspring_master","mail.channel",522]', '["pointspring_master","res.partner",19490]', '["pointspring_master","ir.needaction",19490]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:03:04 Duration: 610ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2023-12-02 00:00:17') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19507]', '["pointspring_master","mail.channel",78]', '["pointspring_master","mail.channel",79]', '["pointspring_master","mail.channel",80]', '["pointspring_master","mail.channel",81]', '["pointspring_master","mail.channel",82]', '["pointspring_master","mail.channel",527]', '["pointspring_master","res.partner",19507]', '["pointspring_master","ir.needaction",19507]'))) ORDER BY "bus_bus"."id";
Date: 2023-12-02 00:01:07 Duration: 606ms
19 171ms 304ms 183ms 102 18s755ms select res_partner.id from "res_partner" where ("res_partner"."active" = true) and (((("res_partner"."partner_share" is null or "res_partner"."partner_share" = false) or ("res_partner"."company_id" in (...))) or "res_partner"."company_id" is null) and (((("res_partner"."type" != ?) or "res_partner"."type" is null) or "res_partner"."type" is null) or ("res_partner"."type" = ?))) and (unaccent (res_partner.email) ilike unaccent (?) or unaccent (res_partner.display_name) ilike unaccent (?) or unaccent (res_partner.ref) ilike unaccent (?) or unaccent (res_partner.vat) ilike unaccent (?)) unaccent (res_partner.display_name);Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Dec 02 16 55 10s117ms 183ms 17 47 8s637ms 183ms -
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%X-BILL-04661%') OR unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-04661%') OR unaccent (res_partner.ref) ilike unaccent ('%X-BILL-04661%') OR unaccent (res_partner.vat) ilike unaccent ('X-BILL-04661')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-04661%') desc, unaccent (res_partner.display_name);
Date: 2023-12-02 16:49:45 Duration: 304ms
-
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%X-BILL-04663%') OR unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-04663%') OR unaccent (res_partner.ref) ilike unaccent ('%X-BILL-04663%') OR unaccent (res_partner.vat) ilike unaccent ('X-BILL-04663')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-04663%') desc, unaccent (res_partner.display_name);
Date: 2023-12-02 16:49:46 Duration: 273ms
-
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%X-BILL-00749%') OR unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-00749%') OR unaccent (res_partner.ref) ilike unaccent ('%X-BILL-00749%') OR unaccent (res_partner.vat) ilike unaccent ('X-BILL-00749')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%X-BILL-00749%') desc, unaccent (res_partner.display_name);
Date: 2023-12-02 16:50:18 Duration: 251ms
20 120ms 901ms 164ms 137 22s498ms 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 #20
Day Hour Count Duration Avg duration Dec 02 00 15 6s497ms 433ms 03 6 783ms 130ms 06 83 10s649ms 128ms 07 14 1s834ms 131ms 23 19 2s732ms 143ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (41362)) AND (("account_move"."id" not in (1053869)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2023-12-02 00:00:32 Duration: 901ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (41311)) AND (("account_move"."id" not in (1054751)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2023-12-02 00:00:23 Duration: 827ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (41311)) AND (("account_move"."id" not in (1054751)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2023-12-02 00:00:21 Duration: 812ms
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
- 66,178 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 12552 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 10,934 Max number of times the same event was reported
- 12,552 Total events found
Rank Times reported Error 1 10,934 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Dec 02 00 232 01 432 02 426 03 465 04 468 05 467 06 490 07 526 08 504 09 474 10 472 11 466 12 464 13 473 14 467 15 465 16 464 17 469 18 465 19 470 20 460 21 465 22 469 23 381 - 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=45 FOR UPDATE NOWAIT
Date: 2023-12-02 12:50:11
2 1,616 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Dec 02 00 308 01 2 02 4 03 5 04 4 05 6 06 8 07 5 08 4 09 5 10 2 11 7 12 53 13 149 14 541 15 229 16 70 17 48 18 53 19 15 20 4 21 18 22 67 23 9 - 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 (3852352) FOR NO KEY UPDATE SKIP LOCKED )
Date: 2023-12-02 12:50:15
3 2 ERROR: current transaction is aborted, commands ignored until end of transaction block
Times Reported Most Frequent Error / Event #3
Day Hour Count Dec 02 13 1 14 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: 2023-12-02 13:19:15