-
Global information
- Generated on Sun Nov 3 19:50:06 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 394,094 log entries in 5s
- Log start from 2024-11-03 00:00:00 to 2024-11-03 23:59:58
-
Overview
Global Stats
- 218 Number of unique normalized queries
- 141,830 Number of queries
- 9h14m59s Total query duration
- 2024-11-03 00:00:00 First query
- 2024-11-03 23:59:58 Last query
- 24 queries/s at 2024-11-03 19:50:25 Query peak
- 9h14m59s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 9h14m59s Execute total duration
- 950 Number of events
- 2 Number of unique normalized events
- 943 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
- 141,830 Average queries per session
- 9h14m59s 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
- 24 queries/s Query Peak
- 2024-11-03 19:50:25 Date
SELECT Traffic
Key values
- 24 queries/s Query Peak
- 2024-11-03 19:50:25 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 5 queries/s Query Peak
- 2024-11-03 12:04:59 Date
Queries duration
Key values
- 9h14m59s 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) Nov 03 00 8,087 120ms 1s228ms 298ms 53s570ms 57s178ms 59s575ms 01 8,379 120ms 1s428ms 295ms 55s595ms 57s653ms 1m2s 02 5,779 120ms 1s520ms 243ms 40s72ms 52s99ms 1m12s 03 4,934 120ms 9s851ms 219ms 33s114ms 34s385ms 37s965ms 04 4,485 120ms 1s323ms 202ms 25s519ms 27s709ms 34s437ms 05 5,307 120ms 24s587ms 229ms 30s102ms 32s630ms 1m54s 06 4,648 120ms 1s743ms 206ms 27s487ms 29s511ms 35s396ms 07 5,587 120ms 793ms 224ms 30s123ms 34s626ms 38s841ms 08 4,719 121ms 1s289ms 218ms 28s53ms 36s88ms 37s428ms 09 4,136 120ms 739ms 201ms 26s308ms 30s224ms 39s7ms 10 6,300 120ms 3m56s 359ms 1m18s 2m8s 4m6s 11 11,530 120ms 2s15ms 225ms 56s19ms 57s59ms 1m9s 12 6,641 120ms 2s309ms 214ms 50s693ms 54s306ms 1m3s 13 4,011 120ms 9s982ms 194ms 29s794ms 31s899ms 38s982ms 14 4,505 120ms 801ms 218ms 28s430ms 31s710ms 34s463ms 15 3,591 120ms 1s289ms 176ms 17s279ms 20s536ms 31s957ms 16 4,211 120ms 1s665ms 185ms 23s537ms 25s433ms 28s408ms 17 5,442 120ms 1s248ms 217ms 29s178ms 31s473ms 39s894ms 18 6,550 120ms 1s222ms 230ms 33s576ms 38s839ms 43s280ms 19 6,172 120ms 1s6ms 228ms 35s293ms 37s576ms 42s86ms 20 6,485 120ms 2s249ms 230ms 35s406ms 38s146ms 49s432ms 21 6,703 120ms 832ms 227ms 35s881ms 41s75ms 41s763ms 22 6,633 120ms 802ms 229ms 36s340ms 42s82ms 49s384ms 23 6,995 120ms 6s148ms 228ms 36s919ms 39s560ms 40s491ms Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Nov 03 00 7,029 0 322ms 47s724ms 51s157ms 56s585ms 01 7,319 0 318ms 49s428ms 53s176ms 59s2ms 02 5,554 0 247ms 32s555ms 38s94ms 51s90ms 03 4,934 0 219ms 29s333ms 33s114ms 37s427ms 04 4,485 0 202ms 20s113ms 25s519ms 29s347ms 05 5,306 0 229ms 23s203ms 30s102ms 33s303ms 06 4,648 0 206ms 23s703ms 27s487ms 34s47ms 07 5,587 0 224ms 27s146ms 30s123ms 34s669ms 08 4,718 0 218ms 23s905ms 28s53ms 37s322ms 09 4,136 0 201ms 19s489ms 26s308ms 32s735ms 10 4,426 119 422ms 37s267ms 1m6s 2m34s 11 6,629 0 247ms 35s146ms 40s204ms 58s252ms 12 5,111 0 220ms 29s706ms 39s141ms 47s349ms 13 4,011 0 194ms 15s190ms 29s794ms 33s75ms 14 4,505 0 218ms 22s524ms 28s430ms 32s98ms 15 3,591 0 176ms 14s53ms 17s279ms 29s658ms 16 4,210 0 185ms 18s24ms 23s537ms 26s92ms 17 5,442 0 217ms 26s40ms 29s178ms 37s597ms 18 6,550 0 230ms 30s664ms 33s576ms 41s210ms 19 6,171 0 228ms 31s817ms 35s293ms 37s948ms 20 6,485 0 230ms 33s302ms 35s406ms 38s649ms 21 6,703 0 227ms 33s705ms 35s881ms 41s272ms 22 6,633 0 229ms 31s164ms 36s340ms 43s460ms 23 6,995 0 228ms 31s691ms 36s919ms 40s411ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Nov 03 00 0 0 0 0 0ms 0ms 0ms 0ms 01 0 1 0 0 434ms 0ms 0ms 0ms 02 0 1 0 0 344ms 0ms 0ms 0ms 03 0 0 0 0 0ms 0ms 0ms 0ms 04 0 0 0 0 0ms 0ms 0ms 0ms 05 0 0 1 0 524ms 0ms 0ms 0ms 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 0 0 0 0ms 0ms 0ms 0ms 08 0 1 0 0 1s289ms 0ms 0ms 0ms 09 0 0 0 0 0ms 0ms 0ms 0ms 10 0 1,755 0 0 194ms 0ms 13s650ms 26s92ms 11 0 4,901 0 0 195ms 16s369ms 21s466ms 36s444ms 12 0 1,530 0 0 195ms 0ms 12s510ms 23s41ms 13 0 0 0 0 0ms 0ms 0ms 0ms 14 0 0 0 0 0ms 0ms 0ms 0ms 15 0 0 0 0 0ms 0ms 0ms 0ms 16 0 1 0 0 193ms 0ms 0ms 0ms 17 0 0 0 0 0ms 0ms 0ms 0ms 18 0 0 0 0 0ms 0ms 0ms 0ms 19 0 0 0 0 0ms 0ms 0ms 0ms 20 0 0 0 0 0ms 0ms 0ms 0ms 21 0 0 0 0 0ms 0ms 0ms 0ms 22 0 0 0 0 0ms 0ms 0ms 0ms 23 0 0 0 0 0ms 0ms 0ms 0ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Nov 03 00 0 0 0.00 0.00% 01 0 0 0.00 0.00% 02 0 0 0.00 0.00% 03 0 0 0.00 0.00% 04 0 0 0.00 0.00% 05 0 0 0.00 0.00% 06 0 0 0.00 0.00% 07 0 0 0.00 0.00% 08 0 0 0.00 0.00% 09 0 0 0.00 0.00% 10 0 0 0.00 0.00% 11 0 0 0.00 0.00% 12 0 0 0.00 0.00% 13 0 0 0.00 0.00% 14 0 0 0.00 0.00% 15 0 0 0.00 0.00% 16 0 0 0.00 0.00% 17 0 0 0.00 0.00% 18 0 0 0.00 0.00% 19 0 0 0.00 0.00% 20 0 0 0.00 0.00% 21 0 0 0.00 0.00% 22 0 0 0.00 0.00% 23 0 0 0.00 0.00% Day Hour Count Average / Second Nov 03 00 0 0.00/s 01 0 0.00/s 02 0 0.00/s 03 0 0.00/s 04 0 0.00/s 05 0 0.00/s 06 0 0.00/s 07 0 0.00/s 08 0 0.00/s 09 0 0.00/s 10 0 0.00/s 11 0 0.00/s 12 0 0.00/s 13 0 0.00/s 14 0 0.00/s 15 0 0.00/s 16 0 0.00/s 17 0 0.00/s 18 0 0.00/s 19 0 0.00/s 20 0 0.00/s 21 0 0.00/s 22 0 0.00/s 23 0 0.00/s Day Hour Count Average Duration Average idle time Nov 03 00 0 0ms 0ms 01 0 0ms 0ms 02 0 0ms 0ms 03 0 0ms 0ms 04 0 0ms 0ms 05 0 0ms 0ms 06 0 0ms 0ms 07 0 0ms 0ms 08 0 0ms 0ms 09 0 0ms 0ms 10 0 0ms 0ms 11 0 0ms 0ms 12 0 0ms 0ms 13 0 0ms 0ms 14 0 0ms 0ms 15 0 0ms 0ms 16 0 0ms 0ms 17 0 0ms 0ms 18 0 0ms 0ms 19 0 0ms 0ms 20 0 0ms 0ms 21 0 0ms 0ms 22 0 0ms 0ms 23 0 0ms 0ms -
Connections
Established Connections
Key values
- 0 connections Connection Peak
- Date
Connections per database
Key values
- unknown Main Database
- 0 connections Total
Connections per user
Key values
- unknown Main User
- 0 connections Total
-
Sessions
Simultaneous sessions
Key values
- 0 sessions Session Peak
- Date
Histogram of session times
Key values
- duration
Sessions per database
Key values
- unknown Main Database
- 0 sessions Total
Sessions per user
Key values
- unknown Main User
- 0 sessions Total
Sessions per host
Key values
- unknown Main Host
- 0 sessions Total
-
Checkpoints / Restartpoints
Checkpoints Buffers
Key values
- 0 buffers Checkpoint Peak
- Date
- seconds Highest write time
- seconds Sync time
Checkpoint write buffers (5 minutes period)
NO DATASET
Checkpoints Wal files
Key values
- 0 files Wal files usage Peak
- Date
Checkpoint Wal files usage (5 minutes period)
NO DATASET
Checkpoints distance
Key values
- 0 Mo Distance Peak
- Date
Checkpoints Activity
Day Hour Written buffers Write time Sync time Total time Nov 03 00 0 0s 0s 0s 01 0 0s 0s 0s 02 0 0s 0s 0s 03 0 0s 0s 0s 04 0 0s 0s 0s 05 0 0s 0s 0s 06 0 0s 0s 0s 07 0 0s 0s 0s 08 0 0s 0s 0s 09 0 0s 0s 0s 10 0 0s 0s 0s 11 0 0s 0s 0s 12 0 0s 0s 0s 13 0 0s 0s 0s 14 0 0s 0s 0s 15 0 0s 0s 0s 16 0 0s 0s 0s 17 0 0s 0s 0s 18 0 0s 0s 0s 19 0 0s 0s 0s 20 0 0s 0s 0s 21 0 0s 0s 0s 22 0 0s 0s 0s 23 0 0s 0s 0s Day Hour Added Removed Recycled Synced files Longest sync Average sync Nov 03 00 0 0 0 0 0s 0s 01 0 0 0 0 0s 0s 02 0 0 0 0 0s 0s 03 0 0 0 0 0s 0s 04 0 0 0 0 0s 0s 05 0 0 0 0 0s 0s 06 0 0 0 0 0s 0s 07 0 0 0 0 0s 0s 08 0 0 0 0 0s 0s 09 0 0 0 0 0s 0s 10 0 0 0 0 0s 0s 11 0 0 0 0 0s 0s 12 0 0 0 0 0s 0s 13 0 0 0 0 0s 0s 14 0 0 0 0 0s 0s 15 0 0 0 0 0s 0s 16 0 0 0 0 0s 0s 17 0 0 0 0 0s 0s 18 0 0 0 0 0s 0s 19 0 0 0 0 0s 0s 20 0 0 0 0 0s 0s 21 0 0 0 0 0s 0s 22 0 0 0 0 0s 0s 23 0 0 0 0 0s 0s Day Hour Count Avg time (sec) Nov 03 00 0 0s 01 0 0s 02 0 0s 03 0 0s 04 0 0s 05 0 0s 06 0 0s 07 0 0s 08 0 0s 09 0 0s 10 0 0s 11 0 0s 12 0 0s 13 0 0s 14 0 0s 15 0 0s 16 0 0s 17 0 0s 18 0 0s 19 0 0s 20 0 0s 21 0 0s 22 0 0s 23 0 0s Day Hour Mean distance Mean estimate Nov 03 00 0.00 kB 0.00 kB 01 0.00 kB 0.00 kB 02 0.00 kB 0.00 kB 03 0.00 kB 0.00 kB 04 0.00 kB 0.00 kB 05 0.00 kB 0.00 kB 06 0.00 kB 0.00 kB 07 0.00 kB 0.00 kB 08 0.00 kB 0.00 kB 09 0.00 kB 0.00 kB 10 0.00 kB 0.00 kB 11 0.00 kB 0.00 kB 12 0.00 kB 0.00 kB 13 0.00 kB 0.00 kB 14 0.00 kB 0.00 kB 15 0.00 kB 0.00 kB 16 0.00 kB 0.00 kB 17 0.00 kB 0.00 kB 18 0.00 kB 0.00 kB 19 0.00 kB 0.00 kB 20 0.00 kB 0.00 kB 21 0.00 kB 0.00 kB 22 0.00 kB 0.00 kB 23 0.00 kB 0.00 kB -
Temporary Files
Size of temporary files
Key values
- 0 Temp Files size Peak
- Date
Size of temporary files (5 minutes period)
NO DATASET
Number of temporary files
Key values
- 0 per second Temp Files Peak
- Date
Number of temporary files (5 minutes period)
NO DATASET
Temporary Files Activity
Day Hour Count Total size Average size Nov 03 00 0 0 0 01 0 0 0 02 0 0 0 03 0 0 0 04 0 0 0 05 0 0 0 06 0 0 0 07 0 0 0 08 0 0 0 09 0 0 0 10 0 0 0 11 0 0 0 12 0 0 0 13 0 0 0 14 0 0 0 15 0 0 0 16 0 0 0 17 0 0 0 18 0 0 0 19 0 0 0 20 0 0 0 21 0 0 0 22 0 0 0 23 0 0 0 -
Vacuums
Vacuums / Analyzes Distribution
Key values
- 0 sec Highest CPU-cost vacuum
Table
Database - Date
- 0 sec Highest CPU-cost analyze
Table
Database - Date
Autovacuum actions (5 minutes period)
NO DATASET
Average Autovacuum Duration
Key values
- 0 sec Highest CPU-cost vacuum
Table
Database - Date
Average Autovacuum Duration (5 minutes average)
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 Nov 03 00 0 0 01 0 0 02 0 0 03 0 0 04 0 0 05 0 0 06 0 0 07 0 0 08 0 0 09 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 - 0 sec Highest CPU-cost vacuum
-
Locks
Locks by types
Key values
- 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
- 131,178 Total read queries
- 10,652 Total write queries
Queries by database
Key values
- unknown Main database
- 141,830 Requests
- 9h14m59s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 143,366 Requests
User Request type Count Duration unknown Total 143,366 9h22m41s copy to 119 14m2s cte 2,519 5m40s delete 1 524ms select 132,537 8h36m17s update 8,190 26m40s Duration by user
Key values
- 9h22m41s (unknown) Main time consuming user
User Request type Count Duration unknown Total 143,366 9h22m41s copy to 119 14m2s cte 2,519 5m40s delete 1 524ms select 132,537 8h36m17s update 8,190 26m40s Queries by host
Key values
- unknown Main host
- 143,366 Requests
- 9h22m41s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 141,830 Requests
- 9h14m59s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-11-03 07:35:33 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 137,524 100-500ms duration
Slowest individual queries
Rank Duration Query 1 3m56s COPY public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-11-03 10:10:49 ]
2 2m21s COPY public.item_list_line (id, item_demand_plan_id, product_id, selling_branch, product_uom_qty, invoice_date, warehouse_id, method, inventory_vendor_id, create_uid, create_date, write_uid, write_date, active, min_product_len_1, min_product_len_2, min_baseline_size, seasonal_period, supercede_product_id, superceded, campaign_id, source_id, medium_id, message_main_attachment_id, access_token, ref_id, ref) TO stdout;[ Date: 2024-11-03 10:04:37 ]
3 2m1s COPY public.mail_message (id, subject, date, body, parent_id, model, res_id, record_name, message_type, subtype_id, mail_activity_type_id, is_internal, email_from, author_id, no_auto_thread, message_id, reply_to, mail_server_id, moderation_status, moderator_id, email_layout_xmlid, add_sign, create_uid, create_date, write_uid, write_date, email_cc, email_bcc, email_to, ks_email_cc_string, ks_email_bcc_string, ks_cc_partners, ks_bcc_partners) TO stdout;[ Date: 2024-11-03 10:06:51 ]
4 1m20s select count(id) from item_list_line where item_demand_plan_id = 3943;[ Date: 2024-11-03 10:37:51 ]
5 41s967ms COPY public.account_move_line (id, move_id, move_name, date, ref, parent_state, journal_id, company_id, company_currency_id, account_id, account_root_id, sequence, name, quantity, price_unit, discount, debit, credit, balance, amount_currency, price_subtotal, price_total, reconciled, blocked, date_maturity, currency_id, partner_id, product_uom_id, product_id, reconcile_model_id, payment_id, statement_line_id, statement_id, tax_line_id, tax_group_id, tax_base_amount, tax_exigible, tax_repartition_line_id, tax_audit, amount_residual, amount_residual_currency, full_reconcile_id, matching_number, analytic_account_id, display_type, is_rounding_line, exclude_from_invoice_tab, create_uid, create_date, write_uid, write_date, expected_pay_date, internal_note, next_action_date, followup_line_id, followup_date, is_anglo_saxon_line, purchase_line_id, branch_id, branch_name, vehicle_id, move_options, sign_product_qty, sign_price_subtotal, new_product_qty, sale_line_id, child_sale_line_id, main_invoice_line_id, core_bank_transaction, is_rtv_line, core_qty, rebate_amount, cost_price, is_visible_in_report, is_labour, can_be_paid, bal_core_bank_id, repair_line_id, inv_back_order_qty, sale_back_order_qty, product_pricelist_item_id, is_discount, is_sale_tax, auto_reconcile, is_writeoff, is_extra_line, is_carry_forward, reconcile_date_from_add) TO stdout;[ Date: 2024-11-03 10:01:07 ]
6 24s587ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-11-03 05:33:36 ]
7 24s539ms COPY public.sale_history_line (id, history_data_link, company_id, customer_id, product_id, invoice_id, product_name, name, product_uom_qty, price_unit, cost_price_unit, price_subtotal, cost_subtotal, gross_profit, rebate_amount, rebate_subtotal, invoice_item_no, inventory_product_categ, inventory_part_type, inventory_short_vendor_name, currency_id, core_sales_amount, core_cost_amount, labor_amount, serial_number, labor_flag, note, under_warranty, contact_reference, contact_name, selling_branch, vehicle_unit_no, vehicle_identification_number, vehicle_odometer, customer_reference_no, sales_obtain, sale_order_no, sale_order_date, invoice_number, invoice_date, user_id, exception_sale, create_uid, create_date, write_uid, write_date, product_pricelist_item_id, history_id, history_date, history_type, so_line_id, new_user_id, gross_profit_amount, is_shipping, move_options, manufacturing_usage, technician_id, inventory_vendor_id, product_type, current_branch, pricelist_id, product_pricelist_item_name, pricelist_name) TO stdout;[ Date: 2024-11-03 10:13:19 ]
8 23s732ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-11-03 05:33:36 ]
9 23s168ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-11-03 05:33:36 ]
10 22s219ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-11-03 05:33:36 ]
11 19s374ms COPY public.base_import_import (id, res_model, file, file_name, file_type, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-11-03 10:01:36 ]
12 17s848ms COPY public.account_move (id, access_token, message_main_attachment_id, name, date, ref, narration, state, posted_before, move_type, to_check, journal_id, company_id, currency_id, partner_id, commercial_partner_id, is_move_sent, partner_bank_id, payment_reference, payment_id, statement_line_id, amount_untaxed, amount_tax, amount_total, amount_residual, amount_untaxed_signed, amount_tax_signed, amount_total_signed, amount_residual_signed, payment_state, tax_cash_basis_rec_id, tax_cash_basis_move_id, auto_post, reversed_entry_id, fiscal_position_id, invoice_user_id, invoice_date, invoice_date_due, invoice_origin, invoice_payment_term_id, invoice_incoterm_id, qr_code_method, invoice_source_email, invoice_partner_display_name, invoice_cash_rounding_id, secure_sequence_number, inalterable_hash, sequence_prefix, sequence_number, create_uid, create_date, write_uid, write_date, payment_state_before_switch, duplicated_vendor_ref, extract_state, extract_status_code, extract_remote_id, transfer_model_id, tax_closing_end_date, tax_report_control_error, asset_id, asset_remaining_value, asset_depreciated_value, asset_manually_modified, asset_value_change, campaign_id, source_id, medium_id, team_id, partner_shipping_id, stock_move_id, preferred_payment_method_id, website_id, branch_id, branch_name, invoice_action, sign_amount_total, sign_amount_residual, sign_amount_untaxed, invoice_part_id, invoice_product_qty, balance_entry, to_check_negative, non_inventory_entry, direct_order, warranty_invoice, email_send_eod, email_sent, order_type, carrier_id, release_to_pay, release_to_pay_manual, force_release_to_pay, invoice_origin_new, debit_origin_id, paid_by_vc, payment_details, expense_choice, edi_810_id, cash_tendered, change_amount, sequence_generated, open_invoice, edi_split_lock, edi_billed, is_edi_bill, payment_details_compute, edi_done_date, partner_address_type, from_ar, auto_reconcile, related_payment_id, discount_amount_applied) TO stdout;[ Date: 2024-11-03 10:00:24 ]
13 13s44ms COPY public.price_sheet (id, price_sheet_control_id, inventory_vendor_id, vendor_short_name, part_type_id, part_type_option, default_code, name, description_sale, description, additional_description_sale, condensed_product_name, manufacturer_product_name, weight, uom_id, standard_price, current_cost, rebate_cost, purchase_cost, list_price, better, best, list_jobber, core_part_no, cores_per_part, core_cost, core_price_part_dmg_1, core_price_part_dmg_2, used_core_description, man_cost_update, call_for_prise, product_update_date, standard_carton_quantity, active, volume, is_exception, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-11-03 10:11:03 ]
14 12s421ms COPY public.bus_bus (id, channel, message, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-11-03 10:01:49 ]
15 11s770ms COPY public.stock_move (id, name, sequence, priority, create_date, date, date_deadline, company_id, product_id, description_picking, product_qty, product_uom_qty, product_uom, location_id, location_dest_id, partner_id, picking_id, note, state, price_unit, origin, procure_method, scrapped, group_id, rule_id, propagate_cancel, delay_alert_date, picking_type_id, inventory_id, origin_returned_move_id, restrict_partner_id, warehouse_id, additional, reference, package_level_id, next_serial, next_serial_count, orderpoint_id, create_uid, write_uid, write_date, to_refund, sale_line_id, purchase_line_id, created_purchase_line_id, is_done, created_production_id, production_id, raw_material_production_id, unbuild_id, consume_unbuild_id, operation_id, workorder_id, bom_line_id, byproduct_id, unit_factor, branch_id, weight, move_options, related_core_sale_line_id, related_core_purchase_line_id, sm_line_id, core_qty, bom_action, mrp_core_move, repair_id, repair_line_id, related_core_repair_line_id, related_bom_line_id, mrp_finish_core_move, picking_code, transfer_line_id, src_warehouse_id, dest_warehouse_id, current_warehouse_qty, is_core, inventory_vendor_id, technician_name_required, technician_id, product_cost) TO stdout;[ Date: 2024-11-03 10:13:47 ]
16 11s456ms COPY public.queue_job (id, uuid, graph_uuid, user_id, company_id, name, model_name, method_name, records, dependencies, args, kwargs, func_string, state, priority, exc_name, exc_message, exc_info, result, date_created, date_started, date_enqueued, date_done, exec_time, date_cancelled, eta, retry, max_retries, channel_method_name, job_function_id, channel, identity_key, worker_pid, sale_id, picking_id, repair_id, message_main_attachment_id) TO stdout;[ Date: 2024-11-03 10:12:43 ]
17 9s982ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 19489)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-11-03 13:53:32 ]
18 9s851ms SELECT "queue_job".id FROM "queue_job" WHERE ((("queue_job"."date_done" <= '2024-10-04 03:39:14.554672') OR ("queue_job"."date_cancelled" <= '2024-10-04 03:39:14.554672')) AND ("queue_job"."channel" = 'root.root_trigger')) ORDER BY "queue_job"."date_created" DESC, "queue_job"."date_done" DESC LIMIT 1000;[ Date: 2024-11-03 03:39:24 ]
19 9s52ms SELECT COUNT(account_move_line.id) AS nb_lines, account_move_line.currency_id, account.reconcile AS is_account_reconcile, SUM(account_move_line.amount_residual) AS amount_residual, SUM(account_move_line.balance) AS balance, SUM(account_move_line.amount_residual_currency) AS amount_residual_currency, SUM(account_move_line.amount_currency) AS amount_currency FROM "account_move_line" JOIN account_account account ON account.id = account_move_line.account_id WHERE (((((("account_move_line"."parent_state" = 'posted') AND ("account_move_line"."account_id" in (931, 932))) AND (("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL)) AND (("account_move_line"."parent_state" != 'cancel') OR "account_move_line"."parent_state" IS NULL)) AND ("account_move_line"."reconciled" IS NULL or "account_move_line"."reconciled" = false)) AND ("account_move_line"."journal_id" = 8)) GROUP BY account_move_line.currency_id, account.reconcile;[ Date: 2024-11-03 13:53:16 ]
20 8s443ms COPY public.forecasted_data (id, date, min_product_uom_qty, max_product_uom_qty, item_supply_plan_id, po_qty, 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, default_code, ext_cost, qty_available, qty_reserve, qty_on_order, qty_on_perm_order, qty_mtd_sold, lead_days, mon_1_qty, mon_2_qty, mon_3_qty, mon_4_qty, mon_5_qty, mon_6_qty, mon_7_qty, mon_8_qty, mon_9_qty, mon_10_qty, mon_11_qty, mon_12_qty, seasonal, stocking_flag, freeze_date, warehouse_min_product_uom_qty, is_forcast, modify_qty, req_po_qty, supercede_product_id, superceded, final_branch_id, po_id, unit_ext_cost, is_freeze, qty_in_transist, campaign_id, source_id, medium_id, message_main_attachment_id, access_token, is_new_stock_product, ref_id, ref, product_name, is_stock_flag_product, class_code_id, sft_stk_qty, need_qty_with_sft_stk) TO stdout;[ Date: 2024-11-03 10:02:06 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 3h14m18s 72,265 132ms 1s6ms 161ms 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 #1
Day Hour Count Duration Avg duration Nov 03 20 3,132 8m38s 165ms 21 3,193 9m2s 169ms 22 3,053 8m13s 161ms 23 2,597 6m31s 150ms 00 2,912 7m34s 156ms 01 2,970 7m45s 156ms 01 2,994 7m55s 158ms 02 3,058 8m2s 157ms 03 2,917 7m50s 161ms 04 2,849 7m35s 159ms 05 2,708 7m56s 175ms 06 2,961 8m26s 171ms 07 3,107 8m30s 164ms 08 2,998 7m48s 156ms 09 2,870 8m 167ms 10 2,993 8m3s 161ms 11 3,189 8m21s 157ms 12 3,015 8m12s 163ms 13 3,188 8m23s 157ms 14 2,907 7m59s 164ms 15 3,093 8m17s 160ms 16 3,149 8m18s 158ms 17 3,173 8m20s 157ms 18 3,239 8m30s 157ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",53355]', '["pointspring_master","res.partner",53355]', '["pointspring_master","ir.needaction",53355]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 1s6ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') 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","mail.channel",594]', '["pointspring_master","res.partner",19507]', '["pointspring_master","ir.needaction",19507]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 995ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19532]', '["pointspring_master","mail.channel",318]', '["pointspring_master","mail.channel",319]', '["pointspring_master","mail.channel",320]', '["pointspring_master","mail.channel",321]', '["pointspring_master","mail.channel",455]', '["pointspring_master","mail.channel",466]', '["pointspring_master","res.partner",19532]', '["pointspring_master","ir.needaction",19532]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 958ms
2 1h37m8s 16,984 323ms 844ms 343ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Nov 03 20 1,290 7m30s 348ms 21 1,218 7m8s 351ms 22 1,044 5m57s 342ms 23 1,363 7m42s 339ms 00 717 4m4s 341ms 01 477 2m41s 338ms 01 489 2m47s 341ms 02 861 4m53s 341ms 03 1,026 5m49s 340ms 04 312 1m46s 339ms 05 21 7s317ms 348ms 06 33 11s607ms 351ms 07 24 8s305ms 346ms 08 39 13s332ms 341ms 09 30 10s737ms 357ms 10 24 8s287ms 345ms 11 168 57s580ms 342ms 12 636 3m37s 341ms 13 1,056 6m 341ms 14 1,171 6m40s 342ms 15 1,145 6m32s 342ms 16 1,260 7m13s 344ms 17 1,350 7m43s 342ms 18 1,230 7m2s 343ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 20:54:53 Duration: 844ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 14:15:47 Duration: 801ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 21:43:32 Duration: 751ms
3 1h10m27s 12,347 323ms 869ms 342ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Nov 03 20 24 8s464ms 352ms 21 33 11s429ms 346ms 22 12 4s75ms 339ms 23 45 15s325ms 340ms 00 207 1m10s 340ms 01 609 3m26s 338ms 01 498 2m49s 339ms 02 1,023 5m46s 338ms 03 485 2m44s 339ms 04 640 3m37s 339ms 05 399 2m18s 348ms 06 504 2m58s 354ms 07 426 2m27s 345ms 08 642 3m39s 341ms 09 1,284 7m19s 342ms 10 237 1m21s 344ms 11 249 1m25s 341ms 12 515 2m56s 342ms 13 960 5m28s 342ms 14 360 2m3s 342ms 15 659 3m45s 342ms 16 745 4m14s 342ms 17 930 5m19s 343ms 18 861 4m54s 342ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 10:50:11 Duration: 869ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 13:10:36 Duration: 823ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 22:41:36 Duration: 764ms
4 38m5s 2,342 935ms 1s428ms 975ms 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 #4
Day Hour Count Duration Avg duration Nov 03 20 1,060 17m11s 973ms 21 1,058 17m13s 976ms 22 224 3m40s 985ms -
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 = 186130 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 01:30:40 Duration: 1s428ms
-
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 = 185205 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 01:34:02 Duration: 1s374ms
-
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 = 172933 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 02:04:54 Duration: 1s353ms
5 30m15s 7,179 240ms 526ms 252ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Nov 03 20 15 3s827ms 255ms 21 39 9s883ms 253ms 22 30 7s463ms 248ms 23 48 12s28ms 250ms 00 255 1m4s 251ms 01 789 3m17s 250ms 01 213 53s908ms 253ms 02 303 1m16s 252ms 03 15 3s709ms 247ms 04 30 7s553ms 251ms 05 27 6s833ms 253ms 06 36 9s428ms 261ms 07 39 9s928ms 254ms 08 27 6s910ms 255ms 09 45 11s310ms 251ms 10 39 9s743ms 249ms 11 180 45s588ms 253ms 12 546 2m17s 252ms 13 636 2m40s 252ms 14 846 3m34s 253ms 15 621 2m37s 252ms 16 774 3m15s 253ms 17 663 2m48s 253ms 18 963 4m5s 254ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 19:53:17 Duration: 526ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 05:49:32 Duration: 458ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 17:19:10 Duration: 404ms
6 26m38s 8,186 186ms 490ms 195ms update product_warehouse_inventory set sft_stk_qty = ? where id = ( select id from product_warehouse_inventory where product_id = (?) and warehouse_id = (?));Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Nov 03 05 1,755 5m41s 194ms 06 4,901 15m57s 195ms 07 1,530 4m58s 195ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (178278) and warehouse_id = (41));
Date: 2024-11-03 11:24:39 Duration: 490ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (171866) and warehouse_id = (42));
Date: 2024-11-03 11:31:44 Duration: 367ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (217017) and warehouse_id = (45));
Date: 2024-11-03 11:55:02 Duration: 329ms
7 22m35s 5,343 240ms 787ms 253ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" desc, "product_template"."id" desc;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Nov 03 20 435 1m52s 258ms 21 432 1m51s 259ms 22 693 2m55s 253ms 23 600 2m30s 250ms 00 144 36s67ms 250ms 01 183 46s241ms 252ms 01 177 44s316ms 250ms 02 39 9s749ms 249ms 03 18 4s532ms 251ms 04 27 6s816ms 252ms 05 15 3s758ms 250ms 06 21 5s531ms 263ms 07 15 3s769ms 251ms 08 15 3s759ms 250ms 09 12 3s53ms 254ms 10 18 4s527ms 251ms 11 99 25s31ms 252ms 12 459 1m56s 253ms 13 435 1m50s 253ms 14 567 2m23s 253ms 15 561 2m21s 252ms 16 327 1m23s 254ms 17 21 5s336ms 254ms 18 30 7s755ms 258ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 19:50:25 Duration: 787ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 02:05:04 Duration: 513ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 02:05:04 Duration: 494ms
8 15m55s 534 1s731ms 2s309ms 1s788ms select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pt.min_product_uom_qty > ? and pwi.stocking_flag = true and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) <= ? and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.discontinued, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false union all select pwi.product_id, abs(((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?))) as min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pwi.stocking_flag = false and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) < ? and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.discontinued, false) = false and coalesce(pt.never_stock, false) = true and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false union all select pwi.product_id, coalesce(pwi.qty_on_perm_order, ?) as min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pwi.stocking_flag = true and coalesce(pwi.qty_on_perm_order, ?) > ? and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - (coalesce(pwi.qty_reserve, ?) + coalesce(pwi.qty_on_perm_order, ?))) < ? and pt.discontinued = false and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Nov 03 05 108 3m13s 1s788ms 06 287 8m32s 1s786ms 07 139 4m9s 1s791ms -
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 12:00:16 Duration: 2s309ms
-
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 10:46:58 Duration: 2s77ms
-
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 11:25:31 Duration: 2s15ms
9 14m13s 5,706 141ms 344ms 149ms select current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages as real_size, (tblpages - est_tblpages_ff) * bs as bloat_size, case when tblpages - est_tblpages_ff > ? then ? * (tblpages - est_tblpages_ff) / tblpages::float else ? end as bloat_ratio from ( select ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / ?) as est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * ?))) + ceil(toasttuples / ?) as est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na from ( select (? + tpl_hdr_size + tpl_data_size + (? * ma) - case when tpl_hdr_size % ma = ? then ma else tpl_hdr_size % ma end - case when ceil(tpl_data_size)::int % ma = ? then ma else ceil(tpl_data_size)::int % ma end) as tpl_size, bs - page_hdr as size_per_block, (heappages + toastpages) as tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na from ( select tbl.oid as tblid, ns.nspname as schemaname, tbl.relname as tblname, tbl.reltuples, tbl.relpages as heappages, coalesce(toast.relpages, ?) as toastpages, coalesce(toast.reltuples, ?) as toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ?) from ?)::smallint, ?) as fillfactor, current_setting(?)::numeric as bs, case when version() ~ ? or version() ~ ? then ? else ? end as ma, ? as page_hdr, case when current_setting(?)::integer < ? then ? else ? end + case when max(coalesce(null_frac, ?)) > ? then (? + count(*)) / ? else ?::int end + ? as tpl_hdr_size, sum((? - coalesce(s.null_frac, ?)) * coalesce(s.avg_width, ?)) as tpl_data_size, bool_or(att.atttypid = ?::regtype) or count(att.attname) <> count(s.attname) as is_na from pg_attribute as att join pg_class as tbl on att.attrelid = tbl.oid join pg_namespace as ns on ns.oid = tbl.relnamespace left join pg_stats as s on s.schemaname = ns.nspname and s.tablename = tbl.relname and s.attname = att.attname left join pg_class as toast on tbl.reltoastrelid = toast.oid where att.attnum > ? and not att.attisdropped and tbl.relkind = ? group by ?, ?, ?, ?, ?, ?, ?, ?, ?, ? order by ?, ?) as s) as s2) as s3 where not is_na and schemaname || ? || tblname in (...);Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Nov 03 20 240 37s227ms 155ms 21 240 37s349ms 155ms 22 240 36s117ms 150ms 23 200 29s514ms 147ms 00 226 33s409ms 147ms 01 240 35s651ms 148ms 01 240 35s653ms 148ms 02 240 35s387ms 147ms 03 240 35s624ms 148ms 04 240 35s540ms 148ms 05 240 35s877ms 149ms 06 240 36s776ms 153ms 07 240 35s998ms 149ms 08 240 35s578ms 148ms 09 240 35s661ms 148ms 10 240 35s687ms 148ms 11 240 35s753ms 148ms 12 240 36s34ms 150ms 13 240 35s834ms 149ms 14 240 35s652ms 148ms 15 240 35s708ms 148ms 16 240 35s910ms 149ms 17 240 35s968ms 149ms 18 240 36s30ms 150ms -
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_conversion', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_range', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_settings', 'pg_catalog.pg_proc', 'pg_catalog.pg_index', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_extension', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_cursors', 'pg_catalog.pg_class', 'pg_catalog.pg_operator', 'pg_catalog.pg_trigger', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_publication', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_attribute', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_type', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_matviews', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_subscription', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_rules', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_description', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_group', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_opclass', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_cast', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_sequence', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_amop', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_user', 'pg_catalog.pg_language', 'pg_catalog.pg_depend', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_locks', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_policies', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_policy', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_all_sequences', 'information_schema.column_column_usage', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.view_routine_usage', 'information_schema.triggered_update_columns', 'information_schema.collations', 'information_schema.column_privileges', 'information_schema.domain_udt_usage', 'information_schema.key_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.parameters', 'information_schema.sequences', 'information_schema.check_constraint_routine_usage', 'information_schema.collation_character_set_applicability', 'information_schema.routine_routine_usage', 'information_schema.user_mapping_options', 'information_schema.role_column_grants', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.data_type_privileges', 'information_schema.foreign_server_options', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.applicable_roles', 'information_schema.routine_table_usage', 'information_schema.sql_sizing', 'information_schema.table_constraints', 'information_schema.column_domain_usage', 'information_schema.domain_constraints', 'information_schema.schemata', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.element_types', 'information_schema.administrable_role_authorizations', 'information_schema.constraint_column_usage', 'information_schema.check_constraints', 'information_schema.constraint_table_usage', 'information_schema.referential_constraints', 'information_schema.sql_implementation_info', 'information_schema.user_mappings', 'information_schema.view_column_usage', 'information_schema.foreign_table_options', 'information_schema.foreign_tables', 'information_schema.attributes', 'information_schema.routines', 'information_schema.columns', 'information_schema.role_routine_grants', 'information_schema.routine_sequence_usage', 'information_schema.tables', 'information_schema.role_udt_grants', 'information_schema.character_sets', 'information_schema.column_udt_usage', 'information_schema.routine_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.routine_column_usage', 'information_schema.view_table_usage', 'information_schema.information_schema_catalog_name', 'information_schema.domains', 'information_schema.enabled_roles', 'information_schema.usage_privileges', 'information_schema.user_defined_types', 'information_schema.foreign_servers', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-11-03 18:00:53 Duration: 344ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_attribute', 'pg_catalog.pg_depend', 'pg_catalog.pg_am', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_proc', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_opclass', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_collation', 'pg_catalog.pg_range', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_policy', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_type', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_namespace', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_user', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_group', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_constraint', 'pg_catalog.pg_amop', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_cast', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_roles', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_operator', 'pg_catalog.pg_database', 'pg_catalog.pg_matviews', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_trigger', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_policies', 'pg_catalog.pg_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_conversion', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_extension', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_publication', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_rules', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_description', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_default_acl', 'information_schema.administrable_role_authorizations', 'information_schema.columns', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.tables', 'information_schema.view_column_usage', 'information_schema.routine_routine_usage', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.routines', 'information_schema.sequences', 'information_schema.foreign_data_wrappers', 'information_schema.routine_sequence_usage', 'information_schema.udt_privileges', 'information_schema.check_constraints', 'information_schema.column_privileges', 'information_schema.user_mappings', 'information_schema.user_defined_types', 'information_schema.collations', 'information_schema.collation_character_set_applicability', 'information_schema.domain_constraints', 'information_schema.user_mapping_options', 'information_schema.information_schema_catalog_name', 'information_schema.column_udt_usage', 'information_schema.key_column_usage', 'information_schema.table_constraints', 'information_schema.foreign_servers', 'information_schema.sql_features', 'information_schema.views', 'information_schema.view_routine_usage', 'information_schema.attributes', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.routine_table_usage', 'information_schema.sql_implementation_info', 'information_schema.routine_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.column_column_usage', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.role_routine_grants', 'information_schema.role_table_grants', 'information_schema.domain_udt_usage', 'information_schema.foreign_server_options', 'information_schema.foreign_tables', 'information_schema.sql_sizing', 'information_schema.view_table_usage', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.constraint_column_usage', 'information_schema.constraint_table_usage', 'information_schema.element_types', 'information_schema.foreign_table_options', 'information_schema.check_constraint_routine_usage', 'information_schema.parameters', 'information_schema.table_privileges', 'information_schema.schemata', 'information_schema.referential_constraints', 'information_schema.triggered_update_columns', 'information_schema.triggers');
Date: 2024-11-03 01:32:20 Duration: 266ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_user', 'pg_catalog.pg_class', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_transform', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stats', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_description', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_enum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_extension', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_conversion', 'pg_catalog.pg_database', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_indexes', 'pg_catalog.pg_locks', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_inherits', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_cast', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_index', 'pg_catalog.pg_am', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_attribute', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_sequence', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_trigger', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_publication', 'pg_catalog.pg_policies', 'pg_catalog.pg_language', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_type', 'pg_catalog.pg_settings', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_policy', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_operator', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_depend', 'pg_catalog.pg_views', 'pg_catalog.pg_sequences', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_collation', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_group', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_amproc', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_range', 'information_schema.applicable_roles', 'information_schema.routine_column_usage', 'information_schema.constraint_table_usage', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.information_schema_catalog_name', 'information_schema.column_privileges', 'information_schema.key_column_usage', 'information_schema.routines', 'information_schema.constraint_column_usage', 'information_schema.view_table_usage', 'information_schema.administrable_role_authorizations', 'information_schema.role_column_grants', 'information_schema.domain_constraints', 'information_schema.column_domain_usage', 'information_schema.domain_udt_usage', 'information_schema.schemata', 'information_schema.parameters', 'information_schema.views', 'information_schema.character_sets', 'information_schema.routine_routine_usage', 'information_schema.sql_features', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.foreign_server_options', 'information_schema.attributes', 'information_schema.role_table_grants', 'information_schema.user_defined_types', 'information_schema.column_column_usage', 'information_schema.collations', 'information_schema.foreign_table_options', 'information_schema.usage_privileges', 'information_schema.sql_implementation_info', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.user_mapping_options', 'information_schema.referential_constraints', 'information_schema.sequences', 'information_schema.routine_table_usage', 'information_schema.sql_sizing', 'information_schema.data_type_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.columns', 'information_schema.routine_sequence_usage', 'information_schema.triggers', 'information_schema.view_routine_usage', 'information_schema.foreign_tables', 'information_schema.column_udt_usage', 'information_schema.routine_privileges', 'information_schema.domains', 'information_schema.enabled_roles', 'information_schema.role_routine_grants', 'information_schema.tables', 'information_schema.element_types', 'information_schema.collation_character_set_applicability', 'information_schema.udt_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.user_mappings', 'information_schema.table_constraints', 'information_schema.check_constraint_routine_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-03 00:35:05 Duration: 265ms
10 5m16s 2,341 123ms 217ms 135ms with data as ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and item_demand_plan_id = ? and date::date = date ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) select id from data where rnum > ?;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Nov 03 20 1,058 2m22s 135ms 21 1,059 2m22s 134ms 22 224 30s895ms 137ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 195766 and item_demand_plan_id = 3943 AND date::date = DATE '2024-11-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-11-03 00:53:35 Duration: 217ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 210625 and item_demand_plan_id = 3943 AND date::date = DATE '2024-11-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-11-03 00:12:30 Duration: 208ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 196003 and item_demand_plan_id = 3943 AND date::date = DATE '2024-11-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-11-03 00:51:04 Duration: 208ms
11 4m52s 2,306 120ms 504ms 126ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ("product_warehouse_inventory"."product_id" in (...)) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Nov 03 05 447 57s12ms 127ms 06 1,320 2m47s 126ms 07 537 1m7s 126ms 08 1 145ms 145ms 18 1 125ms 125ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (194491)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-03 10:54:34 Duration: 504ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (209281)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-03 10:43:19 Duration: 216ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (195225)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-03 10:54:34 Duration: 203ms
12 3m56s 1 3m56s 3m56s 3m56s 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 Nov 03 05 1 3m56s 3m56s -
COPY public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) TO stdout;
Date: 2024-11-03 10:10:49 Duration: 3m56s
13 3m44s 1,765 120ms 239ms 127ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Nov 03 20 805 1m41s 126ms 21 790 1m40s 127ms 22 170 21s798ms 128ms -
select id, class_code from product_warehouse_inventory where product_id = 194096 and warehouse_id = 35;
Date: 2024-11-03 01:07:30 Duration: 239ms
-
select id, class_code from product_warehouse_inventory where product_id = 193120 and warehouse_id = 35;
Date: 2024-11-03 01:09:38 Duration: 233ms
-
select id, class_code from product_warehouse_inventory where product_id = 195766 and warehouse_id = 35;
Date: 2024-11-03 00:53:35 Duration: 168ms
14 3m13s 1,546 120ms 415ms 125ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."website_sequence" asc, "product_template"."id" desc;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Nov 03 20 28 3s726ms 133ms 21 20 2s615ms 130ms 22 27 3s468ms 128ms 23 17 2s80ms 122ms 00 21 2s587ms 123ms 01 22 2s789ms 126ms 01 24 2s955ms 123ms 02 40 4s972ms 124ms 03 16 2s69ms 129ms 04 33 4s82ms 123ms 05 14 1s734ms 123ms 06 44 5s967ms 135ms 07 18 2s294ms 127ms 08 35 4s352ms 124ms 09 23 2s821ms 122ms 10 29 3s560ms 122ms 11 49 6s74ms 123ms 12 28 3s474ms 124ms 13 24 2s976ms 124ms 14 77 9s527ms 123ms 15 148 18s510ms 125ms 16 208 25s996ms 124ms 17 256 31s969ms 124ms 18 345 43s306ms 125ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-11-03 23:22:22 Duration: 415ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-11-03 11:08:21 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))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-11-03 23:22:22 Duration: 218ms
15 2m21s 1 2m21s 2m21s 2m21s 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 #15
Day Hour Count Duration Avg duration Nov 03 05 1 2m21s 2m21s -
COPY public.item_list_line (id, item_demand_plan_id, product_id, selling_branch, product_uom_qty, invoice_date, warehouse_id, method, inventory_vendor_id, create_uid, create_date, write_uid, write_date, active, min_product_len_1, min_product_len_2, min_baseline_size, seasonal_period, supercede_product_id, superceded, campaign_id, source_id, medium_id, message_main_attachment_id, access_token, ref_id, ref) TO stdout;
Date: 2024-11-03 10:04:37 Duration: 2m21s
16 2m1s 1 2m1s 2m1s 2m1s 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 #16
Day Hour Count Duration Avg duration Nov 03 05 1 2m1s 2m1s -
COPY public.mail_message (id, subject, date, body, parent_id, model, res_id, record_name, message_type, subtype_id, mail_activity_type_id, is_internal, email_from, author_id, no_auto_thread, message_id, reply_to, mail_server_id, moderation_status, moderator_id, email_layout_xmlid, add_sign, create_uid, create_date, write_uid, write_date, email_cc, email_bcc, email_to, ks_email_cc_string, ks_email_bcc_string, ks_cc_partners, ks_bcc_partners) TO stdout;
Date: 2024-11-03 10:06:51 Duration: 2m1s
17 1m50s 8 129ms 24s587ms 13s849ms select "mail_message".id from "mail_message" where ((((("mail_message"."id" in ( select "mail_message_res_partner_needaction_rel"."mail_message_id" from "mail_message_res_partner_needaction_rel" where ("mail_message_res_partner_needaction_rel"."notification_status" in (...)))) and ("mail_message"."author_id" = ?)) and ("mail_message"."res_id" != ?)) and "mail_message"."model" is not null) and (("mail_message"."message_type" != ?) or "mail_message"."message_type" is null)) order by "mail_message"."id" desc;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Nov 03 01 4 1m33s 23s426ms 08 1 9s982ms 9s982ms 10 1 827ms 827ms 18 2 6s277ms 3s138ms -
SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;
Date: 2024-11-03 05:33:36 Duration: 24s587ms
-
SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;
Date: 2024-11-03 05:33:36 Duration: 23s732ms
-
SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;
Date: 2024-11-03 05:33:36 Duration: 23s168ms
18 1m41s 24 879ms 1m20s 4s238ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Nov 03 22 12 11s546ms 962ms 05 2 1m21s 40s508ms 06 8 7s389ms 923ms 07 2 1s763ms 881ms -
select count(id) from item_list_line where item_demand_plan_id = 3943;
Date: 2024-11-03 10:37:51 Duration: 1m20s
-
select count(id) from item_list_line where item_demand_plan_id = 3947;
Date: 2024-11-03 02:09:30 Duration: 1s315ms
-
select count(id) from item_list_line where item_demand_plan_id = 3948;
Date: 2024-11-03 11:17:30 Duration: 1s23ms
19 1m34s 534 149ms 349ms 176ms select pwi.product_id, coalesce(pwi.lead_days, ?), coalesce(pwi.min_product_uom_qty, ?) as min_qty, coalesce(pwi.max_product_uom_qty, ?) as max_qty, coalesce(pwi.max_product_uom_qty, ?) - ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) as need_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where coalesce(pt.is_core, false) = false and coalesce(pwi.stocking_flag, false) = true and coalesce(pt.discontinued, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) < coalesce(pwi.max_product_uom_qty, ?) and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Nov 03 05 108 19s85ms 176ms 06 287 50s758ms 176ms 07 139 24s180ms 173ms -
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 37 and pwi.inventory_vendor_id = 3019;
Date: 2024-11-03 11:08:21 Duration: 349ms
-
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 43 and pwi.inventory_vendor_id = 3035;
Date: 2024-11-03 11:46:53 Duration: 223ms
-
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 37 and pwi.inventory_vendor_id = 3026;
Date: 2024-11-03 11:01:17 Duration: 222ms
20 1m16s 534 133ms 190ms 143ms select id from product_warehouse_inventory where freeze_date is not null and freeze_date > ? and warehouse_id = ? and inventory_vendor_id = ? and qty_available < min_product_uom_qty;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Nov 03 05 108 15s449ms 143ms 06 287 41s110ms 143ms 07 139 19s845ms 142ms -
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:38:43' and warehouse_id = 35 and inventory_vendor_id = 2966 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:38:43 Duration: 190ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:55:24' and warehouse_id = 36 and inventory_vendor_id = 2952 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:55:24 Duration: 189ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:48:22' and warehouse_id = 35 and inventory_vendor_id = 3105 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:48:22 Duration: 189ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 72,265 3h14m18s 132ms 1s6ms 161ms 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 #1
Day Hour Count Duration Avg duration Nov 03 20 3,132 8m38s 165ms 21 3,193 9m2s 169ms 22 3,053 8m13s 161ms 23 2,597 6m31s 150ms 00 2,912 7m34s 156ms 01 2,970 7m45s 156ms 01 2,994 7m55s 158ms 02 3,058 8m2s 157ms 03 2,917 7m50s 161ms 04 2,849 7m35s 159ms 05 2,708 7m56s 175ms 06 2,961 8m26s 171ms 07 3,107 8m30s 164ms 08 2,998 7m48s 156ms 09 2,870 8m 167ms 10 2,993 8m3s 161ms 11 3,189 8m21s 157ms 12 3,015 8m12s 163ms 13 3,188 8m23s 157ms 14 2,907 7m59s 164ms 15 3,093 8m17s 160ms 16 3,149 8m18s 158ms 17 3,173 8m20s 157ms 18 3,239 8m30s 157ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",53355]', '["pointspring_master","res.partner",53355]', '["pointspring_master","ir.needaction",53355]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 1s6ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') 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","mail.channel",594]', '["pointspring_master","res.partner",19507]', '["pointspring_master","ir.needaction",19507]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 995ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19532]', '["pointspring_master","mail.channel",318]', '["pointspring_master","mail.channel",319]', '["pointspring_master","mail.channel",320]', '["pointspring_master","mail.channel",321]', '["pointspring_master","mail.channel",455]', '["pointspring_master","mail.channel",466]', '["pointspring_master","res.partner",19532]', '["pointspring_master","ir.needaction",19532]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 958ms
2 16,984 1h37m8s 323ms 844ms 343ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Nov 03 20 1,290 7m30s 348ms 21 1,218 7m8s 351ms 22 1,044 5m57s 342ms 23 1,363 7m42s 339ms 00 717 4m4s 341ms 01 477 2m41s 338ms 01 489 2m47s 341ms 02 861 4m53s 341ms 03 1,026 5m49s 340ms 04 312 1m46s 339ms 05 21 7s317ms 348ms 06 33 11s607ms 351ms 07 24 8s305ms 346ms 08 39 13s332ms 341ms 09 30 10s737ms 357ms 10 24 8s287ms 345ms 11 168 57s580ms 342ms 12 636 3m37s 341ms 13 1,056 6m 341ms 14 1,171 6m40s 342ms 15 1,145 6m32s 342ms 16 1,260 7m13s 344ms 17 1,350 7m43s 342ms 18 1,230 7m2s 343ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 20:54:53 Duration: 844ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 14:15:47 Duration: 801ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 21:43:32 Duration: 751ms
3 12,347 1h10m27s 323ms 869ms 342ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Nov 03 20 24 8s464ms 352ms 21 33 11s429ms 346ms 22 12 4s75ms 339ms 23 45 15s325ms 340ms 00 207 1m10s 340ms 01 609 3m26s 338ms 01 498 2m49s 339ms 02 1,023 5m46s 338ms 03 485 2m44s 339ms 04 640 3m37s 339ms 05 399 2m18s 348ms 06 504 2m58s 354ms 07 426 2m27s 345ms 08 642 3m39s 341ms 09 1,284 7m19s 342ms 10 237 1m21s 344ms 11 249 1m25s 341ms 12 515 2m56s 342ms 13 960 5m28s 342ms 14 360 2m3s 342ms 15 659 3m45s 342ms 16 745 4m14s 342ms 17 930 5m19s 343ms 18 861 4m54s 342ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 10:50:11 Duration: 869ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 13:10:36 Duration: 823ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 22:41:36 Duration: 764ms
4 8,186 26m38s 186ms 490ms 195ms update product_warehouse_inventory set sft_stk_qty = ? where id = ( select id from product_warehouse_inventory where product_id = (?) and warehouse_id = (?));Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Nov 03 05 1,755 5m41s 194ms 06 4,901 15m57s 195ms 07 1,530 4m58s 195ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (178278) and warehouse_id = (41));
Date: 2024-11-03 11:24:39 Duration: 490ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (171866) and warehouse_id = (42));
Date: 2024-11-03 11:31:44 Duration: 367ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (217017) and warehouse_id = (45));
Date: 2024-11-03 11:55:02 Duration: 329ms
5 7,179 30m15s 240ms 526ms 252ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Nov 03 20 15 3s827ms 255ms 21 39 9s883ms 253ms 22 30 7s463ms 248ms 23 48 12s28ms 250ms 00 255 1m4s 251ms 01 789 3m17s 250ms 01 213 53s908ms 253ms 02 303 1m16s 252ms 03 15 3s709ms 247ms 04 30 7s553ms 251ms 05 27 6s833ms 253ms 06 36 9s428ms 261ms 07 39 9s928ms 254ms 08 27 6s910ms 255ms 09 45 11s310ms 251ms 10 39 9s743ms 249ms 11 180 45s588ms 253ms 12 546 2m17s 252ms 13 636 2m40s 252ms 14 846 3m34s 253ms 15 621 2m37s 252ms 16 774 3m15s 253ms 17 663 2m48s 253ms 18 963 4m5s 254ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 19:53:17 Duration: 526ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 05:49:32 Duration: 458ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 17:19:10 Duration: 404ms
6 5,706 14m13s 141ms 344ms 149ms select current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages as real_size, (tblpages - est_tblpages_ff) * bs as bloat_size, case when tblpages - est_tblpages_ff > ? then ? * (tblpages - est_tblpages_ff) / tblpages::float else ? end as bloat_ratio from ( select ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / ?) as est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * ?))) + ceil(toasttuples / ?) as est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na from ( select (? + tpl_hdr_size + tpl_data_size + (? * ma) - case when tpl_hdr_size % ma = ? then ma else tpl_hdr_size % ma end - case when ceil(tpl_data_size)::int % ma = ? then ma else ceil(tpl_data_size)::int % ma end) as tpl_size, bs - page_hdr as size_per_block, (heappages + toastpages) as tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na from ( select tbl.oid as tblid, ns.nspname as schemaname, tbl.relname as tblname, tbl.reltuples, tbl.relpages as heappages, coalesce(toast.relpages, ?) as toastpages, coalesce(toast.reltuples, ?) as toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ?) from ?)::smallint, ?) as fillfactor, current_setting(?)::numeric as bs, case when version() ~ ? or version() ~ ? then ? else ? end as ma, ? as page_hdr, case when current_setting(?)::integer < ? then ? else ? end + case when max(coalesce(null_frac, ?)) > ? then (? + count(*)) / ? else ?::int end + ? as tpl_hdr_size, sum((? - coalesce(s.null_frac, ?)) * coalesce(s.avg_width, ?)) as tpl_data_size, bool_or(att.atttypid = ?::regtype) or count(att.attname) <> count(s.attname) as is_na from pg_attribute as att join pg_class as tbl on att.attrelid = tbl.oid join pg_namespace as ns on ns.oid = tbl.relnamespace left join pg_stats as s on s.schemaname = ns.nspname and s.tablename = tbl.relname and s.attname = att.attname left join pg_class as toast on tbl.reltoastrelid = toast.oid where att.attnum > ? and not att.attisdropped and tbl.relkind = ? group by ?, ?, ?, ?, ?, ?, ?, ?, ?, ? order by ?, ?) as s) as s2) as s3 where not is_na and schemaname || ? || tblname in (...);Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Nov 03 20 240 37s227ms 155ms 21 240 37s349ms 155ms 22 240 36s117ms 150ms 23 200 29s514ms 147ms 00 226 33s409ms 147ms 01 240 35s651ms 148ms 01 240 35s653ms 148ms 02 240 35s387ms 147ms 03 240 35s624ms 148ms 04 240 35s540ms 148ms 05 240 35s877ms 149ms 06 240 36s776ms 153ms 07 240 35s998ms 149ms 08 240 35s578ms 148ms 09 240 35s661ms 148ms 10 240 35s687ms 148ms 11 240 35s753ms 148ms 12 240 36s34ms 150ms 13 240 35s834ms 149ms 14 240 35s652ms 148ms 15 240 35s708ms 148ms 16 240 35s910ms 149ms 17 240 35s968ms 149ms 18 240 36s30ms 150ms -
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_conversion', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_range', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_settings', 'pg_catalog.pg_proc', 'pg_catalog.pg_index', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_extension', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_cursors', 'pg_catalog.pg_class', 'pg_catalog.pg_operator', 'pg_catalog.pg_trigger', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_publication', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_attribute', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_type', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_matviews', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_subscription', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_rules', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_description', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_group', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_opclass', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_cast', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_sequence', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_amop', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_user', 'pg_catalog.pg_language', 'pg_catalog.pg_depend', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_locks', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_policies', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_policy', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_all_sequences', 'information_schema.column_column_usage', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.view_routine_usage', 'information_schema.triggered_update_columns', 'information_schema.collations', 'information_schema.column_privileges', 'information_schema.domain_udt_usage', 'information_schema.key_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.parameters', 'information_schema.sequences', 'information_schema.check_constraint_routine_usage', 'information_schema.collation_character_set_applicability', 'information_schema.routine_routine_usage', 'information_schema.user_mapping_options', 'information_schema.role_column_grants', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.data_type_privileges', 'information_schema.foreign_server_options', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.applicable_roles', 'information_schema.routine_table_usage', 'information_schema.sql_sizing', 'information_schema.table_constraints', 'information_schema.column_domain_usage', 'information_schema.domain_constraints', 'information_schema.schemata', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.element_types', 'information_schema.administrable_role_authorizations', 'information_schema.constraint_column_usage', 'information_schema.check_constraints', 'information_schema.constraint_table_usage', 'information_schema.referential_constraints', 'information_schema.sql_implementation_info', 'information_schema.user_mappings', 'information_schema.view_column_usage', 'information_schema.foreign_table_options', 'information_schema.foreign_tables', 'information_schema.attributes', 'information_schema.routines', 'information_schema.columns', 'information_schema.role_routine_grants', 'information_schema.routine_sequence_usage', 'information_schema.tables', 'information_schema.role_udt_grants', 'information_schema.character_sets', 'information_schema.column_udt_usage', 'information_schema.routine_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.routine_column_usage', 'information_schema.view_table_usage', 'information_schema.information_schema_catalog_name', 'information_schema.domains', 'information_schema.enabled_roles', 'information_schema.usage_privileges', 'information_schema.user_defined_types', 'information_schema.foreign_servers', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-11-03 18:00:53 Duration: 344ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_attribute', 'pg_catalog.pg_depend', 'pg_catalog.pg_am', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_proc', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_opclass', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_collation', 'pg_catalog.pg_range', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_policy', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_type', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_namespace', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_user', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_group', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_constraint', 'pg_catalog.pg_amop', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_cast', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_roles', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_operator', 'pg_catalog.pg_database', 'pg_catalog.pg_matviews', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_trigger', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_policies', 'pg_catalog.pg_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_conversion', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_extension', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_publication', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_rules', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_description', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_default_acl', 'information_schema.administrable_role_authorizations', 'information_schema.columns', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.tables', 'information_schema.view_column_usage', 'information_schema.routine_routine_usage', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.routines', 'information_schema.sequences', 'information_schema.foreign_data_wrappers', 'information_schema.routine_sequence_usage', 'information_schema.udt_privileges', 'information_schema.check_constraints', 'information_schema.column_privileges', 'information_schema.user_mappings', 'information_schema.user_defined_types', 'information_schema.collations', 'information_schema.collation_character_set_applicability', 'information_schema.domain_constraints', 'information_schema.user_mapping_options', 'information_schema.information_schema_catalog_name', 'information_schema.column_udt_usage', 'information_schema.key_column_usage', 'information_schema.table_constraints', 'information_schema.foreign_servers', 'information_schema.sql_features', 'information_schema.views', 'information_schema.view_routine_usage', 'information_schema.attributes', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.routine_table_usage', 'information_schema.sql_implementation_info', 'information_schema.routine_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.column_column_usage', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.role_routine_grants', 'information_schema.role_table_grants', 'information_schema.domain_udt_usage', 'information_schema.foreign_server_options', 'information_schema.foreign_tables', 'information_schema.sql_sizing', 'information_schema.view_table_usage', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.constraint_column_usage', 'information_schema.constraint_table_usage', 'information_schema.element_types', 'information_schema.foreign_table_options', 'information_schema.check_constraint_routine_usage', 'information_schema.parameters', 'information_schema.table_privileges', 'information_schema.schemata', 'information_schema.referential_constraints', 'information_schema.triggered_update_columns', 'information_schema.triggers');
Date: 2024-11-03 01:32:20 Duration: 266ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_user', 'pg_catalog.pg_class', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_transform', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stats', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_description', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_enum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_extension', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_conversion', 'pg_catalog.pg_database', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_indexes', 'pg_catalog.pg_locks', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_inherits', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_cast', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_index', 'pg_catalog.pg_am', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_attribute', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_sequence', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_trigger', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_publication', 'pg_catalog.pg_policies', 'pg_catalog.pg_language', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_type', 'pg_catalog.pg_settings', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_policy', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_operator', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_depend', 'pg_catalog.pg_views', 'pg_catalog.pg_sequences', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_collation', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_group', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_amproc', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_range', 'information_schema.applicable_roles', 'information_schema.routine_column_usage', 'information_schema.constraint_table_usage', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.information_schema_catalog_name', 'information_schema.column_privileges', 'information_schema.key_column_usage', 'information_schema.routines', 'information_schema.constraint_column_usage', 'information_schema.view_table_usage', 'information_schema.administrable_role_authorizations', 'information_schema.role_column_grants', 'information_schema.domain_constraints', 'information_schema.column_domain_usage', 'information_schema.domain_udt_usage', 'information_schema.schemata', 'information_schema.parameters', 'information_schema.views', 'information_schema.character_sets', 'information_schema.routine_routine_usage', 'information_schema.sql_features', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.foreign_server_options', 'information_schema.attributes', 'information_schema.role_table_grants', 'information_schema.user_defined_types', 'information_schema.column_column_usage', 'information_schema.collations', 'information_schema.foreign_table_options', 'information_schema.usage_privileges', 'information_schema.sql_implementation_info', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.user_mapping_options', 'information_schema.referential_constraints', 'information_schema.sequences', 'information_schema.routine_table_usage', 'information_schema.sql_sizing', 'information_schema.data_type_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.columns', 'information_schema.routine_sequence_usage', 'information_schema.triggers', 'information_schema.view_routine_usage', 'information_schema.foreign_tables', 'information_schema.column_udt_usage', 'information_schema.routine_privileges', 'information_schema.domains', 'information_schema.enabled_roles', 'information_schema.role_routine_grants', 'information_schema.tables', 'information_schema.element_types', 'information_schema.collation_character_set_applicability', 'information_schema.udt_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.user_mappings', 'information_schema.table_constraints', 'information_schema.check_constraint_routine_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-03 00:35:05 Duration: 265ms
7 5,343 22m35s 240ms 787ms 253ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" desc, "product_template"."id" desc;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Nov 03 20 435 1m52s 258ms 21 432 1m51s 259ms 22 693 2m55s 253ms 23 600 2m30s 250ms 00 144 36s67ms 250ms 01 183 46s241ms 252ms 01 177 44s316ms 250ms 02 39 9s749ms 249ms 03 18 4s532ms 251ms 04 27 6s816ms 252ms 05 15 3s758ms 250ms 06 21 5s531ms 263ms 07 15 3s769ms 251ms 08 15 3s759ms 250ms 09 12 3s53ms 254ms 10 18 4s527ms 251ms 11 99 25s31ms 252ms 12 459 1m56s 253ms 13 435 1m50s 253ms 14 567 2m23s 253ms 15 561 2m21s 252ms 16 327 1m23s 254ms 17 21 5s336ms 254ms 18 30 7s755ms 258ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 19:50:25 Duration: 787ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 02:05:04 Duration: 513ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 02:05:04 Duration: 494ms
8 2,342 38m5s 935ms 1s428ms 975ms 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 #8
Day Hour Count Duration Avg duration Nov 03 20 1,060 17m11s 973ms 21 1,058 17m13s 976ms 22 224 3m40s 985ms -
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 = 186130 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 01:30:40 Duration: 1s428ms
-
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 = 185205 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 01:34:02 Duration: 1s374ms
-
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 = 172933 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 02:04:54 Duration: 1s353ms
9 2,341 5m16s 123ms 217ms 135ms with data as ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and item_demand_plan_id = ? and date::date = date ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) select id from data where rnum > ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Nov 03 20 1,058 2m22s 135ms 21 1,059 2m22s 134ms 22 224 30s895ms 137ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 195766 and item_demand_plan_id = 3943 AND date::date = DATE '2024-11-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-11-03 00:53:35 Duration: 217ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 210625 and item_demand_plan_id = 3943 AND date::date = DATE '2024-11-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-11-03 00:12:30 Duration: 208ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 196003 and item_demand_plan_id = 3943 AND date::date = DATE '2024-11-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-11-03 00:51:04 Duration: 208ms
10 2,306 4m52s 120ms 504ms 126ms 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 Nov 03 05 447 57s12ms 127ms 06 1,320 2m47s 126ms 07 537 1m7s 126ms 08 1 145ms 145ms 18 1 125ms 125ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (194491)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-03 10:54:34 Duration: 504ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (209281)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-03 10:43:19 Duration: 216ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (195225)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-11-03 10:54:34 Duration: 203ms
11 1,765 3m44s 120ms 239ms 127ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Nov 03 20 805 1m41s 126ms 21 790 1m40s 127ms 22 170 21s798ms 128ms -
select id, class_code from product_warehouse_inventory where product_id = 194096 and warehouse_id = 35;
Date: 2024-11-03 01:07:30 Duration: 239ms
-
select id, class_code from product_warehouse_inventory where product_id = 193120 and warehouse_id = 35;
Date: 2024-11-03 01:09:38 Duration: 233ms
-
select id, class_code from product_warehouse_inventory where product_id = 195766 and warehouse_id = 35;
Date: 2024-11-03 00:53:35 Duration: 168ms
12 1,546 3m13s 120ms 415ms 125ms 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 #12
Day Hour Count Duration Avg duration Nov 03 20 28 3s726ms 133ms 21 20 2s615ms 130ms 22 27 3s468ms 128ms 23 17 2s80ms 122ms 00 21 2s587ms 123ms 01 22 2s789ms 126ms 01 24 2s955ms 123ms 02 40 4s972ms 124ms 03 16 2s69ms 129ms 04 33 4s82ms 123ms 05 14 1s734ms 123ms 06 44 5s967ms 135ms 07 18 2s294ms 127ms 08 35 4s352ms 124ms 09 23 2s821ms 122ms 10 29 3s560ms 122ms 11 49 6s74ms 123ms 12 28 3s474ms 124ms 13 24 2s976ms 124ms 14 77 9s527ms 123ms 15 148 18s510ms 125ms 16 208 25s996ms 124ms 17 256 31s969ms 124ms 18 345 43s306ms 125ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-11-03 23:22:22 Duration: 415ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-11-03 11:08:21 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))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-11-03 23:22:22 Duration: 218ms
13 534 15m55s 1s731ms 2s309ms 1s788ms select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pt.min_product_uom_qty > ? and pwi.stocking_flag = true and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) <= ? and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.discontinued, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false union all select pwi.product_id, abs(((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?))) as min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pwi.stocking_flag = false and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) < ? and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.discontinued, false) = false and coalesce(pt.never_stock, false) = true and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false union all select pwi.product_id, coalesce(pwi.qty_on_perm_order, ?) as min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pwi.stocking_flag = true and coalesce(pwi.qty_on_perm_order, ?) > ? and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - (coalesce(pwi.qty_reserve, ?) + coalesce(pwi.qty_on_perm_order, ?))) < ? and pt.discontinued = false and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Nov 03 05 108 3m13s 1s788ms 06 287 8m32s 1s786ms 07 139 4m9s 1s791ms -
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 12:00:16 Duration: 2s309ms
-
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 10:46:58 Duration: 2s77ms
-
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 11:25:31 Duration: 2s15ms
14 534 1m34s 149ms 349ms 176ms select pwi.product_id, coalesce(pwi.lead_days, ?), coalesce(pwi.min_product_uom_qty, ?) as min_qty, coalesce(pwi.max_product_uom_qty, ?) as max_qty, coalesce(pwi.max_product_uom_qty, ?) - ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) as need_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where coalesce(pt.is_core, false) = false and coalesce(pwi.stocking_flag, false) = true and coalesce(pt.discontinued, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) < coalesce(pwi.max_product_uom_qty, ?) and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Nov 03 05 108 19s85ms 176ms 06 287 50s758ms 176ms 07 139 24s180ms 173ms -
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 37 and pwi.inventory_vendor_id = 3019;
Date: 2024-11-03 11:08:21 Duration: 349ms
-
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 43 and pwi.inventory_vendor_id = 3035;
Date: 2024-11-03 11:46:53 Duration: 223ms
-
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 37 and pwi.inventory_vendor_id = 3026;
Date: 2024-11-03 11:01:17 Duration: 222ms
15 534 1m16s 133ms 190ms 143ms select id from product_warehouse_inventory where freeze_date is not null and freeze_date > ? and warehouse_id = ? and inventory_vendor_id = ? and qty_available < min_product_uom_qty;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Nov 03 05 108 15s449ms 143ms 06 287 41s110ms 143ms 07 139 19s845ms 142ms -
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:38:43' and warehouse_id = 35 and inventory_vendor_id = 2966 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:38:43 Duration: 190ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:55:24' and warehouse_id = 36 and inventory_vendor_id = 2952 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:55:24 Duration: 189ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:48:22' and warehouse_id = 35 and inventory_vendor_id = 3105 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:48:22 Duration: 189ms
16 534 1m13s 130ms 194ms 137ms select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > ? and warehouse_id = ? and ((coalesce(qty_available, ?) + coalesce(qty_on_order, ?)) - coalesce(qty_reserve, ?)) < ? and inventory_vendor_id = ? and coalesce(superceded, false) = false and coalesce(discontinued, false) = false and coalesce(is_core, false) = false;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Nov 03 05 108 15s4ms 138ms 06 287 39s324ms 137ms 07 139 19s129ms 137ms -
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 37 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 2980 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-11-03 11:07:38 Duration: 194ms
-
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 36 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 2952 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-11-03 10:55:24 Duration: 190ms
-
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 35 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 2956 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-11-03 10:49:12 Duration: 187ms
17 317 50s987ms 150ms 228ms 160ms select pwi.product_id from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where coalesce(pwi.stocking_flag, false) = true and coalesce(pt.is_core, false) = false and coalesce(pt.discontinued, false) = false and coalesce(pt.never_stock, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false and pwi.inventory_vendor_id = ? and pwi.warehouse_id = ? and pwi.product_id not in (...);Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Nov 03 05 65 10s377ms 159ms 06 182 29s345ms 161ms 07 70 11s265ms 160ms -
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3113 and pwi.warehouse_id = 35 and pwi.product_id not in (190550, 190610, 190664);
Date: 2024-11-03 10:41:50 Duration: 228ms
-
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3069 and pwi.warehouse_id = 42 and pwi.product_id not in (204128, 203994, 203982, 203924, 204506);
Date: 2024-11-03 11:34:43 Duration: 210ms
-
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3098 and pwi.warehouse_id = 38 and pwi.product_id not in (188517, 188518, 188558, 188565, 188573, 188596, 188603, 188796, 189027, 189189, 189331, 189446, 188993);
Date: 2024-11-03 11:12:48 Duration: 207ms
18 217 34s295ms 150ms 198ms 158ms select pwi.product_id from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where coalesce(pwi.stocking_flag, false) = true and coalesce(pt.is_core, false) = false and coalesce(pt.discontinued, false) = false and coalesce(pt.never_stock, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false and pwi.inventory_vendor_id = ? and pwi.warehouse_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Nov 03 05 43 6s670ms 155ms 06 105 16s558ms 157ms 07 69 11s66ms 160ms -
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3045 and pwi.warehouse_id = 43;
Date: 2024-11-03 11:52:36 Duration: 198ms
-
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3018 and pwi.warehouse_id = 44;
Date: 2024-11-03 12:09:05 Duration: 184ms
-
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3059 and pwi.warehouse_id = 38;
Date: 2024-11-03 11:15:14 Duration: 182ms
19 158 25s252ms 128ms 589ms 159ms select "account_move".id from "account_move" where ((("account_move"."journal_id" in ( select "account_journal".id from "account_journal" where ("account_journal"."type" in (...)))) and ("account_move"."state" in (...))) and ("account_move"."partner_id" in (...))) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Nov 03 21 158 25s252ms 159ms -
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (45399))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-11-03 01:30:32 Duration: 589ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (45403))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-11-03 01:30:39 Duration: 303ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (35459))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-11-03 01:37:22 Duration: 199ms
20 106 18s683ms 152ms 221ms 176ms select "sale_history_line".id from "sale_history_line" where ("sale_history_line"."customer_id" in (...)) order by "sale_history_line"."id";Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Nov 03 21 106 18s683ms 176ms -
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ("sale_history_line"."customer_id" in (33958)) ORDER BY "sale_history_line"."id";
Date: 2024-11-03 01:30:39 Duration: 221ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ("sale_history_line"."customer_id" in (36765)) ORDER BY "sale_history_line"."id";
Date: 2024-11-03 01:34:52 Duration: 220ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ("sale_history_line"."customer_id" in (36314)) ORDER BY "sale_history_line"."id";
Date: 2024-11-03 01:30:20 Duration: 211ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 3m56s 3m56s 3m56s 1 3m56s 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 Nov 03 05 1 3m56s 3m56s -
COPY public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) TO stdout;
Date: 2024-11-03 10:10:49 Duration: 3m56s
2 2m21s 2m21s 2m21s 1 2m21s 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 Nov 03 05 1 2m21s 2m21s -
COPY public.item_list_line (id, item_demand_plan_id, product_id, selling_branch, product_uom_qty, invoice_date, warehouse_id, method, inventory_vendor_id, create_uid, create_date, write_uid, write_date, active, min_product_len_1, min_product_len_2, min_baseline_size, seasonal_period, supercede_product_id, superceded, campaign_id, source_id, medium_id, message_main_attachment_id, access_token, ref_id, ref) TO stdout;
Date: 2024-11-03 10:04:37 Duration: 2m21s
3 2m1s 2m1s 2m1s 1 2m1s 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 Nov 03 05 1 2m1s 2m1s -
COPY public.mail_message (id, subject, date, body, parent_id, model, res_id, record_name, message_type, subtype_id, mail_activity_type_id, is_internal, email_from, author_id, no_auto_thread, message_id, reply_to, mail_server_id, moderation_status, moderator_id, email_layout_xmlid, add_sign, create_uid, create_date, write_uid, write_date, email_cc, email_bcc, email_to, ks_email_cc_string, ks_email_bcc_string, ks_cc_partners, ks_bcc_partners) TO stdout;
Date: 2024-11-03 10:06:51 Duration: 2m1s
4 129ms 24s587ms 13s849ms 8 1m50s select "mail_message".id from "mail_message" where ((((("mail_message"."id" in ( select "mail_message_res_partner_needaction_rel"."mail_message_id" from "mail_message_res_partner_needaction_rel" where ("mail_message_res_partner_needaction_rel"."notification_status" in (...)))) and ("mail_message"."author_id" = ?)) and ("mail_message"."res_id" != ?)) and "mail_message"."model" is not null) and (("mail_message"."message_type" != ?) or "mail_message"."message_type" is null)) order by "mail_message"."id" desc;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Nov 03 01 4 1m33s 23s426ms 08 1 9s982ms 9s982ms 10 1 827ms 827ms 18 2 6s277ms 3s138ms -
SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;
Date: 2024-11-03 05:33:36 Duration: 24s587ms
-
SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;
Date: 2024-11-03 05:33:36 Duration: 23s732ms
-
SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;
Date: 2024-11-03 05:33:36 Duration: 23s168ms
5 879ms 1m20s 4s238ms 24 1m41s select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Nov 03 22 12 11s546ms 962ms 05 2 1m21s 40s508ms 06 8 7s389ms 923ms 07 2 1s763ms 881ms -
select count(id) from item_list_line where item_demand_plan_id = 3943;
Date: 2024-11-03 10:37:51 Duration: 1m20s
-
select count(id) from item_list_line where item_demand_plan_id = 3947;
Date: 2024-11-03 02:09:30 Duration: 1s315ms
-
select count(id) from item_list_line where item_demand_plan_id = 3948;
Date: 2024-11-03 11:17:30 Duration: 1s23ms
6 1s731ms 2s309ms 1s788ms 534 15m55s select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pt.min_product_uom_qty > ? and pwi.stocking_flag = true and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) <= ? and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.discontinued, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false union all select pwi.product_id, abs(((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?))) as min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pwi.stocking_flag = false and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) < ? and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.discontinued, false) = false and coalesce(pt.never_stock, false) = true and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false union all select pwi.product_id, coalesce(pwi.qty_on_perm_order, ?) as min_product_uom_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where pt.is_core = false and pwi.stocking_flag = true and coalesce(pwi.qty_on_perm_order, ?) > ? and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - (coalesce(pwi.qty_reserve, ?) + coalesce(pwi.qty_on_perm_order, ?))) < ? and pt.discontinued = false and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ? and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Nov 03 05 108 3m13s 1s788ms 06 287 8m32s 1s786ms 07 139 4m9s 1s791ms -
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 45 and pwi.inventory_vendor_id = 2909 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 12:00:16 Duration: 2s309ms
-
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 35 and pwi.inventory_vendor_id = 2980 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 10:46:58 Duration: 2s77ms
-
select pwi.product_id, pt.min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pt.min_product_uom_qty > 0 and pwi.stocking_flag = True and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) <= 0 and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, abs(((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0))) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < 0 and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = True and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False UNION ALL select pwi.product_id, COALESCE(pwi.qty_on_perm_order, 0) as min_product_uom_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where pt.is_core = False and pwi.stocking_flag = True and COALESCE(pwi.qty_on_perm_order, 0) > 0 and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - (COALESCE(pwi.qty_reserve, 0) + COALESCE(pwi.qty_on_perm_order, 0))) < 0 and pt.discontinued = False and pwi.warehouse_id = 41 and pwi.inventory_vendor_id = 2956 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-11-03 11:25:31 Duration: 2s15ms
7 935ms 1s428ms 975ms 2,342 38m5s 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 #7
Day Hour Count Duration Avg duration Nov 03 20 1,060 17m11s 973ms 21 1,058 17m13s 976ms 22 224 3m40s 985ms -
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 = 186130 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 01:30:40 Duration: 1s428ms
-
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 = 185205 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 01:34:02 Duration: 1s374ms
-
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 = 172933 and item_demand_plan_id = 3943 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-11-03 02:04:54 Duration: 1s353ms
8 323ms 844ms 343ms 16,984 1h37m8s select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Nov 03 20 1,290 7m30s 348ms 21 1,218 7m8s 351ms 22 1,044 5m57s 342ms 23 1,363 7m42s 339ms 00 717 4m4s 341ms 01 477 2m41s 338ms 01 489 2m47s 341ms 02 861 4m53s 341ms 03 1,026 5m49s 340ms 04 312 1m46s 339ms 05 21 7s317ms 348ms 06 33 11s607ms 351ms 07 24 8s305ms 346ms 08 39 13s332ms 341ms 09 30 10s737ms 357ms 10 24 8s287ms 345ms 11 168 57s580ms 342ms 12 636 3m37s 341ms 13 1,056 6m 341ms 14 1,171 6m40s 342ms 15 1,145 6m32s 342ms 16 1,260 7m13s 344ms 17 1,350 7m43s 342ms 18 1,230 7m2s 343ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 20:54:53 Duration: 844ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 14:15:47 Duration: 801ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") ASC, "product_template"."id" DESC;
Date: 2024-11-03 21:43:32 Duration: 751ms
9 323ms 869ms 342ms 12,347 1h10m27s select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") desc, "product_template"."id" desc;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Nov 03 20 24 8s464ms 352ms 21 33 11s429ms 346ms 22 12 4s75ms 339ms 23 45 15s325ms 340ms 00 207 1m10s 340ms 01 609 3m26s 338ms 01 498 2m49s 339ms 02 1,023 5m46s 338ms 03 485 2m44s 339ms 04 640 3m37s 339ms 05 399 2m18s 348ms 06 504 2m58s 354ms 07 426 2m27s 345ms 08 642 3m39s 341ms 09 1,284 7m19s 342ms 10 237 1m21s 344ms 11 249 1m25s 341ms 12 515 2m56s 342ms 13 960 5m28s 342ms 14 360 2m3s 342ms 15 659 3m45s 342ms 16 745 4m14s 342ms 17 930 5m19s 343ms 18 861 4m54s 342ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 10:50:11 Duration: 869ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 13:10:36 Duration: 823ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, COALESCE("product_template__name"."value", "product_template"."name") DESC, "product_template"."id" DESC;
Date: 2024-11-03 22:41:36 Duration: 764ms
10 240ms 787ms 253ms 5,343 22m35s select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" desc, "product_template"."id" desc;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Nov 03 20 435 1m52s 258ms 21 432 1m51s 259ms 22 693 2m55s 253ms 23 600 2m30s 250ms 00 144 36s67ms 250ms 01 183 46s241ms 252ms 01 177 44s316ms 250ms 02 39 9s749ms 249ms 03 18 4s532ms 251ms 04 27 6s816ms 252ms 05 15 3s758ms 250ms 06 21 5s531ms 263ms 07 15 3s769ms 251ms 08 15 3s759ms 250ms 09 12 3s53ms 254ms 10 18 4s527ms 251ms 11 99 25s31ms 252ms 12 459 1m56s 253ms 13 435 1m50s 253ms 14 567 2m23s 253ms 15 561 2m21s 252ms 16 327 1m23s 254ms 17 21 5s336ms 254ms 18 30 7s755ms 258ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 19:50:25 Duration: 787ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 02:05:04 Duration: 513ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" DESC, "product_template"."id" DESC;
Date: 2024-11-03 02:05:04 Duration: 494ms
11 240ms 526ms 252ms 7,179 30m15s select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Nov 03 20 15 3s827ms 255ms 21 39 9s883ms 253ms 22 30 7s463ms 248ms 23 48 12s28ms 250ms 00 255 1m4s 251ms 01 789 3m17s 250ms 01 213 53s908ms 253ms 02 303 1m16s 252ms 03 15 3s709ms 247ms 04 30 7s553ms 251ms 05 27 6s833ms 253ms 06 36 9s428ms 261ms 07 39 9s928ms 254ms 08 27 6s910ms 255ms 09 45 11s310ms 251ms 10 39 9s743ms 249ms 11 180 45s588ms 253ms 12 546 2m17s 252ms 13 636 2m40s 252ms 14 846 3m34s 253ms 15 621 2m37s 252ms 16 774 3m15s 253ms 17 663 2m48s 253ms 18 963 4m5s 254ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 19:53:17 Duration: 526ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 05:49:32 Duration: 458ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."list_price" ASC, "product_template"."id" DESC;
Date: 2024-11-03 17:19:10 Duration: 404ms
12 186ms 490ms 195ms 8,186 26m38s update product_warehouse_inventory set sft_stk_qty = ? where id = ( select id from product_warehouse_inventory where product_id = (?) and warehouse_id = (?));Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Nov 03 05 1,755 5m41s 194ms 06 4,901 15m57s 195ms 07 1,530 4m58s 195ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (178278) and warehouse_id = (41));
Date: 2024-11-03 11:24:39 Duration: 490ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (171866) and warehouse_id = (42));
Date: 2024-11-03 11:31:44 Duration: 367ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (217017) and warehouse_id = (45));
Date: 2024-11-03 11:55:02 Duration: 329ms
13 152ms 221ms 176ms 106 18s683ms select "sale_history_line".id from "sale_history_line" where ("sale_history_line"."customer_id" in (...)) order by "sale_history_line"."id";Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Nov 03 21 106 18s683ms 176ms -
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ("sale_history_line"."customer_id" in (33958)) ORDER BY "sale_history_line"."id";
Date: 2024-11-03 01:30:39 Duration: 221ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ("sale_history_line"."customer_id" in (36765)) ORDER BY "sale_history_line"."id";
Date: 2024-11-03 01:34:52 Duration: 220ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ("sale_history_line"."customer_id" in (36314)) ORDER BY "sale_history_line"."id";
Date: 2024-11-03 01:30:20 Duration: 211ms
14 149ms 349ms 176ms 534 1m34s select pwi.product_id, coalesce(pwi.lead_days, ?), coalesce(pwi.min_product_uom_qty, ?) as min_qty, coalesce(pwi.max_product_uom_qty, ?) as max_qty, coalesce(pwi.max_product_uom_qty, ?) - ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) as need_qty from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where coalesce(pt.is_core, false) = false and coalesce(pwi.stocking_flag, false) = true and coalesce(pt.discontinued, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false and ((coalesce(pwi.qty_available, ?) + coalesce(pwi.qty_on_order, ?)) - coalesce(pwi.qty_reserve, ?)) < coalesce(pwi.max_product_uom_qty, ?) and pwi.warehouse_id = ? and pwi.inventory_vendor_id = ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Nov 03 05 108 19s85ms 176ms 06 287 50s758ms 176ms 07 139 24s180ms 173ms -
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 37 and pwi.inventory_vendor_id = 3019;
Date: 2024-11-03 11:08:21 Duration: 349ms
-
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 43 and pwi.inventory_vendor_id = 3035;
Date: 2024-11-03 11:46:53 Duration: 223ms
-
select pwi.product_id, COALESCE(pwi.lead_days, 7), COALESCE(pwi.min_product_uom_qty, 0) as min_qty, COALESCE(pwi.max_product_uom_qty, 0) as max_qty, COALESCE(pwi.max_product_uom_qty, 0) - ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) as need_qty from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pt.is_core, False) = False and COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.discontinued, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and ((COALESCE(pwi.qty_available, 0) + COALESCE(pwi.qty_on_order, 0)) - COALESCE(pwi.qty_reserve, 0)) < COALESCE(pwi.max_product_uom_qty, 0) and pwi.warehouse_id = 37 and pwi.inventory_vendor_id = 3026;
Date: 2024-11-03 11:01:17 Duration: 222ms
15 132ms 1s6ms 161ms 72,265 3h14m18s 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 #15
Day Hour Count Duration Avg duration Nov 03 20 3,132 8m38s 165ms 21 3,193 9m2s 169ms 22 3,053 8m13s 161ms 23 2,597 6m31s 150ms 00 2,912 7m34s 156ms 01 2,970 7m45s 156ms 01 2,994 7m55s 158ms 02 3,058 8m2s 157ms 03 2,917 7m50s 161ms 04 2,849 7m35s 159ms 05 2,708 7m56s 175ms 06 2,961 8m26s 171ms 07 3,107 8m30s 164ms 08 2,998 7m48s 156ms 09 2,870 8m 167ms 10 2,993 8m3s 161ms 11 3,189 8m21s 157ms 12 3,015 8m12s 163ms 13 3,188 8m23s 157ms 14 2,907 7m59s 164ms 15 3,093 8m17s 160ms 16 3,149 8m18s 158ms 17 3,173 8m20s 157ms 18 3,239 8m30s 157ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",53355]', '["pointspring_master","res.partner",53355]', '["pointspring_master","ir.needaction",53355]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 1s6ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') 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","mail.channel",594]', '["pointspring_master","res.partner",19507]', '["pointspring_master","ir.needaction",19507]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 995ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-11-03 19:49:34') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",19532]', '["pointspring_master","mail.channel",318]', '["pointspring_master","mail.channel",319]', '["pointspring_master","mail.channel",320]', '["pointspring_master","mail.channel",321]', '["pointspring_master","mail.channel",455]', '["pointspring_master","mail.channel",466]', '["pointspring_master","res.partner",19532]', '["pointspring_master","ir.needaction",19532]'))) ORDER BY "bus_bus"."id";
Date: 2024-11-03 19:50:25 Duration: 958ms
16 150ms 228ms 160ms 317 50s987ms select pwi.product_id from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where coalesce(pwi.stocking_flag, false) = true and coalesce(pt.is_core, false) = false and coalesce(pt.discontinued, false) = false and coalesce(pt.never_stock, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false and pwi.inventory_vendor_id = ? and pwi.warehouse_id = ? and pwi.product_id not in (...);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Nov 03 05 65 10s377ms 159ms 06 182 29s345ms 161ms 07 70 11s265ms 160ms -
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3113 and pwi.warehouse_id = 35 and pwi.product_id not in (190550, 190610, 190664);
Date: 2024-11-03 10:41:50 Duration: 228ms
-
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3069 and pwi.warehouse_id = 42 and pwi.product_id not in (204128, 203994, 203982, 203924, 204506);
Date: 2024-11-03 11:34:43 Duration: 210ms
-
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3098 and pwi.warehouse_id = 38 and pwi.product_id not in (188517, 188518, 188558, 188565, 188573, 188596, 188603, 188796, 189027, 189189, 189331, 189446, 188993);
Date: 2024-11-03 11:12:48 Duration: 207ms
17 128ms 589ms 159ms 158 25s252ms select "account_move".id from "account_move" where ((("account_move"."journal_id" in ( select "account_journal".id from "account_journal" where ("account_journal"."type" in (...)))) and ("account_move"."state" in (...))) and ("account_move"."partner_id" in (...))) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Nov 03 21 158 25s252ms 159ms -
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (45399))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-11-03 01:30:32 Duration: 589ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (45403))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-11-03 01:30:39 Duration: 303ms
-
SELECT "account_move".id FROM "account_move" WHERE ((("account_move"."journal_id" in ( SELECT "account_journal".id FROM "account_journal" WHERE ("account_journal"."type" in ('sale', 'cash', 'bank')))) AND ("account_move"."state" in ('posted'))) AND ("account_move"."partner_id" in (35459))) ORDER BY "account_move"."invoice_date_due";
Date: 2024-11-03 01:37:22 Duration: 199ms
18 150ms 198ms 158ms 217 34s295ms select pwi.product_id from product_warehouse_inventory pwi left join product_product as pp on pwi.product_id = pp.id left join product_template as pt on pt.id = pp.product_tmpl_id where coalesce(pwi.stocking_flag, false) = true and coalesce(pt.is_core, false) = false and coalesce(pt.discontinued, false) = false and coalesce(pt.never_stock, false) = false and coalesce(pt.superceded, false) = false and coalesce(pt.obsolete, false) = false and pwi.inventory_vendor_id = ? and pwi.warehouse_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Nov 03 05 43 6s670ms 155ms 06 105 16s558ms 157ms 07 69 11s66ms 160ms -
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3045 and pwi.warehouse_id = 43;
Date: 2024-11-03 11:52:36 Duration: 198ms
-
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3018 and pwi.warehouse_id = 44;
Date: 2024-11-03 12:09:05 Duration: 184ms
-
select pwi.product_id from product_warehouse_inventory pwi LEFT JOIN product_product as pp ON pwi.product_id = pp.id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id where COALESCE(pwi.stocking_flag, False) = True and COALESCE(pt.is_core, False) = False and COALESCE(pt.discontinued, False) = False and COALESCE(pt.never_stock, False) = False and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False and pwi.inventory_vendor_id = 3059 and pwi.warehouse_id = 38;
Date: 2024-11-03 11:15:14 Duration: 182ms
19 141ms 344ms 149ms 5,706 14m13s select current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages as real_size, (tblpages - est_tblpages_ff) * bs as bloat_size, case when tblpages - est_tblpages_ff > ? then ? * (tblpages - est_tblpages_ff) / tblpages::float else ? end as bloat_ratio from ( select ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / ?) as est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * ?))) + ceil(toasttuples / ?) as est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na from ( select (? + tpl_hdr_size + tpl_data_size + (? * ma) - case when tpl_hdr_size % ma = ? then ma else tpl_hdr_size % ma end - case when ceil(tpl_data_size)::int % ma = ? then ma else ceil(tpl_data_size)::int % ma end) as tpl_size, bs - page_hdr as size_per_block, (heappages + toastpages) as tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na from ( select tbl.oid as tblid, ns.nspname as schemaname, tbl.relname as tblname, tbl.reltuples, tbl.relpages as heappages, coalesce(toast.relpages, ?) as toastpages, coalesce(toast.reltuples, ?) as toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ?) from ?)::smallint, ?) as fillfactor, current_setting(?)::numeric as bs, case when version() ~ ? or version() ~ ? then ? else ? end as ma, ? as page_hdr, case when current_setting(?)::integer < ? then ? else ? end + case when max(coalesce(null_frac, ?)) > ? then (? + count(*)) / ? else ?::int end + ? as tpl_hdr_size, sum((? - coalesce(s.null_frac, ?)) * coalesce(s.avg_width, ?)) as tpl_data_size, bool_or(att.atttypid = ?::regtype) or count(att.attname) <> count(s.attname) as is_na from pg_attribute as att join pg_class as tbl on att.attrelid = tbl.oid join pg_namespace as ns on ns.oid = tbl.relnamespace left join pg_stats as s on s.schemaname = ns.nspname and s.tablename = tbl.relname and s.attname = att.attname left join pg_class as toast on tbl.reltoastrelid = toast.oid where att.attnum > ? and not att.attisdropped and tbl.relkind = ? group by ?, ?, ?, ?, ?, ?, ?, ?, ?, ? order by ?, ?) as s) as s2) as s3 where not is_na and schemaname || ? || tblname in (...);Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Nov 03 20 240 37s227ms 155ms 21 240 37s349ms 155ms 22 240 36s117ms 150ms 23 200 29s514ms 147ms 00 226 33s409ms 147ms 01 240 35s651ms 148ms 01 240 35s653ms 148ms 02 240 35s387ms 147ms 03 240 35s624ms 148ms 04 240 35s540ms 148ms 05 240 35s877ms 149ms 06 240 36s776ms 153ms 07 240 35s998ms 149ms 08 240 35s578ms 148ms 09 240 35s661ms 148ms 10 240 35s687ms 148ms 11 240 35s753ms 148ms 12 240 36s34ms 150ms 13 240 35s834ms 149ms 14 240 35s652ms 148ms 15 240 35s708ms 148ms 16 240 35s910ms 149ms 17 240 35s968ms 149ms 18 240 36s30ms 150ms -
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_conversion', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_range', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_settings', 'pg_catalog.pg_proc', 'pg_catalog.pg_index', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_extension', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_cursors', 'pg_catalog.pg_class', 'pg_catalog.pg_operator', 'pg_catalog.pg_trigger', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_publication', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_attribute', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_type', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_matviews', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_subscription', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_rules', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_description', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_group', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_collation', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_opclass', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_cast', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_sequence', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_amop', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_user', 'pg_catalog.pg_language', 'pg_catalog.pg_depend', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_locks', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_policies', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_policy', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_all_sequences', 'information_schema.column_column_usage', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.view_routine_usage', 'information_schema.triggered_update_columns', 'information_schema.collations', 'information_schema.column_privileges', 'information_schema.domain_udt_usage', 'information_schema.key_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.parameters', 'information_schema.sequences', 'information_schema.check_constraint_routine_usage', 'information_schema.collation_character_set_applicability', 'information_schema.routine_routine_usage', 'information_schema.user_mapping_options', 'information_schema.role_column_grants', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.data_type_privileges', 'information_schema.foreign_server_options', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.applicable_roles', 'information_schema.routine_table_usage', 'information_schema.sql_sizing', 'information_schema.table_constraints', 'information_schema.column_domain_usage', 'information_schema.domain_constraints', 'information_schema.schemata', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.element_types', 'information_schema.administrable_role_authorizations', 'information_schema.constraint_column_usage', 'information_schema.check_constraints', 'information_schema.constraint_table_usage', 'information_schema.referential_constraints', 'information_schema.sql_implementation_info', 'information_schema.user_mappings', 'information_schema.view_column_usage', 'information_schema.foreign_table_options', 'information_schema.foreign_tables', 'information_schema.attributes', 'information_schema.routines', 'information_schema.columns', 'information_schema.role_routine_grants', 'information_schema.routine_sequence_usage', 'information_schema.tables', 'information_schema.role_udt_grants', 'information_schema.character_sets', 'information_schema.column_udt_usage', 'information_schema.routine_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.routine_column_usage', 'information_schema.view_table_usage', 'information_schema.information_schema_catalog_name', 'information_schema.domains', 'information_schema.enabled_roles', 'information_schema.usage_privileges', 'information_schema.user_defined_types', 'information_schema.foreign_servers', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-11-03 18:00:53 Duration: 344ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_attribute', 'pg_catalog.pg_depend', 'pg_catalog.pg_am', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_proc', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_opclass', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_collation', 'pg_catalog.pg_range', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_policy', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_type', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_namespace', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_user', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_group', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_constraint', 'pg_catalog.pg_amop', 'pg_catalog.pg_transform', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_cast', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_roles', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_operator', 'pg_catalog.pg_database', 'pg_catalog.pg_matviews', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_trigger', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_policies', 'pg_catalog.pg_subscription', 'pg_catalog.pg_index', 'pg_catalog.pg_conversion', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_extension', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_publication', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_rules', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_description', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_default_acl', 'information_schema.administrable_role_authorizations', 'information_schema.columns', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.tables', 'information_schema.view_column_usage', 'information_schema.routine_routine_usage', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.routines', 'information_schema.sequences', 'information_schema.foreign_data_wrappers', 'information_schema.routine_sequence_usage', 'information_schema.udt_privileges', 'information_schema.check_constraints', 'information_schema.column_privileges', 'information_schema.user_mappings', 'information_schema.user_defined_types', 'information_schema.collations', 'information_schema.collation_character_set_applicability', 'information_schema.domain_constraints', 'information_schema.user_mapping_options', 'information_schema.information_schema_catalog_name', 'information_schema.column_udt_usage', 'information_schema.key_column_usage', 'information_schema.table_constraints', 'information_schema.foreign_servers', 'information_schema.sql_features', 'information_schema.views', 'information_schema.view_routine_usage', 'information_schema.attributes', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.routine_table_usage', 'information_schema.sql_implementation_info', 'information_schema.routine_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.column_column_usage', 'information_schema.role_column_grants', 'information_schema.enabled_roles', 'information_schema.role_routine_grants', 'information_schema.role_table_grants', 'information_schema.domain_udt_usage', 'information_schema.foreign_server_options', 'information_schema.foreign_tables', 'information_schema.sql_sizing', 'information_schema.view_table_usage', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.constraint_column_usage', 'information_schema.constraint_table_usage', 'information_schema.element_types', 'information_schema.foreign_table_options', 'information_schema.check_constraint_routine_usage', 'information_schema.parameters', 'information_schema.table_privileges', 'information_schema.schemata', 'information_schema.referential_constraints', 'information_schema.triggered_update_columns', 'information_schema.triggers');
Date: 2024-11-03 01:32:20 Duration: 266ms
-
SELECT -- BLOATQUERY current_database() as database, schemaname as schema_name, tblname as table_name, bs * tblpages AS real_size, (tblpages - est_tblpages_ff) * bs AS bloat_size, CASE WHEN tblpages - est_tblpages_ff > 0 THEN 100 * (tblpages - est_tblpages_ff) / tblpages::float ELSE 0 END AS bloat_ratio -- , (pst).free_percent + (pst).dead_tuple_percent AS real_frag FROM ( SELECT ceil(reltuples / ((bs - page_hdr) / tpl_size)) + ceil(toasttuples / 4) AS est_tblpages, ceil(reltuples / ((bs - page_hdr) * fillfactor / (tpl_size * 100))) + ceil(toasttuples / 4) AS est_tblpages_ff, tblpages, fillfactor, bs, tblid, schemaname, tblname, heappages, toastpages, is_na -- , stattuple.pgstattuple(tblid) AS pst FROM ( SELECT (4 + tpl_hdr_size + tpl_data_size + (2 * ma) - CASE WHEN tpl_hdr_size % ma = 0 THEN ma ELSE tpl_hdr_size % ma END - CASE WHEN ceil(tpl_data_size)::int % ma = 0 THEN ma ELSE ceil(tpl_data_size)::int % ma END) AS tpl_size, bs - page_hdr AS size_per_block, (heappages + toastpages) AS tblpages, heappages, toastpages, reltuples, toasttuples, bs, page_hdr, tblid, schemaname, tblname, fillfactor, is_na FROM ( SELECT tbl.oid AS tblid, ns.nspname AS schemaname, tbl.relname AS tblname, tbl.reltuples, tbl.relpages AS heappages, coalesce(toast.relpages, 0) AS toastpages, coalesce(toast.reltuples, 0) AS toasttuples, coalesce(substring(array_to_string(tbl.reloptions, ' ') FROM 'fillfactor=([0-9]+)')::smallint, 100) AS fillfactor, current_setting('block_size')::numeric AS bs, CASE WHEN version() ~ 'mingw32' OR version() ~ '64-bit|x86_64|ppc64|ia64|amd64' THEN 8 ELSE 4 END AS ma, 24 AS page_hdr, CASE WHEN current_setting('server_version_num')::integer < 80300 THEN 27 ELSE 23 END + CASE WHEN MAX(coalesce(null_frac, 0)) > 0 THEN (7 + count(*)) / 8 ELSE 0::int END +0 AS tpl_hdr_size, sum((1 - coalesce(s.null_frac, 0)) * coalesce(s.avg_width, 1024)) AS tpl_data_size, bool_or(att.atttypid = 'pg_catalog.name'::regtype) OR count(att.attname) <> count(s.attname) AS is_na FROM pg_attribute AS att JOIN pg_class AS tbl ON att.attrelid = tbl.oid JOIN pg_namespace AS ns ON ns.oid = tbl.relnamespace LEFT JOIN pg_stats AS s ON s.schemaname = ns.nspname AND s.tablename = tbl.relname AND s.attname = att.attname LEFT JOIN pg_class AS toast ON tbl.reltoastrelid = toast.oid WHERE att.attnum > 0 AND NOT att.attisdropped AND tbl.relkind = 'r' GROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ORDER BY 2, 3) AS s) AS s2) AS s3 where not is_na and schemaname || '.' || tblname in ('pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_user', 'pg_catalog.pg_class', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_transform', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stats', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_description', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_enum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_extension', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_conversion', 'pg_catalog.pg_database', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_indexes', 'pg_catalog.pg_locks', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_inherits', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_cast', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_index', 'pg_catalog.pg_am', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_attribute', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_sequence', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_trigger', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_roles', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_publication', 'pg_catalog.pg_policies', 'pg_catalog.pg_language', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_type', 'pg_catalog.pg_settings', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_policy', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_operator', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_depend', 'pg_catalog.pg_views', 'pg_catalog.pg_sequences', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_collation', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_group', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_amproc', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_range', 'information_schema.applicable_roles', 'information_schema.routine_column_usage', 'information_schema.constraint_table_usage', 'information_schema.table_privileges', 'information_schema.role_udt_grants', 'information_schema.information_schema_catalog_name', 'information_schema.column_privileges', 'information_schema.key_column_usage', 'information_schema.routines', 'information_schema.constraint_column_usage', 'information_schema.view_table_usage', 'information_schema.administrable_role_authorizations', 'information_schema.role_column_grants', 'information_schema.domain_constraints', 'information_schema.column_domain_usage', 'information_schema.domain_udt_usage', 'information_schema.schemata', 'information_schema.parameters', 'information_schema.views', 'information_schema.character_sets', 'information_schema.routine_routine_usage', 'information_schema.sql_features', 'information_schema.triggered_update_columns', 'information_schema.foreign_data_wrappers', 'information_schema.foreign_server_options', 'information_schema.attributes', 'information_schema.role_table_grants', 'information_schema.user_defined_types', 'information_schema.column_column_usage', 'information_schema.collations', 'information_schema.foreign_table_options', 'information_schema.usage_privileges', 'information_schema.sql_implementation_info', 'information_schema.role_usage_grants', 'information_schema.column_options', 'information_schema.user_mapping_options', 'information_schema.referential_constraints', 'information_schema.sequences', 'information_schema.routine_table_usage', 'information_schema.sql_sizing', 'information_schema.data_type_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.columns', 'information_schema.routine_sequence_usage', 'information_schema.triggers', 'information_schema.view_routine_usage', 'information_schema.foreign_tables', 'information_schema.column_udt_usage', 'information_schema.routine_privileges', 'information_schema.domains', 'information_schema.enabled_roles', 'information_schema.role_routine_grants', 'information_schema.tables', 'information_schema.element_types', 'information_schema.collation_character_set_applicability', 'information_schema.udt_privileges', 'information_schema.foreign_data_wrapper_options', 'information_schema.user_mappings', 'information_schema.table_constraints', 'information_schema.check_constraint_routine_usage', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-11-03 00:35:05 Duration: 265ms
20 133ms 190ms 143ms 534 1m16s select id from product_warehouse_inventory where freeze_date is not null and freeze_date > ? and warehouse_id = ? and inventory_vendor_id = ? and qty_available < min_product_uom_qty;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Nov 03 05 108 15s449ms 143ms 06 287 41s110ms 143ms 07 139 19s845ms 142ms -
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:38:43' and warehouse_id = 35 and inventory_vendor_id = 2966 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:38:43 Duration: 190ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:55:24' and warehouse_id = 36 and inventory_vendor_id = 2952 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:55:24 Duration: 189ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-11-03 10:48:22' and warehouse_id = 35 and inventory_vendor_id = 3105 and qty_available < min_product_uom_qty;
Date: 2024-11-03 10:48:22 Duration: 189ms
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
- 143,730 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 950 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 943 Max number of times the same event was reported
- 950 Total events found
Rank Times reported Error 1 943 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Nov 03 20 35 21 34 22 29 23 13 00 34 01 33 01 30 02 101 03 129 04 32 05 37 06 37 07 31 08 28 09 30 10 33 11 36 12 33 13 30 14 35 15 34 16 39 17 34 18 36 - ERROR: could not obtain lock on row in relation "ir_cron"
- ERROR: could not obtain lock on row in relation "ir_cron"
- ERROR: could not obtain lock on row in relation "ir_cron"
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=67 FOR UPDATE NOWAIT
Date: 2024-11-03 17:50:04
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=66 FOR UPDATE NOWAIT
Date: 2024-11-03 18:40:26
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=68 FOR UPDATE NOWAIT
Date: 2024-11-03 14:00:17
2 7 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Nov 03 01 1 04 1 05 2 08 1 10 1 17 1 - ERROR: could not serialize access due to concurrent update
- ERROR: could not serialize access due to concurrent update
- ERROR: could not serialize access due to concurrent update
Statement: UPDATE "bus_presence" SET "last_poll"='2024-11-03 13:55:23',"last_presence"='2024-11-03 13:55:23.173416' WHERE id IN (21)
Date: 2024-11-03 13:55:23
Statement: UPDATE "bus_presence" SET "last_poll"='2024-11-03 15:46:12',"last_presence"='2024-11-03 15:46:06.183065' WHERE id IN (152)
Date: 2024-11-03 15:46:12
Statement: UPDATE "bus_presence" SET "last_poll"='2024-11-03 10:50:10' WHERE id IN (202)
Date: 2024-11-03 10:50:10