-
Global information
- Generated on Sun Sep 29 20:50:04 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 191,373 log entries in 3s
- Log start from 2024-09-29 00:00:03 to 2024-09-29 23:59:59
-
Overview
Global Stats
- 156 Number of unique normalized queries
- 66,443 Number of queries
- 3h28m41s Total query duration
- 2024-09-29 00:00:03 First query
- 2024-09-29 23:59:59 Last query
- 34 queries/s at 2024-09-29 09:45:46 Query peak
- 3h28m41s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 3h28m41s Execute total duration
- 961 Number of events
- 2 Number of unique normalized events
- 896 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
- 66,443 Average queries per session
- 3h28m41s 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
- 34 queries/s Query Peak
- 2024-09-29 09:45:46 Date
SELECT Traffic
Key values
- 34 queries/s Query Peak
- 2024-09-29 09:45:46 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 6 queries/s Query Peak
- 2024-09-29 11:19:18 Date
Queries duration
Key values
- 3h28m41s 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) Sep 29 00 3,060 0ms 687ms 164ms 12s183ms 14s997ms 18s135ms 01 2,947 120ms 989ms 148ms 8s644ms 9s689ms 11s996ms 02 2,655 120ms 664ms 147ms 7s921ms 8s634ms 16s630ms 03 2,218 121ms 6s516ms 156ms 9s520ms 12s289ms 18s402ms 04 2,334 120ms 662ms 150ms 7s819ms 9s774ms 16s43ms 05 3,012 120ms 849ms 176ms 12s586ms 16s886ms 21s371ms 06 3,392 120ms 751ms 181ms 12s179ms 13s41ms 20s451ms 07 2,696 0ms 6s563ms 178ms 12s415ms 14s946ms 22s316ms 08 2,717 120ms 821ms 145ms 8s189ms 8s915ms 10s263ms 09 2,634 120ms 4m28s 478ms 1m3s 2m18s 5m21s 10 4,997 120ms 3m7s 229ms 37s566ms 44s919ms 3m27s 11 9,183 120ms 1s862ms 226ms 45s965ms 49s850ms 51s73ms 12 4,830 120ms 1s932ms 197ms 38s704ms 49s875ms 58s511ms 13 2,418 120ms 909ms 157ms 8s613ms 8s901ms 20s342ms 14 2,615 120ms 816ms 153ms 7s875ms 9s131ms 15s780ms 15 2,607 120ms 778ms 148ms 7s496ms 8s143ms 13s674ms 16 2,475 121ms 341ms 140ms 6s942ms 7s472ms 7s582ms 17 1,996 120ms 673ms 153ms 6s466ms 8s830ms 18s138ms 18 2,097 127ms 810ms 159ms 7s91ms 11s965ms 22s687ms 19 1,513 120ms 596ms 151ms 5s302ms 7s212ms 8s77ms 20 1,927 120ms 562ms 153ms 6s816ms 7s310ms 7s669ms 21 1,386 120ms 349ms 155ms 5s248ms 5s668ms 6s503ms 22 447 122ms 360ms 152ms 2s247ms 2s294ms 2s403ms 23 287 120ms 6s378ms 188ms 1s343ms 1s703ms 10s692ms Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Sep 29 00 3,060 0 164ms 9s522ms 12s183ms 17s4ms 01 2,946 0 148ms 8s246ms 8s644ms 10s465ms 02 2,655 0 147ms 7s32ms 7s921ms 12s189ms 03 2,216 0 152ms 7s222ms 9s288ms 17s899ms 04 2,334 0 150ms 6s559ms 7s819ms 9s850ms 05 3,011 0 176ms 11s285ms 12s586ms 17s171ms 06 3,392 0 181ms 11s801ms 12s179ms 16s553ms 07 2,694 0 175ms 11s636ms 12s339ms 14s946ms 08 2,715 0 145ms 7s11ms 8s189ms 10s51ms 09 2,517 117 478ms 9s551ms 55s957ms 2m22s 10 3,333 0 256ms 17s550ms 24s42ms 32s444ms 11 4,471 0 280ms 31s77ms 35s966ms 40s668ms 12 3,067 0 210ms 18s163ms 22s787ms 35s907ms 13 2,418 0 157ms 7s114ms 8s613ms 11s10ms 14 2,615 0 153ms 7s500ms 7s875ms 14s883ms 15 2,607 0 148ms 7s103ms 7s496ms 8s382ms 16 2,475 0 140ms 6s298ms 6s942ms 7s496ms 17 1,996 0 153ms 6s171ms 6s466ms 11s115ms 18 2,097 0 159ms 6s49ms 7s91ms 17s249ms 19 1,513 0 151ms 4s589ms 5s302ms 7s241ms 20 1,927 0 153ms 6s109ms 6s816ms 7s340ms 21 1,386 0 155ms 4s787ms 5s248ms 5s757ms 22 447 0 152ms 1s714ms 2s247ms 2s373ms 23 285 0 157ms 813ms 1s343ms 1s745ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Sep 29 00 0 0 0 0 0ms 0ms 0ms 0ms 01 0 1 0 0 420ms 0ms 0ms 0ms 02 0 0 0 0 0ms 0ms 0ms 0ms 03 0 0 2 0 4s557ms 0ms 0ms 0ms 04 0 0 0 0 0ms 0ms 0ms 0ms 05 0 0 1 0 734ms 0ms 0ms 0ms 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 0 2 0 4s601ms 0ms 0ms 0ms 08 0 1 0 0 821ms 0ms 0ms 0ms 09 0 0 0 0 0ms 0ms 0ms 0ms 10 0 1,664 0 0 175ms 0ms 12s785ms 20s773ms 11 0 4,711 0 0 175ms 13s675ms 18s216ms 34s131ms 12 0 1,763 0 0 175ms 0ms 12s444ms 36s218ms 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 0 0 0 0ms 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 2 0 4s473ms 0ms 0ms 0ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Sep 29 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 Sep 29 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 Sep 29 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 Sep 29 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 Sep 29 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) Sep 29 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 Sep 29 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 Sep 29 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 Sep 29 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
- 58,177 Total read queries
- 8,266 Total write queries
Queries by database
Key values
- unknown Main database
- 66,443 Requests
- 3h28m41s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 66,995 Requests
User Request type Count Duration unknown Total 66,995 3h30m7s copy to 117 14m7s cte 1 120ms delete 7 27s998ms select 58,729 2h51m41s tcl 1 135ms update 8,140 23m50s Duration by user
Key values
- 3h30m7s (unknown) Main time consuming user
User Request type Count Duration unknown Total 66,995 3h30m7s copy to 117 14m7s cte 1 120ms delete 7 27s998ms select 58,729 2h51m41s tcl 1 135ms update 8,140 23m50s Queries by host
Key values
- unknown Main host
- 66,995 Requests
- 3h30m7s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 66,443 Requests
- 3h28m41s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-09-29 13:00:39 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 65,260 100-500ms duration
Slowest individual queries
Rank Duration Query 1 4m28s 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-09-29 09:11:10 ]
2 3m7s select count(id) from item_list_line where item_demand_plan_id = 3926;[ Date: 2024-09-29 10:39:35 ]
3 2m10s 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-09-29 09:04:20 ]
4 2m7s 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-09-29 09:06:41 ]
5 39s708ms 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-09-29 09:01:04 ]
6 24s35ms 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) TO stdout;[ Date: 2024-09-29 09:13:24 ]
7 19s97ms 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-09-29 09:01:32 ]
8 16s860ms 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-09-29 09:00:24 ]
9 12s666ms 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-09-29 09:11:24 ]
10 12s39ms COPY public.bus_bus (id, channel, message, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-09-29 09:01:45 ]
11 11s202ms 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-09-29 09:13:53 ]
12 9s810ms 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-09-29 09:12:53 ]
13 8s120ms 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-09-29 09:02:01 ]
14 7s963ms COPY public.sale_order_line (id, order_id, name, sequence, invoice_status, price_unit, price_subtotal, price_tax, price_total, price_reduce, price_reduce_taxinc, price_reduce_taxexcl, discount, product_id, product_uom_qty, product_uom, qty_delivered_method, qty_delivered, qty_delivered_manual, qty_to_invoice, qty_invoiced, untaxed_amount_invoiced, untaxed_amount_to_invoice, salesman_id, currency_id, company_id, order_partner_id, is_expense, is_downpayment, state, customer_lead, display_type, create_uid, create_date, write_uid, write_date, product_packaging, route_id, project_id, task_id, is_service, linked_line_id, warning_stock, margin, margin_percent, purchase_price, is_delivery, so_line_id, return_rule_skiped, move_options, core_qty, core_bank_transaction, rebate_amount, is_visible_in_report, is_call_for_price_prod, open_qty_fil_moved0, core_sol_id, core_bank_id, product_pricelist_item_id, branch_id, open_qty_fil_moved1, open_qty_fil_moved2, open_qty_fil_moved3, open_qty_fil_moved4, tick, open_qty_fil_moved5, open_qty_fil_moved6, open_qty_fil_moved7, open_qty_fil_moved8, open_qty_fil_moved9, open_qty_fil_moved10, open_qty_fil_moved11, open_qty_fil_moved12, open_qty_fil_moved13, open_qty_fil_moved14, open_qty_fil, exception_sale, manual_price_changed, cus_date_order, cus_user_id, cus_part_route, is_legacy, inventory_vendor_id, warehouse_id, original_price, is_core, is_ohio_tax_free) TO stdout;[ Date: 2024-09-29 09:13:34 ]
15 7s813ms COPY public.stock_move_line (id, picking_id, move_id, company_id, product_id, product_uom_id, product_qty, product_uom_qty, qty_done, package_id, package_level_id, lot_id, lot_name, result_package_id, date, owner_id, location_id, location_dest_id, state, reference, description_picking, create_uid, create_date, write_uid, write_date, workorder_id, production_id, related_core_sale_line_id, related_sale_line_id, related_core_purchase_line_id, related_purchase_line_id, related_core_stock_line_id, move_options, purchase_qty, related_repair_line_id, related_core_repair_line_id, branch_id, related_core_bom_line_id, related_bom_line_id, related_raw_material_production_id, linked_has_core_ml_id, order_purchase_qty, current_warehouse_qty, description) TO stdout;[ Date: 2024-09-29 09:14:01 ]
16 7s804ms COPY public.stock_valuation_layer (id, company_id, product_id, quantity, unit_cost, value, remaining_qty, remaining_value, description, stock_valuation_layer_id, stock_move_id, account_move_id, create_uid, create_date, write_uid, write_date, move_options, other_action, final_action, is_adjust_valuation, cost_svl_id) TO stdout;[ Date: 2024-09-29 09:14:16 ]
17 6s563ms DELETE FROM account_move_line WHERE id IN (5914869, 5914870, 5914871);[ Date: 2024-09-29 07:07:24 ]
18 6s516ms DELETE FROM account_move_line WHERE id IN (5914856, 5914857, 5914858);[ Date: 2024-09-29 03:07:13 ]
19 6s378ms DELETE FROM account_move_line WHERE id IN (5914872, 5914873, 5914874);[ Date: 2024-09-29 23:07:38 ]
20 6s35ms COPY public.stock_picking (id, message_main_attachment_id, name, origin, note, backorder_id, move_type, state, group_id, priority, scheduled_date, date_deadline, has_deadline_issue, date, date_done, location_id, location_dest_id, picking_type_id, partner_id, company_id, user_id, owner_id, printed, is_locked, immediate_transfer, create_uid, create_date, write_uid, write_date, sale_id, website_id, branch_id, carrier_price, carrier_id, weight, carrier_tracking_ref, saleorder_custom_id, purchaseorder_custom_id, stock_part_id, stock_product_qty, stock_type, stock_action, to_check_negative, next_picking_id, prev_picking_id, repair_id, is_intra_com, salesperson, date_order, part_route, move_branch_mrp_id, move_to_gear_id, supply_plan_id, all_references, src_warehouse_id, dest_warehouse_id, edi_810_id, batch_id, transfer_id, request_date, old_rec_update, is_rtv_picking) TO stdout;[ Date: 2024-09-29 09:14:07 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 1h54m55s 46,110 125ms 1s125ms 149ms 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 Sep 29 20 2,531 6m25s 152ms 21 2,621 6m17s 143ms 22 2,353 5m40s 144ms 23 1,898 4m42s 148ms 00 2,030 4m56s 145ms 01 2,301 5m55s 154ms 02 2,372 5m48s 146ms 03 2,051 5m21s 156ms 04 2,402 5m37s 140ms 05 2,173 5m47s 159ms 06 2,435 5m59s 147ms 07 2,224 5m41s 153ms 08 2,231 5m49s 156ms 09 2,069 5m14s 152ms 10 2,293 5m41s 149ms 11 2,279 5m28s 144ms 12 2,216 5m8s 139ms 13 1,755 4m31s 154ms 14 1,857 4m58s 160ms 15 1,271 3m14s 152ms 16 1,570 3m47s 144ms 17 1,002 2m20s 140ms 18 176 24s850ms 141ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') 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-09-29 09:45:46 Duration: 1s125ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1296"', '["pointspring_master","calendar.alarm",53360]', '["pointspring_master","res.partner",53360]', '["pointspring_master","ir.needaction",53360]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-29 09:45:46 Duration: 1s99ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_974"', '["pointspring_master","calendar.alarm",19512]', '["pointspring_master","mail.channel",419]', '["pointspring_master","mail.channel",420]', '["pointspring_master","mail.channel",421]', '["pointspring_master","mail.channel",489]', '["pointspring_master","mail.channel",557]', '["pointspring_master","res.partner",19512]', '["pointspring_master","ir.needaction",19512]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-29 09:45:46 Duration: 1s64ms
2 23m49s 8,138 169ms 534ms 175ms 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 #2
Day Hour Count Duration Avg duration Sep 29 06 1,664 4m52s 175ms 07 4,711 13m46s 175ms 08 1,763 5m10s 175ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (190964) and warehouse_id = (35));
Date: 2024-09-29 12:00:48 Duration: 534ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209391) and warehouse_id = (35));
Date: 2024-09-29 12:01:39 Duration: 269ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (193946) and warehouse_id = (35));
Date: 2024-09-29 11:50:13 Duration: 232ms
3 16m10s 556 1s712ms 1s932ms 1s745ms 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 #3
Day Hour Count Duration Avg duration Sep 29 06 101 2m56s 1s750ms 07 354 10m17s 1s744ms 08 101 2m56s 1s745ms -
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 = 37 and pwi.inventory_vendor_id = 3092 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 = 37 and pwi.inventory_vendor_id = 3092 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 = 37 and pwi.inventory_vendor_id = 3092 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:09:14 Duration: 1s932ms
-
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 = 3105 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 = 3105 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 = 3105 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:17:37 Duration: 1s905ms
-
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 = 37 and pwi.inventory_vendor_id = 2978 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 = 37 and pwi.inventory_vendor_id = 2978 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 = 37 and pwi.inventory_vendor_id = 2978 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:03:20 Duration: 1s871ms
4 13m48s 5,707 140ms 278ms 145ms 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 #4
Day Hour Count Duration Avg duration Sep 29 20 240 35s113ms 146ms 21 240 34s866ms 145ms 22 240 34s665ms 144ms 23 200 29s40ms 145ms 00 227 32s885ms 144ms 01 240 34s759ms 144ms 02 240 34s707ms 144ms 03 240 34s712ms 144ms 04 240 34s889ms 145ms 05 240 34s849ms 145ms 06 240 35s100ms 146ms 07 240 35s977ms 149ms 08 240 35s16ms 145ms 09 240 34s673ms 144ms 10 240 34s789ms 144ms 11 240 34s762ms 144ms 12 240 34s610ms 144ms 13 240 34s646ms 144ms 14 240 34s696ms 144ms 15 240 34s722ms 144ms 16 240 34s701ms 144ms 17 240 34s630ms 144ms 18 240 34s575ms 144ms 19 240 34s738ms 144ms -
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_trigger', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_publication', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_matviews', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_depend', 'pg_catalog.pg_roles', 'pg_catalog.pg_sequences', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_cursors', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequence', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_extension', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_type', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_group', 'pg_catalog.pg_range', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_policy', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_description', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_enum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_cast', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_index', 'pg_catalog.pg_am', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_language', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_database', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_class', 'pg_catalog.pg_stats', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_event_trigger', 'information_schema.role_udt_grants', 'information_schema.columns', 'information_schema.domain_udt_usage', 'information_schema.schemata', 'information_schema.collation_character_set_applicability', 'information_schema.collations', 'information_schema.parameters', 'information_schema.role_usage_grants', 'information_schema.check_constraint_routine_usage', 'information_schema.sql_features', 'information_schema.sql_sizing', 'information_schema.element_types', 'information_schema.column_column_usage', 'information_schema.routines', 'information_schema.role_routine_grants', 'information_schema.table_privileges', 'information_schema.udt_privileges', 'information_schema.foreign_tables', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrapper_options', 'information_schema.user_mapping_options', 'information_schema.administrable_role_authorizations', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.view_column_usage', 'information_schema.role_column_grants', 'information_schema.key_column_usage', 'information_schema.user_mappings', 'information_schema.attributes', 'information_schema.routine_table_usage', 'information_schema.triggered_update_columns', 'information_schema.triggers', 'information_schema.user_defined_types', 'information_schema.column_options', 'information_schema.foreign_server_options', 'information_schema.routine_column_usage', 'information_schema.usage_privileges', 'information_schema.views', 'information_schema.column_udt_usage', 'information_schema.foreign_data_wrappers', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.character_sets', 'information_schema.referential_constraints', 'information_schema.sql_implementation_info', 'information_schema.domain_constraints', 'information_schema.domains', 'information_schema.table_constraints', 'information_schema.view_table_usage', 'information_schema.foreign_table_options', 'information_schema.constraint_column_usage', 'information_schema.column_privileges', 'information_schema.constraint_table_usage', 'information_schema.routine_sequence_usage', 'information_schema.sequences', 'information_schema.tables', 'information_schema.data_type_privileges', 'information_schema.column_domain_usage', 'information_schema.routine_routine_usage', 'information_schema.role_table_grants', 'information_schema.view_routine_usage', 'information_schema.applicable_roles', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 19:38:59 Duration: 278ms
-
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_inherits', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_operator', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_database', 'pg_catalog.pg_tables', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_conversion', 'pg_catalog.pg_policy', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_attribute', 'pg_catalog.pg_user', 'pg_catalog.pg_index', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_class', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_enum', 'pg_catalog.pg_locks', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_trigger', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_cursors', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_group', 'pg_catalog.pg_settings', 'pg_catalog.pg_amproc', 'pg_catalog.pg_language', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_policies', 'pg_catalog.pg_range', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_depend', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_roles', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_am', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_subscription', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_type', 'pg_catalog.pg_opclass', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_extension', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_proc', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_publication', 'information_schema.foreign_tables', 'information_schema.column_udt_usage', 'information_schema.routine_sequence_usage', 'information_schema.sql_sizing', 'information_schema.table_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_server_options', 'information_schema.administrable_role_authorizations', 'information_schema.routines', 'information_schema.table_constraints', 'information_schema.triggers', 'information_schema.tables', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.role_usage_grants', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraint_routine_usage', 'information_schema.collation_character_set_applicability', 'information_schema.column_domain_usage', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.view_routine_usage', 'information_schema.applicable_roles', 'information_schema.column_column_usage', 'information_schema.constraint_column_usage', 'information_schema.key_column_usage', 'information_schema.user_mapping_options', 'information_schema.foreign_table_options', 'information_schema.enabled_roles', 'information_schema.schemata', 'information_schema.routine_routine_usage', 'information_schema.element_types', 'information_schema.constraint_table_usage', 'information_schema.foreign_data_wrapper_options', 'information_schema.collations', 'information_schema.column_privileges', 'information_schema.domain_constraints', 'information_schema.triggered_update_columns', 'information_schema.columns', 'information_schema.domains', 'information_schema.view_table_usage', 'information_schema.foreign_data_wrappers', 'information_schema.routine_column_usage', 'information_schema.role_routine_grants', 'information_schema.sql_implementation_info', 'information_schema.sql_features', 'information_schema.role_column_grants', 'information_schema.domain_udt_usage', 'information_schema.check_constraints', 'information_schema.referential_constraints', 'information_schema.routine_table_usage', 'information_schema.user_defined_types', 'information_schema.attributes', 'information_schema.character_sets', 'information_schema.udt_privileges', 'information_schema.sequences', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.routine_privileges', 'information_schema.column_options', 'information_schema.foreign_servers', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 01:27:56 Duration: 253ms
-
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_opfamily', 'pg_catalog.pg_cast', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_roles', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_collation', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_type', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_database', 'pg_catalog.pg_views', 'pg_catalog.pg_subscription', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_depend', 'pg_catalog.pg_am', 'pg_catalog.pg_trigger', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_opclass', 'pg_catalog.pg_language', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_tables', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_conversion', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_locks', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_group', 'pg_catalog.pg_amop', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_description', 'pg_catalog.pg_enum', 'pg_catalog.pg_policy', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_settings', 'pg_catalog.pg_operator', 'pg_catalog.pg_sequences', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_extension', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_transform', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_matviews', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_proc', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_slru', 'information_schema.view_column_usage', 'information_schema.column_domain_usage', 'information_schema.column_udt_usage', 'information_schema.table_constraints', 'information_schema.view_table_usage', 'information_schema.views', 'information_schema.role_usage_grants', 'information_schema.routine_column_usage', 'information_schema.parameters', 'information_schema.routine_sequence_usage', 'information_schema.user_mapping_options', 'information_schema.information_schema_catalog_name', 'information_schema.columns', 'information_schema.triggered_update_columns', 'information_schema.routine_privileges', 'information_schema.sequences', 'information_schema.sql_sizing', 'information_schema.element_types', 'information_schema.foreign_tables', 'information_schema.collation_character_set_applicability', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.character_sets', 'information_schema.routines', 'information_schema.role_column_grants', 'information_schema.data_type_privileges', 'information_schema.column_privileges', 'information_schema.routine_table_usage', 'information_schema.check_constraint_routine_usage', 'information_schema.check_constraints', 'information_schema.routine_routine_usage', 'information_schema.foreign_servers', 'information_schema.column_column_usage', 'information_schema.constraint_table_usage', 'information_schema.role_routine_grants', 'information_schema.user_mappings', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.tables', 'information_schema.column_options', 'information_schema.domains', 'information_schema.table_privileges', 'information_schema.foreign_data_wrappers', 'information_schema.view_routine_usage', 'information_schema.domain_udt_usage', 'information_schema.key_column_usage', 'information_schema.role_udt_grants', 'information_schema.foreign_server_options', 'information_schema.attributes', 'information_schema.referential_constraints', 'information_schema.sql_features', 'information_schema.udt_privileges', 'information_schema.foreign_table_options', 'information_schema.collations', 'information_schema.constraint_column_usage', 'information_schema.schemata', 'information_schema.sql_implementation_info', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.domain_constraints', 'information_schema.enabled_roles', 'information_schema.user_defined_types', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 15:00:13 Duration: 249ms
5 5m47s 1,044 324ms 398ms 333ms 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 #5
Day Hour Count Duration Avg duration Sep 29 20 36 12s139ms 337ms 21 6 2s63ms 343ms 22 21 7s8ms 333ms 23 24 8s105ms 337ms 00 24 7s949ms 331ms 01 171 56s801ms 332ms 02 279 1m32s 331ms 03 105 34s757ms 331ms 04 24 8s75ms 336ms 05 39 13s81ms 335ms 06 39 12s997ms 333ms 07 30 10s299ms 343ms 08 27 8s952ms 331ms 09 39 13s15ms 333ms 10 36 11s902ms 330ms 11 30 9s907ms 330ms 12 9 3s9ms 334ms 16 51 17s88ms 335ms 17 45 15s98ms 335ms 18 6 1s985ms 330ms 19 3 1s35ms 345ms -
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-09-29 08:38:28 Duration: 398ms
-
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-09-29 01:14:34 Duration: 389ms
-
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-09-29 11:30:32 Duration: 389ms
6 4m28s 1 4m28s 4m28s 4m28s 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 #6
Day Hour Count Duration Avg duration Sep 29 05 1 4m28s 4m28s -
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-09-29 09:11:10 Duration: 4m28s
7 4m25s 810 319ms 459ms 328ms 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 #7
Day Hour Count Duration Avg duration Sep 29 20 99 32s717ms 330ms 21 36 11s975ms 332ms 22 6 1s956ms 326ms 23 3 985ms 328ms 00 15 4s885ms 325ms 01 123 40s230ms 327ms 02 216 1m10s 326ms 03 129 42s246ms 327ms 04 18 5s910ms 328ms 05 33 10s945ms 331ms 06 15 4s915ms 327ms 07 15 5s104ms 340ms 08 18 5s851ms 325ms 09 21 6s838ms 325ms 10 18 5s881ms 326ms 11 18 5s918ms 328ms 16 9 2s948ms 327ms 17 18 5s890ms 327ms -
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-09-29 07:13:16 Duration: 459ms
-
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-09-29 07:12:25 Duration: 420ms
-
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-09-29 01:01:21 Duration: 419ms
8 3m27s 844 238ms 336ms 245ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) 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 #8
Day Hour Count Duration Avg duration Sep 29 20 51 12s615ms 247ms 21 24 5s886ms 245ms 22 27 6s700ms 248ms 23 24 6s 250ms 00 24 5s885ms 245ms 01 118 28s903ms 244ms 02 189 46s157ms 244ms 03 105 25s497ms 242ms 04 24 5s869ms 244ms 05 18 4s414ms 245ms 06 24 5s905ms 246ms 07 39 9s802ms 251ms 08 12 2s934ms 244ms 09 30 7s422ms 247ms 10 21 5s137ms 244ms 11 27 6s586ms 243ms 12 3 739ms 246ms 16 30 7s473ms 249ms 17 45 11s93ms 246ms 18 3 737ms 245ms 19 6 1s468ms 244ms -
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-09-29 03:13:24 Duration: 336ms
-
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-09-29 06:07:16 Duration: 328ms
-
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-09-29 13:55:06 Duration: 324ms
9 3m15s 11 833ms 3m7s 17s815ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Sep 29 06 2 3m8s 1m34s 07 7 5s959ms 851ms 08 2 1s681ms 840ms -
select count(id) from item_list_line where item_demand_plan_id = 3926;
Date: 2024-09-29 10:39:35 Duration: 3m7s
-
select count(id) from item_list_line where item_demand_plan_id = 3930;
Date: 2024-09-29 11:35:05 Duration: 878ms
-
select count(id) from item_list_line where item_demand_plan_id = 3922;
Date: 2024-09-29 11:18:24 Duration: 857ms
10 2m10s 1 2m10s 2m10s 2m10s 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 #10
Day Hour Count Duration Avg duration Sep 29 05 1 2m10s 2m10s -
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-09-29 09:04:20 Duration: 2m10s
11 2m7s 1 2m7s 2m7s 2m7s 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 #11
Day Hour Count Duration Avg duration Sep 29 05 1 2m7s 2m7s -
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-09-29 09:06:41 Duration: 2m7s
12 1m46s 426 242ms 314ms 250ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) 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 #12
Day Hour Count Duration Avg duration Sep 29 20 96 24s184ms 251ms 21 15 3s731ms 248ms 22 3 750ms 250ms 23 6 1s498ms 249ms 00 9 2s232ms 248ms 01 51 12s818ms 251ms 02 87 21s801ms 250ms 03 27 6s691ms 247ms 04 3 738ms 246ms 05 6 1s502ms 250ms 06 15 3s811ms 254ms 07 15 3s847ms 256ms 08 6 1s498ms 249ms 09 12 2s982ms 248ms 10 6 1s496ms 249ms 11 9 2s236ms 248ms 12 6 1s497ms 249ms 16 12 3s24ms 252ms 17 24 5s983ms 249ms 18 15 3s767ms 251ms 19 3 761ms 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 (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-09-29 10:43:49 Duration: 314ms
-
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-09-29 06:08:57 Duration: 312ms
-
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-09-29 00:49:24 Duration: 311ms
13 1m31s 556 139ms 205ms 164ms 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 #13
Day Hour Count Duration Avg duration Sep 29 06 101 16s792ms 166ms 07 354 58s 163ms 08 101 16s793ms 166ms -
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 = 38 and pwi.inventory_vendor_id = 3089;
Date: 2024-09-29 11:19:02 Duration: 205ms
-
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 = 2958;
Date: 2024-09-29 11:16:31 Duration: 202ms
-
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 = 2951;
Date: 2024-09-29 12:02:25 Duration: 196ms
14 1m13s 556 124ms 174ms 132ms 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 #14
Day Hour Count Duration Avg duration Sep 29 06 101 13s632ms 134ms 07 354 46s603ms 131ms 08 101 13s460ms 133ms -
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-09-29 10:50:29' and warehouse_id = 42 and inventory_vendor_id = 3069 and qty_available < min_product_uom_qty;
Date: 2024-09-29 10:50:29 Duration: 174ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-09-29 10:42:49' and warehouse_id = 42 and inventory_vendor_id = 3055 and qty_available < min_product_uom_qty;
Date: 2024-09-29 10:42:49 Duration: 170ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-09-29 10:50:24' and warehouse_id = 42 and inventory_vendor_id = 2946 and qty_available < min_product_uom_qty;
Date: 2024-09-29 10:50:24 Duration: 170ms
15 1m10s 556 121ms 175ms 127ms 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 #15
Day Hour Count Duration Avg duration Sep 29 06 101 12s971ms 128ms 07 354 44s920ms 126ms 08 101 12s949ms 128ms -
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 42 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 3069 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-09-29 10:50:29 Duration: 175ms
-
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 42 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 2995 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-09-29 10:52:13 Duration: 166ms
-
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 41 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 3106 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-09-29 12:17:54 Duration: 162ms
16 45s506ms 304 141ms 177ms 149ms 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 Sep 29 06 68 10s232ms 150ms 07 181 27s54ms 149ms 08 55 8s220ms 149ms -
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 = 3115 and pwi.warehouse_id = 42 and pwi.product_id not in (193775);
Date: 2024-09-29 10:47:17 Duration: 177ms
-
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 = 2949 and pwi.warehouse_id = 41 and pwi.product_id not in (199140, 198992, 198510, 198462, 198228, 197905, 197892, 197891, 197889, 197888, 197876, 197869, 197867, 197866, 197865, 197863, 197860, 197847, 197725, 197308, 197864, 198989);
Date: 2024-09-29 12:15:33 Duration: 176ms
-
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 = 3089 and pwi.warehouse_id = 36 and pwi.product_id not in (194433, 194436, 194558, 194773, 194793, 194967, 195574, 195644);
Date: 2024-09-29 10:55:17 Duration: 174ms
17 39s708ms 1 39s708ms 39s708ms 39s708ms 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;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Sep 29 05 1 39s708ms 39s708ms -
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-09-29 09:01:04 Duration: 39s708ms
18 37s135ms 252 141ms 194ms 147ms 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 Sep 29 06 32 4s753ms 148ms 07 174 25s544ms 146ms 08 46 6s836ms 148ms -
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 = 2955 and pwi.warehouse_id = 44;
Date: 2024-09-29 11:05:36 Duration: 194ms
-
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 = 2953 and pwi.warehouse_id = 42;
Date: 2024-09-29 10:52:18 Duration: 181ms
-
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 = 3034 and pwi.warehouse_id = 41;
Date: 2024-09-29 12:17:33 Duration: 178ms
19 24s35ms 1 24s35ms 24s35ms 24s35ms 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) to stdout;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Sep 29 05 1 24s35ms 24s35ms -
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) TO stdout;
Date: 2024-09-29 09:13:24 Duration: 24s35ms
20 23s77ms 183 120ms 189ms 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 #20
Day Hour Count Duration Avg duration Sep 29 06 54 6s893ms 127ms 07 108 13s533ms 125ms 08 21 2s650ms 126ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (185978)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-29 10:41:15 Duration: 189ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (177378, 177379, 177395, 177397, 177404, 177409, 177414, 177415, 177419, 177432)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-29 12:16:13 Duration: 145ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (210142)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-29 10:40:24 Duration: 145ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 46,110 1h54m55s 125ms 1s125ms 149ms 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 Sep 29 20 2,531 6m25s 152ms 21 2,621 6m17s 143ms 22 2,353 5m40s 144ms 23 1,898 4m42s 148ms 00 2,030 4m56s 145ms 01 2,301 5m55s 154ms 02 2,372 5m48s 146ms 03 2,051 5m21s 156ms 04 2,402 5m37s 140ms 05 2,173 5m47s 159ms 06 2,435 5m59s 147ms 07 2,224 5m41s 153ms 08 2,231 5m49s 156ms 09 2,069 5m14s 152ms 10 2,293 5m41s 149ms 11 2,279 5m28s 144ms 12 2,216 5m8s 139ms 13 1,755 4m31s 154ms 14 1,857 4m58s 160ms 15 1,271 3m14s 152ms 16 1,570 3m47s 144ms 17 1,002 2m20s 140ms 18 176 24s850ms 141ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') 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-09-29 09:45:46 Duration: 1s125ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1296"', '["pointspring_master","calendar.alarm",53360]', '["pointspring_master","res.partner",53360]', '["pointspring_master","ir.needaction",53360]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-29 09:45:46 Duration: 1s99ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_974"', '["pointspring_master","calendar.alarm",19512]', '["pointspring_master","mail.channel",419]', '["pointspring_master","mail.channel",420]', '["pointspring_master","mail.channel",421]', '["pointspring_master","mail.channel",489]', '["pointspring_master","mail.channel",557]', '["pointspring_master","res.partner",19512]', '["pointspring_master","ir.needaction",19512]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-29 09:45:46 Duration: 1s64ms
2 8,138 23m49s 169ms 534ms 175ms 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 #2
Day Hour Count Duration Avg duration Sep 29 06 1,664 4m52s 175ms 07 4,711 13m46s 175ms 08 1,763 5m10s 175ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (190964) and warehouse_id = (35));
Date: 2024-09-29 12:00:48 Duration: 534ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209391) and warehouse_id = (35));
Date: 2024-09-29 12:01:39 Duration: 269ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (193946) and warehouse_id = (35));
Date: 2024-09-29 11:50:13 Duration: 232ms
3 5,707 13m48s 140ms 278ms 145ms 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 #3
Day Hour Count Duration Avg duration Sep 29 20 240 35s113ms 146ms 21 240 34s866ms 145ms 22 240 34s665ms 144ms 23 200 29s40ms 145ms 00 227 32s885ms 144ms 01 240 34s759ms 144ms 02 240 34s707ms 144ms 03 240 34s712ms 144ms 04 240 34s889ms 145ms 05 240 34s849ms 145ms 06 240 35s100ms 146ms 07 240 35s977ms 149ms 08 240 35s16ms 145ms 09 240 34s673ms 144ms 10 240 34s789ms 144ms 11 240 34s762ms 144ms 12 240 34s610ms 144ms 13 240 34s646ms 144ms 14 240 34s696ms 144ms 15 240 34s722ms 144ms 16 240 34s701ms 144ms 17 240 34s630ms 144ms 18 240 34s575ms 144ms 19 240 34s738ms 144ms -
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_trigger', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_publication', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_matviews', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_depend', 'pg_catalog.pg_roles', 'pg_catalog.pg_sequences', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_cursors', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequence', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_extension', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_type', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_group', 'pg_catalog.pg_range', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_policy', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_description', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_enum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_cast', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_index', 'pg_catalog.pg_am', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_language', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_database', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_class', 'pg_catalog.pg_stats', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_event_trigger', 'information_schema.role_udt_grants', 'information_schema.columns', 'information_schema.domain_udt_usage', 'information_schema.schemata', 'information_schema.collation_character_set_applicability', 'information_schema.collations', 'information_schema.parameters', 'information_schema.role_usage_grants', 'information_schema.check_constraint_routine_usage', 'information_schema.sql_features', 'information_schema.sql_sizing', 'information_schema.element_types', 'information_schema.column_column_usage', 'information_schema.routines', 'information_schema.role_routine_grants', 'information_schema.table_privileges', 'information_schema.udt_privileges', 'information_schema.foreign_tables', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrapper_options', 'information_schema.user_mapping_options', 'information_schema.administrable_role_authorizations', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.view_column_usage', 'information_schema.role_column_grants', 'information_schema.key_column_usage', 'information_schema.user_mappings', 'information_schema.attributes', 'information_schema.routine_table_usage', 'information_schema.triggered_update_columns', 'information_schema.triggers', 'information_schema.user_defined_types', 'information_schema.column_options', 'information_schema.foreign_server_options', 'information_schema.routine_column_usage', 'information_schema.usage_privileges', 'information_schema.views', 'information_schema.column_udt_usage', 'information_schema.foreign_data_wrappers', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.character_sets', 'information_schema.referential_constraints', 'information_schema.sql_implementation_info', 'information_schema.domain_constraints', 'information_schema.domains', 'information_schema.table_constraints', 'information_schema.view_table_usage', 'information_schema.foreign_table_options', 'information_schema.constraint_column_usage', 'information_schema.column_privileges', 'information_schema.constraint_table_usage', 'information_schema.routine_sequence_usage', 'information_schema.sequences', 'information_schema.tables', 'information_schema.data_type_privileges', 'information_schema.column_domain_usage', 'information_schema.routine_routine_usage', 'information_schema.role_table_grants', 'information_schema.view_routine_usage', 'information_schema.applicable_roles', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 19:38:59 Duration: 278ms
-
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_inherits', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_operator', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_database', 'pg_catalog.pg_tables', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_conversion', 'pg_catalog.pg_policy', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_attribute', 'pg_catalog.pg_user', 'pg_catalog.pg_index', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_class', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_enum', 'pg_catalog.pg_locks', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_trigger', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_cursors', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_group', 'pg_catalog.pg_settings', 'pg_catalog.pg_amproc', 'pg_catalog.pg_language', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_policies', 'pg_catalog.pg_range', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_depend', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_roles', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_am', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_subscription', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_type', 'pg_catalog.pg_opclass', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_extension', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_proc', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_publication', 'information_schema.foreign_tables', 'information_schema.column_udt_usage', 'information_schema.routine_sequence_usage', 'information_schema.sql_sizing', 'information_schema.table_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_server_options', 'information_schema.administrable_role_authorizations', 'information_schema.routines', 'information_schema.table_constraints', 'information_schema.triggers', 'information_schema.tables', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.role_usage_grants', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraint_routine_usage', 'information_schema.collation_character_set_applicability', 'information_schema.column_domain_usage', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.view_routine_usage', 'information_schema.applicable_roles', 'information_schema.column_column_usage', 'information_schema.constraint_column_usage', 'information_schema.key_column_usage', 'information_schema.user_mapping_options', 'information_schema.foreign_table_options', 'information_schema.enabled_roles', 'information_schema.schemata', 'information_schema.routine_routine_usage', 'information_schema.element_types', 'information_schema.constraint_table_usage', 'information_schema.foreign_data_wrapper_options', 'information_schema.collations', 'information_schema.column_privileges', 'information_schema.domain_constraints', 'information_schema.triggered_update_columns', 'information_schema.columns', 'information_schema.domains', 'information_schema.view_table_usage', 'information_schema.foreign_data_wrappers', 'information_schema.routine_column_usage', 'information_schema.role_routine_grants', 'information_schema.sql_implementation_info', 'information_schema.sql_features', 'information_schema.role_column_grants', 'information_schema.domain_udt_usage', 'information_schema.check_constraints', 'information_schema.referential_constraints', 'information_schema.routine_table_usage', 'information_schema.user_defined_types', 'information_schema.attributes', 'information_schema.character_sets', 'information_schema.udt_privileges', 'information_schema.sequences', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.routine_privileges', 'information_schema.column_options', 'information_schema.foreign_servers', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 01:27:56 Duration: 253ms
-
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_opfamily', 'pg_catalog.pg_cast', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_roles', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_collation', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_type', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_database', 'pg_catalog.pg_views', 'pg_catalog.pg_subscription', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_depend', 'pg_catalog.pg_am', 'pg_catalog.pg_trigger', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_opclass', 'pg_catalog.pg_language', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_tables', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_conversion', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_locks', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_group', 'pg_catalog.pg_amop', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_description', 'pg_catalog.pg_enum', 'pg_catalog.pg_policy', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_settings', 'pg_catalog.pg_operator', 'pg_catalog.pg_sequences', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_extension', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_transform', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_matviews', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_proc', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_slru', 'information_schema.view_column_usage', 'information_schema.column_domain_usage', 'information_schema.column_udt_usage', 'information_schema.table_constraints', 'information_schema.view_table_usage', 'information_schema.views', 'information_schema.role_usage_grants', 'information_schema.routine_column_usage', 'information_schema.parameters', 'information_schema.routine_sequence_usage', 'information_schema.user_mapping_options', 'information_schema.information_schema_catalog_name', 'information_schema.columns', 'information_schema.triggered_update_columns', 'information_schema.routine_privileges', 'information_schema.sequences', 'information_schema.sql_sizing', 'information_schema.element_types', 'information_schema.foreign_tables', 'information_schema.collation_character_set_applicability', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.character_sets', 'information_schema.routines', 'information_schema.role_column_grants', 'information_schema.data_type_privileges', 'information_schema.column_privileges', 'information_schema.routine_table_usage', 'information_schema.check_constraint_routine_usage', 'information_schema.check_constraints', 'information_schema.routine_routine_usage', 'information_schema.foreign_servers', 'information_schema.column_column_usage', 'information_schema.constraint_table_usage', 'information_schema.role_routine_grants', 'information_schema.user_mappings', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.tables', 'information_schema.column_options', 'information_schema.domains', 'information_schema.table_privileges', 'information_schema.foreign_data_wrappers', 'information_schema.view_routine_usage', 'information_schema.domain_udt_usage', 'information_schema.key_column_usage', 'information_schema.role_udt_grants', 'information_schema.foreign_server_options', 'information_schema.attributes', 'information_schema.referential_constraints', 'information_schema.sql_features', 'information_schema.udt_privileges', 'information_schema.foreign_table_options', 'information_schema.collations', 'information_schema.constraint_column_usage', 'information_schema.schemata', 'information_schema.sql_implementation_info', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.domain_constraints', 'information_schema.enabled_roles', 'information_schema.user_defined_types', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 15:00:13 Duration: 249ms
4 1,044 5m47s 324ms 398ms 333ms 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 #4
Day Hour Count Duration Avg duration Sep 29 20 36 12s139ms 337ms 21 6 2s63ms 343ms 22 21 7s8ms 333ms 23 24 8s105ms 337ms 00 24 7s949ms 331ms 01 171 56s801ms 332ms 02 279 1m32s 331ms 03 105 34s757ms 331ms 04 24 8s75ms 336ms 05 39 13s81ms 335ms 06 39 12s997ms 333ms 07 30 10s299ms 343ms 08 27 8s952ms 331ms 09 39 13s15ms 333ms 10 36 11s902ms 330ms 11 30 9s907ms 330ms 12 9 3s9ms 334ms 16 51 17s88ms 335ms 17 45 15s98ms 335ms 18 6 1s985ms 330ms 19 3 1s35ms 345ms -
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-09-29 08:38:28 Duration: 398ms
-
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-09-29 01:14:34 Duration: 389ms
-
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-09-29 11:30:32 Duration: 389ms
5 844 3m27s 238ms 336ms 245ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) 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 #5
Day Hour Count Duration Avg duration Sep 29 20 51 12s615ms 247ms 21 24 5s886ms 245ms 22 27 6s700ms 248ms 23 24 6s 250ms 00 24 5s885ms 245ms 01 118 28s903ms 244ms 02 189 46s157ms 244ms 03 105 25s497ms 242ms 04 24 5s869ms 244ms 05 18 4s414ms 245ms 06 24 5s905ms 246ms 07 39 9s802ms 251ms 08 12 2s934ms 244ms 09 30 7s422ms 247ms 10 21 5s137ms 244ms 11 27 6s586ms 243ms 12 3 739ms 246ms 16 30 7s473ms 249ms 17 45 11s93ms 246ms 18 3 737ms 245ms 19 6 1s468ms 244ms -
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-09-29 03:13:24 Duration: 336ms
-
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-09-29 06:07:16 Duration: 328ms
-
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-09-29 13:55:06 Duration: 324ms
6 810 4m25s 319ms 459ms 328ms 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 #6
Day Hour Count Duration Avg duration Sep 29 20 99 32s717ms 330ms 21 36 11s975ms 332ms 22 6 1s956ms 326ms 23 3 985ms 328ms 00 15 4s885ms 325ms 01 123 40s230ms 327ms 02 216 1m10s 326ms 03 129 42s246ms 327ms 04 18 5s910ms 328ms 05 33 10s945ms 331ms 06 15 4s915ms 327ms 07 15 5s104ms 340ms 08 18 5s851ms 325ms 09 21 6s838ms 325ms 10 18 5s881ms 326ms 11 18 5s918ms 328ms 16 9 2s948ms 327ms 17 18 5s890ms 327ms -
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-09-29 07:13:16 Duration: 459ms
-
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-09-29 07:12:25 Duration: 420ms
-
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-09-29 01:01:21 Duration: 419ms
7 556 16m10s 1s712ms 1s932ms 1s745ms 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 #7
Day Hour Count Duration Avg duration Sep 29 06 101 2m56s 1s750ms 07 354 10m17s 1s744ms 08 101 2m56s 1s745ms -
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 = 37 and pwi.inventory_vendor_id = 3092 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 = 37 and pwi.inventory_vendor_id = 3092 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 = 37 and pwi.inventory_vendor_id = 3092 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:09:14 Duration: 1s932ms
-
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 = 3105 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 = 3105 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 = 3105 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:17:37 Duration: 1s905ms
-
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 = 37 and pwi.inventory_vendor_id = 2978 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 = 37 and pwi.inventory_vendor_id = 2978 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 = 37 and pwi.inventory_vendor_id = 2978 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:03:20 Duration: 1s871ms
8 556 1m31s 139ms 205ms 164ms 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 #8
Day Hour Count Duration Avg duration Sep 29 06 101 16s792ms 166ms 07 354 58s 163ms 08 101 16s793ms 166ms -
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 = 38 and pwi.inventory_vendor_id = 3089;
Date: 2024-09-29 11:19:02 Duration: 205ms
-
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 = 2958;
Date: 2024-09-29 11:16:31 Duration: 202ms
-
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 = 2951;
Date: 2024-09-29 12:02:25 Duration: 196ms
9 556 1m13s 124ms 174ms 132ms 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 #9
Day Hour Count Duration Avg duration Sep 29 06 101 13s632ms 134ms 07 354 46s603ms 131ms 08 101 13s460ms 133ms -
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-09-29 10:50:29' and warehouse_id = 42 and inventory_vendor_id = 3069 and qty_available < min_product_uom_qty;
Date: 2024-09-29 10:50:29 Duration: 174ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-09-29 10:42:49' and warehouse_id = 42 and inventory_vendor_id = 3055 and qty_available < min_product_uom_qty;
Date: 2024-09-29 10:42:49 Duration: 170ms
-
select id from product_warehouse_inventory where freeze_date is not null and freeze_date > '2024-09-29 10:50:24' and warehouse_id = 42 and inventory_vendor_id = 2946 and qty_available < min_product_uom_qty;
Date: 2024-09-29 10:50:24 Duration: 170ms
10 556 1m10s 121ms 175ms 127ms 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 #10
Day Hour Count Duration Avg duration Sep 29 06 101 12s971ms 128ms 07 354 44s920ms 126ms 08 101 12s949ms 128ms -
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 42 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 3069 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-09-29 10:50:29 Duration: 175ms
-
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 42 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 2995 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-09-29 10:52:13 Duration: 166ms
-
select id, qty_reserve, product_id, product_tmpl_id from product_warehouse_inventory where qty_reserve > 0 and warehouse_id = 41 and ((COALESCE(qty_available, 0) + COALESCE(qty_on_order, 0)) - COALESCE(qty_reserve, 0)) < 0 and inventory_vendor_id = 3106 and COALESCE(superceded, False) = False and COALESCE(discontinued, False) = False and COALESCE(is_core, False) = False;
Date: 2024-09-29 12:17:54 Duration: 162ms
11 426 1m46s 242ms 314ms 250ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) 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 Sep 29 20 96 24s184ms 251ms 21 15 3s731ms 248ms 22 3 750ms 250ms 23 6 1s498ms 249ms 00 9 2s232ms 248ms 01 51 12s818ms 251ms 02 87 21s801ms 250ms 03 27 6s691ms 247ms 04 3 738ms 246ms 05 6 1s502ms 250ms 06 15 3s811ms 254ms 07 15 3s847ms 256ms 08 6 1s498ms 249ms 09 12 2s982ms 248ms 10 6 1s496ms 249ms 11 9 2s236ms 248ms 12 6 1s497ms 249ms 16 12 3s24ms 252ms 17 24 5s983ms 249ms 18 15 3s767ms 251ms 19 3 761ms 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 (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-09-29 10:43:49 Duration: 314ms
-
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-09-29 06:08:57 Duration: 312ms
-
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-09-29 00:49:24 Duration: 311ms
12 304 45s506ms 141ms 177ms 149ms 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 #12
Day Hour Count Duration Avg duration Sep 29 06 68 10s232ms 150ms 07 181 27s54ms 149ms 08 55 8s220ms 149ms -
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 = 3115 and pwi.warehouse_id = 42 and pwi.product_id not in (193775);
Date: 2024-09-29 10:47:17 Duration: 177ms
-
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 = 2949 and pwi.warehouse_id = 41 and pwi.product_id not in (199140, 198992, 198510, 198462, 198228, 197905, 197892, 197891, 197889, 197888, 197876, 197869, 197867, 197866, 197865, 197863, 197860, 197847, 197725, 197308, 197864, 198989);
Date: 2024-09-29 12:15:33 Duration: 176ms
-
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 = 3089 and pwi.warehouse_id = 36 and pwi.product_id not in (194433, 194436, 194558, 194773, 194793, 194967, 195574, 195644);
Date: 2024-09-29 10:55:17 Duration: 174ms
13 252 37s135ms 141ms 194ms 147ms 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 #13
Day Hour Count Duration Avg duration Sep 29 06 32 4s753ms 148ms 07 174 25s544ms 146ms 08 46 6s836ms 148ms -
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 = 2955 and pwi.warehouse_id = 44;
Date: 2024-09-29 11:05:36 Duration: 194ms
-
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 = 2953 and pwi.warehouse_id = 42;
Date: 2024-09-29 10:52:18 Duration: 181ms
-
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 = 3034 and pwi.warehouse_id = 41;
Date: 2024-09-29 12:17:33 Duration: 178ms
14 183 23s77ms 120ms 189ms 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 #14
Day Hour Count Duration Avg duration Sep 29 06 54 6s893ms 127ms 07 108 13s533ms 125ms 08 21 2s650ms 126ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (185978)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-29 10:41:15 Duration: 189ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (177378, 177379, 177395, 177397, 177404, 177409, 177414, 177415, 177419, 177432)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-29 12:16:13 Duration: 145ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (210142)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-29 10:40:24 Duration: 145ms
15 108 13s613ms 120ms 192ms 126ms 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 #15
Day Hour Count Duration Avg duration Sep 29 20 4 486ms 121ms 21 3 363ms 121ms 22 2 241ms 120ms 23 1 121ms 121ms 00 5 614ms 122ms 01 7 875ms 125ms 02 9 1s91ms 121ms 03 13 1s656ms 127ms 04 3 376ms 125ms 05 7 902ms 128ms 06 1 120ms 120ms 07 7 958ms 136ms 08 1 120ms 120ms 09 7 929ms 132ms 10 1 120ms 120ms 11 4 481ms 120ms 12 1 121ms 121ms 13 1 120ms 120ms 15 2 242ms 121ms 16 12 1s489ms 124ms 17 12 1s574ms 131ms 18 1 122ms 122ms 19 4 482ms 120ms -
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-09-29 07:11:35 Duration: 192ms
-
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-09-29 21:17:54 Duration: 188ms
-
SELECT "product_template".id FROM "product_template" WHERE (("product_template"."active" = true) AND (("product_template"."sale_ok" = true) AND (("product_template"."website_id" in (1)) OR "product_template"."website_id" IS NULL))) ORDER BY COALESCE("product_template"."is_published", false) DESC, "product_template"."website_sequence" ASC, "product_template"."id" DESC;
Date: 2024-09-29 11:32:58 Duration: 188ms
16 40 5s466ms 127ms 181ms 136ms select "queue_job".id from "queue_job" where ((("queue_job"."date_done" <= ?) or ("queue_job"."date_cancelled" <= ?)) and ("queue_job"."channel" = ?)) order by "queue_job"."date_created" desc, "queue_job"."date_done" desc limit ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Sep 29 23 40 5s466ms 136ms -
SELECT "queue_job".id FROM "queue_job" WHERE ((("queue_job"."date_done" <= '2024-08-30 03:39:07.398156') OR ("queue_job"."date_cancelled" <= '2024-08-30 03:39:07.398156')) AND ("queue_job"."channel" = 'root.root_trigger')) ORDER BY "queue_job"."date_created" DESC, "queue_job"."date_done" DESC LIMIT 1000;
Date: 2024-09-29 03:39:13 Duration: 181ms
-
SELECT "queue_job".id FROM "queue_job" WHERE ((("queue_job"."date_done" <= '2024-08-30 03:39:07.398156') OR ("queue_job"."date_cancelled" <= '2024-08-30 03:39:07.398156')) AND ("queue_job"."channel" = 'root.root_trigger')) ORDER BY "queue_job"."date_created" DESC, "queue_job"."date_done" DESC LIMIT 1000;
Date: 2024-09-29 03:39:13 Duration: 165ms
-
SELECT "queue_job".id FROM "queue_job" WHERE ((("queue_job"."date_done" <= '2024-08-30 03:39:07.398156') OR ("queue_job"."date_cancelled" <= '2024-08-30 03:39:07.398156')) AND ("queue_job"."channel" = 'root.root_trigger')) ORDER BY "queue_job"."date_created" DESC, "queue_job"."date_done" DESC LIMIT 1000;
Date: 2024-09-29 03:39:12 Duration: 148ms
17 36 8s323ms 219ms 244ms 231ms select "account_move".id from "account_move" where (("account_move"."edi_810_id" in (...)) and (("account_move"."id" not in (...)) or "account_move"."id" is null)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Sep 29 23 12 2s736ms 228ms 03 12 2s803ms 233ms 19 12 2s783ms 231ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (57945)) AND (("account_move"."id" not in (1674906, 1674905)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 23:13:12 Duration: 244ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (58378)) AND (("account_move"."id" not in (1672631, 1672632)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 07:19:04 Duration: 244ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (58378)) AND (("account_move"."id" not in (1672631, 1672632)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 23:19:20 Duration: 243ms
18 26 6s168ms 226ms 269ms 237ms select "account_move".id from "account_move" where ("account_move"."edi_810_id" in (...)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Sep 29 23 8 1s930ms 241ms 03 8 1s888ms 236ms 19 10 2s349ms 234ms -
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (56932, 56959, 57017, 57106, 57275, 57287, 57372, 57461, 57498, 57523, 57525, 57530, 57598, 57623, 57629, 57636, 57642, 57654, 57657, 57678, 57697, 57755, 57802, 57814, 57870, 57873, 57911, 57945, 57952, 58062, 58087, 58099, 58100, 58121, 58136, 58137, 58144, 58149, 58151, 58169)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 03:13:24 Duration: 269ms
-
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (59091, 59092, 59094, 59097, 59098, 59101, 59107, 59113, 59114, 59115, 59116, 59117, 59118, 59119, 59121, 59122, 59123, 59124, 59126, 59127, 59128, 59129, 59130, 59131, 59132, 59133, 59134, 59136, 59137, 59138, 59139, 59140, 59141, 59142, 59143, 59144, 59145, 59147, 59148, 59149)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 03:37:08 Duration: 265ms
-
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (59021, 59020, 59023, 59024, 59025, 59026, 59028, 59029, 59030, 59033, 59035, 59036, 59039, 59040, 59044, 59045, 59049, 59050, 59051, 59052, 59053, 59054, 59056, 59059, 59060, 59063, 59065, 59066, 59067, 59068, 59069, 59070, 59071, 59072, 59075, 59076, 59082, 59083, 59088, 59089)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 07:31:09 Duration: 249ms
19 11 3m15s 833ms 3m7s 17s815ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Sep 29 06 2 3m8s 1m34s 07 7 5s959ms 851ms 08 2 1s681ms 840ms -
select count(id) from item_list_line where item_demand_plan_id = 3926;
Date: 2024-09-29 10:39:35 Duration: 3m7s
-
select count(id) from item_list_line where item_demand_plan_id = 3930;
Date: 2024-09-29 11:35:05 Duration: 878ms
-
select count(id) from item_list_line where item_demand_plan_id = 3922;
Date: 2024-09-29 11:18:24 Duration: 857ms
20 11 12s517ms 1s110ms 1s182ms 1s137ms select distinct ill.product_id from item_list_line as ill left join res_forecast_method as fm on fm.id = ill.method where ill.item_demand_plan_id = ? and ill.method not in (...);Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Sep 29 06 2 2s282ms 1s141ms 07 7 7s974ms 1s139ms 08 2 2s260ms 1s130ms -
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3930 and ill.method not in (8, 7);
Date: 2024-09-29 11:35:07 Duration: 1s182ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3927 and ill.method not in (8, 7);
Date: 2024-09-29 11:07:06 Duration: 1s154ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3926 and ill.method not in (8, 7);
Date: 2024-09-29 10:39:36 Duration: 1s149ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 4m28s 4m28s 4m28s 1 4m28s 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 Sep 29 05 1 4m28s 4m28s -
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-09-29 09:11:10 Duration: 4m28s
2 2m10s 2m10s 2m10s 1 2m10s 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 Sep 29 05 1 2m10s 2m10s -
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-09-29 09:04:20 Duration: 2m10s
3 2m7s 2m7s 2m7s 1 2m7s 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 Sep 29 05 1 2m7s 2m7s -
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-09-29 09:06:41 Duration: 2m7s
4 39s708ms 39s708ms 39s708ms 1 39s708ms 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;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Sep 29 05 1 39s708ms 39s708ms -
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-09-29 09:01:04 Duration: 39s708ms
5 24s35ms 24s35ms 24s35ms 1 24s35ms 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) to stdout;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Sep 29 05 1 24s35ms 24s35ms -
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) TO stdout;
Date: 2024-09-29 09:13:24 Duration: 24s35ms
6 833ms 3m7s 17s815ms 11 3m15s select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Sep 29 06 2 3m8s 1m34s 07 7 5s959ms 851ms 08 2 1s681ms 840ms -
select count(id) from item_list_line where item_demand_plan_id = 3926;
Date: 2024-09-29 10:39:35 Duration: 3m7s
-
select count(id) from item_list_line where item_demand_plan_id = 3930;
Date: 2024-09-29 11:35:05 Duration: 878ms
-
select count(id) from item_list_line where item_demand_plan_id = 3922;
Date: 2024-09-29 11:18:24 Duration: 857ms
7 1s712ms 1s932ms 1s745ms 556 16m10s 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 #7
Day Hour Count Duration Avg duration Sep 29 06 101 2m56s 1s750ms 07 354 10m17s 1s744ms 08 101 2m56s 1s745ms -
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 = 37 and pwi.inventory_vendor_id = 3092 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 = 37 and pwi.inventory_vendor_id = 3092 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 = 37 and pwi.inventory_vendor_id = 3092 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:09:14 Duration: 1s932ms
-
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 = 3105 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 = 3105 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 = 3105 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:17:37 Duration: 1s905ms
-
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 = 37 and pwi.inventory_vendor_id = 2978 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 = 37 and pwi.inventory_vendor_id = 2978 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 = 37 and pwi.inventory_vendor_id = 2978 and COALESCE(pt.superceded, False) = False and COALESCE(pt.obsolete, False) = False;
Date: 2024-09-29 12:03:20 Duration: 1s871ms
8 1s110ms 1s182ms 1s137ms 11 12s517ms select distinct ill.product_id from item_list_line as ill left join res_forecast_method as fm on fm.id = ill.method where ill.item_demand_plan_id = ? and ill.method not in (...);Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Sep 29 06 2 2s282ms 1s141ms 07 7 7s974ms 1s139ms 08 2 2s260ms 1s130ms -
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3930 and ill.method not in (8, 7);
Date: 2024-09-29 11:35:07 Duration: 1s182ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3927 and ill.method not in (8, 7);
Date: 2024-09-29 11:07:06 Duration: 1s154ms
-
select DISTINCT ill.product_id from item_list_line as ill LEFT JOIN res_forecast_method as fm ON fm.id = ill.method where ill.item_demand_plan_id = 3926 and ill.method not in (8, 7);
Date: 2024-09-29 10:39:36 Duration: 1s149ms
9 324ms 398ms 333ms 1,044 5m47s 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 Sep 29 20 36 12s139ms 337ms 21 6 2s63ms 343ms 22 21 7s8ms 333ms 23 24 8s105ms 337ms 00 24 7s949ms 331ms 01 171 56s801ms 332ms 02 279 1m32s 331ms 03 105 34s757ms 331ms 04 24 8s75ms 336ms 05 39 13s81ms 335ms 06 39 12s997ms 333ms 07 30 10s299ms 343ms 08 27 8s952ms 331ms 09 39 13s15ms 333ms 10 36 11s902ms 330ms 11 30 9s907ms 330ms 12 9 3s9ms 334ms 16 51 17s88ms 335ms 17 45 15s98ms 335ms 18 6 1s985ms 330ms 19 3 1s35ms 345ms -
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-09-29 08:38:28 Duration: 398ms
-
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-09-29 01:14:34 Duration: 389ms
-
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-09-29 11:30:32 Duration: 389ms
10 319ms 459ms 328ms 810 4m25s select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, coalesce("product_template__name"."value", "product_template"."name") asc, "product_template"."id" desc;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Sep 29 20 99 32s717ms 330ms 21 36 11s975ms 332ms 22 6 1s956ms 326ms 23 3 985ms 328ms 00 15 4s885ms 325ms 01 123 40s230ms 327ms 02 216 1m10s 326ms 03 129 42s246ms 327ms 04 18 5s910ms 328ms 05 33 10s945ms 331ms 06 15 4s915ms 327ms 07 15 5s104ms 340ms 08 18 5s851ms 325ms 09 21 6s838ms 325ms 10 18 5s881ms 326ms 11 18 5s918ms 328ms 16 9 2s948ms 327ms 17 18 5s890ms 327ms -
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-09-29 07:13:16 Duration: 459ms
-
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-09-29 07:12:25 Duration: 420ms
-
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-09-29 01:01:21 Duration: 419ms
11 242ms 314ms 250ms 426 1m46s 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 Sep 29 20 96 24s184ms 251ms 21 15 3s731ms 248ms 22 3 750ms 250ms 23 6 1s498ms 249ms 00 9 2s232ms 248ms 01 51 12s818ms 251ms 02 87 21s801ms 250ms 03 27 6s691ms 247ms 04 3 738ms 246ms 05 6 1s502ms 250ms 06 15 3s811ms 254ms 07 15 3s847ms 256ms 08 6 1s498ms 249ms 09 12 2s982ms 248ms 10 6 1s496ms 249ms 11 9 2s236ms 248ms 12 6 1s497ms 249ms 16 12 3s24ms 252ms 17 24 5s983ms 249ms 18 15 3s767ms 251ms 19 3 761ms 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 (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-09-29 10:43:49 Duration: 314ms
-
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-09-29 06:08:57 Duration: 312ms
-
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-09-29 00:49:24 Duration: 311ms
12 238ms 336ms 245ms 844 3m27s 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 #12
Day Hour Count Duration Avg duration Sep 29 20 51 12s615ms 247ms 21 24 5s886ms 245ms 22 27 6s700ms 248ms 23 24 6s 250ms 00 24 5s885ms 245ms 01 118 28s903ms 244ms 02 189 46s157ms 244ms 03 105 25s497ms 242ms 04 24 5s869ms 244ms 05 18 4s414ms 245ms 06 24 5s905ms 246ms 07 39 9s802ms 251ms 08 12 2s934ms 244ms 09 30 7s422ms 247ms 10 21 5s137ms 244ms 11 27 6s586ms 243ms 12 3 739ms 246ms 16 30 7s473ms 249ms 17 45 11s93ms 246ms 18 3 737ms 245ms 19 6 1s468ms 244ms -
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-09-29 03:13:24 Duration: 336ms
-
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-09-29 06:07:16 Duration: 328ms
-
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-09-29 13:55:06 Duration: 324ms
13 226ms 269ms 237ms 26 6s168ms select "account_move".id from "account_move" where ("account_move"."edi_810_id" in (...)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Sep 29 23 8 1s930ms 241ms 03 8 1s888ms 236ms 19 10 2s349ms 234ms -
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (56932, 56959, 57017, 57106, 57275, 57287, 57372, 57461, 57498, 57523, 57525, 57530, 57598, 57623, 57629, 57636, 57642, 57654, 57657, 57678, 57697, 57755, 57802, 57814, 57870, 57873, 57911, 57945, 57952, 58062, 58087, 58099, 58100, 58121, 58136, 58137, 58144, 58149, 58151, 58169)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 03:13:24 Duration: 269ms
-
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (59091, 59092, 59094, 59097, 59098, 59101, 59107, 59113, 59114, 59115, 59116, 59117, 59118, 59119, 59121, 59122, 59123, 59124, 59126, 59127, 59128, 59129, 59130, 59131, 59132, 59133, 59134, 59136, 59137, 59138, 59139, 59140, 59141, 59142, 59143, 59144, 59145, 59147, 59148, 59149)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 03:37:08 Duration: 265ms
-
SELECT "account_move".id FROM "account_move" WHERE ("account_move"."edi_810_id" in (59021, 59020, 59023, 59024, 59025, 59026, 59028, 59029, 59030, 59033, 59035, 59036, 59039, 59040, 59044, 59045, 59049, 59050, 59051, 59052, 59053, 59054, 59056, 59059, 59060, 59063, 59065, 59066, 59067, 59068, 59069, 59070, 59071, 59072, 59075, 59076, 59082, 59083, 59088, 59089)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 07:31:09 Duration: 249ms
14 219ms 244ms 231ms 36 8s323ms select "account_move".id from "account_move" where (("account_move"."edi_810_id" in (...)) and (("account_move"."id" not in (...)) or "account_move"."id" is null)) order by "account_move"."invoice_date_due";Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Sep 29 23 12 2s736ms 228ms 03 12 2s803ms 233ms 19 12 2s783ms 231ms -
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (57945)) AND (("account_move"."id" not in (1674906, 1674905)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 23:13:12 Duration: 244ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (58378)) AND (("account_move"."id" not in (1672631, 1672632)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 07:19:04 Duration: 244ms
-
SELECT "account_move".id FROM "account_move" WHERE (("account_move"."edi_810_id" in (58378)) AND (("account_move"."id" not in (1672631, 1672632)) OR "account_move"."id" IS NULL)) ORDER BY "account_move"."invoice_date_due";
Date: 2024-09-29 23:19:20 Duration: 243ms
15 169ms 534ms 175ms 8,138 23m49s 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 #15
Day Hour Count Duration Avg duration Sep 29 06 1,664 4m52s 175ms 07 4,711 13m46s 175ms 08 1,763 5m10s 175ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (190964) and warehouse_id = (35));
Date: 2024-09-29 12:00:48 Duration: 534ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (209391) and warehouse_id = (35));
Date: 2024-09-29 12:01:39 Duration: 269ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (193946) and warehouse_id = (35));
Date: 2024-09-29 11:50:13 Duration: 232ms
16 139ms 205ms 164ms 556 1m31s 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 #16
Day Hour Count Duration Avg duration Sep 29 06 101 16s792ms 166ms 07 354 58s 163ms 08 101 16s793ms 166ms -
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 = 38 and pwi.inventory_vendor_id = 3089;
Date: 2024-09-29 11:19:02 Duration: 205ms
-
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 = 2958;
Date: 2024-09-29 11:16:31 Duration: 202ms
-
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 = 2951;
Date: 2024-09-29 12:02:25 Duration: 196ms
17 141ms 177ms 149ms 304 45s506ms 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 Sep 29 06 68 10s232ms 150ms 07 181 27s54ms 149ms 08 55 8s220ms 149ms -
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 = 3115 and pwi.warehouse_id = 42 and pwi.product_id not in (193775);
Date: 2024-09-29 10:47:17 Duration: 177ms
-
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 = 2949 and pwi.warehouse_id = 41 and pwi.product_id not in (199140, 198992, 198510, 198462, 198228, 197905, 197892, 197891, 197889, 197888, 197876, 197869, 197867, 197866, 197865, 197863, 197860, 197847, 197725, 197308, 197864, 198989);
Date: 2024-09-29 12:15:33 Duration: 176ms
-
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 = 3089 and pwi.warehouse_id = 36 and pwi.product_id not in (194433, 194436, 194558, 194773, 194793, 194967, 195574, 195644);
Date: 2024-09-29 10:55:17 Duration: 174ms
18 125ms 1s125ms 149ms 46,110 1h54m55s select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Sep 29 20 2,531 6m25s 152ms 21 2,621 6m17s 143ms 22 2,353 5m40s 144ms 23 1,898 4m42s 148ms 00 2,030 4m56s 145ms 01 2,301 5m55s 154ms 02 2,372 5m48s 146ms 03 2,051 5m21s 156ms 04 2,402 5m37s 140ms 05 2,173 5m47s 159ms 06 2,435 5m59s 147ms 07 2,224 5m41s 153ms 08 2,231 5m49s 156ms 09 2,069 5m14s 152ms 10 2,293 5m41s 149ms 11 2,279 5m28s 144ms 12 2,216 5m8s 139ms 13 1,755 4m31s 154ms 14 1,857 4m58s 160ms 15 1,271 3m14s 152ms 16 1,570 3m47s 144ms 17 1,002 2m20s 140ms 18 176 24s850ms 141ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') 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-09-29 09:45:46 Duration: 1s125ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1296"', '["pointspring_master","calendar.alarm",53360]', '["pointspring_master","res.partner",53360]', '["pointspring_master","ir.needaction",53360]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-29 09:45:46 Duration: 1s99ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-29 09:44:55') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_974"', '["pointspring_master","calendar.alarm",19512]', '["pointspring_master","mail.channel",419]', '["pointspring_master","mail.channel",420]', '["pointspring_master","mail.channel",421]', '["pointspring_master","mail.channel",489]', '["pointspring_master","mail.channel",557]', '["pointspring_master","res.partner",19512]', '["pointspring_master","ir.needaction",19512]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-29 09:45:46 Duration: 1s64ms
19 141ms 194ms 147ms 252 37s135ms 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 #19
Day Hour Count Duration Avg duration Sep 29 06 32 4s753ms 148ms 07 174 25s544ms 146ms 08 46 6s836ms 148ms -
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 = 2955 and pwi.warehouse_id = 44;
Date: 2024-09-29 11:05:36 Duration: 194ms
-
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 = 2953 and pwi.warehouse_id = 42;
Date: 2024-09-29 10:52:18 Duration: 181ms
-
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 = 3034 and pwi.warehouse_id = 41;
Date: 2024-09-29 12:17:33 Duration: 178ms
20 140ms 278ms 145ms 5,707 13m48s 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 #20
Day Hour Count Duration Avg duration Sep 29 20 240 35s113ms 146ms 21 240 34s866ms 145ms 22 240 34s665ms 144ms 23 200 29s40ms 145ms 00 227 32s885ms 144ms 01 240 34s759ms 144ms 02 240 34s707ms 144ms 03 240 34s712ms 144ms 04 240 34s889ms 145ms 05 240 34s849ms 145ms 06 240 35s100ms 146ms 07 240 35s977ms 149ms 08 240 35s16ms 145ms 09 240 34s673ms 144ms 10 240 34s789ms 144ms 11 240 34s762ms 144ms 12 240 34s610ms 144ms 13 240 34s646ms 144ms 14 240 34s696ms 144ms 15 240 34s722ms 144ms 16 240 34s701ms 144ms 17 240 34s630ms 144ms 18 240 34s575ms 144ms 19 240 34s738ms 144ms -
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_trigger', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_publication', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_matviews', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_depend', 'pg_catalog.pg_roles', 'pg_catalog.pg_sequences', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_cursors', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_settings', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_proc', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_amop', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequence', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_extension', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_type', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_group', 'pg_catalog.pg_range', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_policy', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_operator', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_description', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_enum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_inherits', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_cast', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_index', 'pg_catalog.pg_am', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_language', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_database', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_class', 'pg_catalog.pg_stats', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_event_trigger', 'information_schema.role_udt_grants', 'information_schema.columns', 'information_schema.domain_udt_usage', 'information_schema.schemata', 'information_schema.collation_character_set_applicability', 'information_schema.collations', 'information_schema.parameters', 'information_schema.role_usage_grants', 'information_schema.check_constraint_routine_usage', 'information_schema.sql_features', 'information_schema.sql_sizing', 'information_schema.element_types', 'information_schema.column_column_usage', 'information_schema.routines', 'information_schema.role_routine_grants', 'information_schema.table_privileges', 'information_schema.udt_privileges', 'information_schema.foreign_tables', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrapper_options', 'information_schema.user_mapping_options', 'information_schema.administrable_role_authorizations', 'information_schema.routine_privileges', 'information_schema.enabled_roles', 'information_schema.view_column_usage', 'information_schema.role_column_grants', 'information_schema.key_column_usage', 'information_schema.user_mappings', 'information_schema.attributes', 'information_schema.routine_table_usage', 'information_schema.triggered_update_columns', 'information_schema.triggers', 'information_schema.user_defined_types', 'information_schema.column_options', 'information_schema.foreign_server_options', 'information_schema.routine_column_usage', 'information_schema.usage_privileges', 'information_schema.views', 'information_schema.column_udt_usage', 'information_schema.foreign_data_wrappers', 'information_schema.foreign_servers', 'information_schema.check_constraints', 'information_schema.character_sets', 'information_schema.referential_constraints', 'information_schema.sql_implementation_info', 'information_schema.domain_constraints', 'information_schema.domains', 'information_schema.table_constraints', 'information_schema.view_table_usage', 'information_schema.foreign_table_options', 'information_schema.constraint_column_usage', 'information_schema.column_privileges', 'information_schema.constraint_table_usage', 'information_schema.routine_sequence_usage', 'information_schema.sequences', 'information_schema.tables', 'information_schema.data_type_privileges', 'information_schema.column_domain_usage', 'information_schema.routine_routine_usage', 'information_schema.role_table_grants', 'information_schema.view_routine_usage', 'information_schema.applicable_roles', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 19:38:59 Duration: 278ms
-
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_inherits', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_operator', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_database', 'pg_catalog.pg_tables', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_conversion', 'pg_catalog.pg_policy', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_attribute', 'pg_catalog.pg_user', 'pg_catalog.pg_index', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_class', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_enum', 'pg_catalog.pg_locks', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_constraint', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_trigger', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_cursors', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_transform', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_group', 'pg_catalog.pg_settings', 'pg_catalog.pg_amproc', 'pg_catalog.pg_language', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_policies', 'pg_catalog.pg_range', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_indexes', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_depend', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_roles', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stats', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_matviews', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_rules', 'pg_catalog.pg_am', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_subscription', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_type', 'pg_catalog.pg_opclass', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_extension', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_proc', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_publication', 'information_schema.foreign_tables', 'information_schema.column_udt_usage', 'information_schema.routine_sequence_usage', 'information_schema.sql_sizing', 'information_schema.table_privileges', 'information_schema.view_column_usage', 'information_schema.foreign_server_options', 'information_schema.administrable_role_authorizations', 'information_schema.routines', 'information_schema.table_constraints', 'information_schema.triggers', 'information_schema.tables', 'information_schema.role_udt_grants', 'information_schema.data_type_privileges', 'information_schema.role_usage_grants', 'information_schema.information_schema_catalog_name', 'information_schema.check_constraint_routine_usage', 'information_schema.collation_character_set_applicability', 'information_schema.column_domain_usage', 'information_schema.parameters', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.view_routine_usage', 'information_schema.applicable_roles', 'information_schema.column_column_usage', 'information_schema.constraint_column_usage', 'information_schema.key_column_usage', 'information_schema.user_mapping_options', 'information_schema.foreign_table_options', 'information_schema.enabled_roles', 'information_schema.schemata', 'information_schema.routine_routine_usage', 'information_schema.element_types', 'information_schema.constraint_table_usage', 'information_schema.foreign_data_wrapper_options', 'information_schema.collations', 'information_schema.column_privileges', 'information_schema.domain_constraints', 'information_schema.triggered_update_columns', 'information_schema.columns', 'information_schema.domains', 'information_schema.view_table_usage', 'information_schema.foreign_data_wrappers', 'information_schema.routine_column_usage', 'information_schema.role_routine_grants', 'information_schema.sql_implementation_info', 'information_schema.sql_features', 'information_schema.role_column_grants', 'information_schema.domain_udt_usage', 'information_schema.check_constraints', 'information_schema.referential_constraints', 'information_schema.routine_table_usage', 'information_schema.user_defined_types', 'information_schema.attributes', 'information_schema.character_sets', 'information_schema.udt_privileges', 'information_schema.sequences', 'information_schema.user_mappings', 'information_schema.views', 'information_schema.routine_privileges', 'information_schema.column_options', 'information_schema.foreign_servers', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 01:27:56 Duration: 253ms
-
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_opfamily', 'pg_catalog.pg_cast', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stats', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_roles', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_collation', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_namespace', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_type', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_database', 'pg_catalog.pg_views', 'pg_catalog.pg_subscription', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_depend', 'pg_catalog.pg_am', 'pg_catalog.pg_trigger', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_constraint', 'pg_catalog.pg_opclass', 'pg_catalog.pg_language', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_inherits', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_tables', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_conversion', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_class', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_locks', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_group', 'pg_catalog.pg_amop', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_description', 'pg_catalog.pg_enum', 'pg_catalog.pg_policy', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_settings', 'pg_catalog.pg_operator', 'pg_catalog.pg_sequences', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_extension', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_transform', 'pg_catalog.pg_publication', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_matviews', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_proc', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_stat_slru', 'information_schema.view_column_usage', 'information_schema.column_domain_usage', 'information_schema.column_udt_usage', 'information_schema.table_constraints', 'information_schema.view_table_usage', 'information_schema.views', 'information_schema.role_usage_grants', 'information_schema.routine_column_usage', 'information_schema.parameters', 'information_schema.routine_sequence_usage', 'information_schema.user_mapping_options', 'information_schema.information_schema_catalog_name', 'information_schema.columns', 'information_schema.triggered_update_columns', 'information_schema.routine_privileges', 'information_schema.sequences', 'information_schema.sql_sizing', 'information_schema.element_types', 'information_schema.foreign_tables', 'information_schema.collation_character_set_applicability', 'information_schema.usage_privileges', 'information_schema.applicable_roles', 'information_schema.character_sets', 'information_schema.routines', 'information_schema.role_column_grants', 'information_schema.data_type_privileges', 'information_schema.column_privileges', 'information_schema.routine_table_usage', 'information_schema.check_constraint_routine_usage', 'information_schema.check_constraints', 'information_schema.routine_routine_usage', 'information_schema.foreign_servers', 'information_schema.column_column_usage', 'information_schema.constraint_table_usage', 'information_schema.role_routine_grants', 'information_schema.user_mappings', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.tables', 'information_schema.column_options', 'information_schema.domains', 'information_schema.table_privileges', 'information_schema.foreign_data_wrappers', 'information_schema.view_routine_usage', 'information_schema.domain_udt_usage', 'information_schema.key_column_usage', 'information_schema.role_udt_grants', 'information_schema.foreign_server_options', 'information_schema.attributes', 'information_schema.referential_constraints', 'information_schema.sql_features', 'information_schema.udt_privileges', 'information_schema.foreign_table_options', 'information_schema.collations', 'information_schema.constraint_column_usage', 'information_schema.schemata', 'information_schema.sql_implementation_info', 'information_schema.role_table_grants', 'information_schema.triggers', 'information_schema.domain_constraints', 'information_schema.enabled_roles', 'information_schema.user_defined_types', 'public.pg_stat_statements_info', 'public.pg_stat_statements');
Date: 2024-09-29 15:00:13 Duration: 249ms
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
- 68,365 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 961 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 896 Max number of times the same event was reported
- 961 Total events found
Rank Times reported Error 1 896 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Sep 29 20 35 21 34 22 27 23 10 00 28 01 32 02 30 03 102 04 109 05 33 06 38 07 37 08 32 09 31 10 29 11 33 12 32 13 35 14 31 15 37 16 27 17 32 18 31 19 31 - 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-09-29 21:50:14
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-09-29 22:00:20
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-09-29 22:40:36
2 65 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Sep 29 21 26 22 8 23 1 00 2 03 1 09 1 10 26 - 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-09-29 13:24:49' WHERE id IN (191)
Date: 2024-09-29 13:24:49
Statement: UPDATE "bus_presence" SET "last_poll"='2024-09-29 04:07:06' WHERE id IN (151)
Date: 2024-09-29 04:07:06
Statement: UPDATE "bus_presence" SET "last_poll"='2024-09-29 01:35:32' WHERE id IN (191)
Date: 2024-09-29 01:35:32