-
Global information
- Generated on Sat Sep 7 23:50:30 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 591,268 log entries in 28s
- Log start from 2024-09-07 00:00:00 to 2024-09-07 23:50:00
-
Overview
Global Stats
- 238 Number of unique normalized queries
- 204,708 Number of queries
- 23h43m49s Total query duration
- 2024-09-07 00:00:00 First query
- 2024-09-07 23:50:00 Last query
- 24 queries/s at 2024-09-07 12:04:04 Query peak
- 23h43m49s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 23h43m49s Execute total duration
- 1,864 Number of events
- 3 Number of unique normalized events
- 1,833 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
- 204,708 Average queries per session
- 23h43m49s Average queries duration per session
- n/a Average idle time per session
- 0 Total number of connections
- 1 Total number of databases
SQL Traffic
Key values
- 24 queries/s Query Peak
- 2024-09-07 12:04:04 Date
SELECT Traffic
Key values
- 23 queries/s Query Peak
- 2024-09-07 12:04:04 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 5 queries/s Query Peak
- 2024-09-07 09:16:10 Date
Queries duration
Key values
- 23h43m49s 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 07 00 4,155 120ms 17s426ms 703ms 1m13s 1m16s 1m23s 01 5,042 120ms 16s254ms 922ms 1m56s 2m6s 2m38s 02 4,374 120ms 3s722ms 676ms 54s857ms 56s589ms 59s975ms 03 3,808 120ms 3s366ms 500ms 50s126ms 51s397ms 1m3s 04 6,457 120ms 7s561ms 364ms 52s130ms 56s575ms 1m 05 9,773 120ms 21s83ms 419ms 1m33s 1m40s 1m51s 06 12,297 120ms 1s499ms 351ms 1m17s 1m19s 1m25s 07 12,503 120ms 1s460ms 349ms 1m19s 1m22s 1m24s 08 13,147 120ms 3s609ms 379ms 1m43s 2m47s 3m24s 09 16,284 120ms 5m34s 574ms 3m59s 5m7s 9m20s 10 12,450 120ms 1s543ms 348ms 1m21s 1m24s 1m26s 11 15,174 120ms 30s535ms 408ms 2m22s 2m32s 3m9s 12 15,571 120ms 3s682ms 452ms 2m20s 2m33s 3m2s 13 9,925 120ms 3s381ms 379ms 1m21s 1m29s 2m8s 14 9,336 120ms 2s167ms 381ms 1m12s 1m20s 1m44s 15 9,071 120ms 3s734ms 387ms 1m15s 1m30s 1m36s 16 8,131 120ms 2s229ms 390ms 1m7s 1m31s 1m33s 17 7,774 120ms 1s604ms 373ms 51s37ms 51s563ms 57s519ms 18 7,833 120ms 2s216ms 373ms 51s121ms 52s465ms 54s230ms 19 7,679 120ms 4s342ms 381ms 51s956ms 57s466ms 58s312ms 20 5,842 120ms 1s944ms 339ms 51s9ms 52s74ms 55s821ms 21 2,918 120ms 1s966ms 153ms 8s193ms 10s724ms 48s130ms 22 2,849 120ms 740ms 139ms 7s861ms 9s106ms 13s305ms 23 2,315 120ms 730ms 140ms 7s885ms 8s329ms 12s311ms Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Sep 07 00 3,500 0 175ms 13s399ms 15s67ms 17s834ms 01 4,071 0 309ms 25s625ms 28s726ms 39s356ms 02 3,803 0 295ms 21s502ms 23s637ms 26s526ms 03 3,456 0 236ms 17s735ms 19s441ms 22s64ms 04 4,872 0 431ms 44s590ms 46s139ms 51s485ms 05 7,702 0 485ms 1m18s 1m26s 1m34s 06 10,190 0 388ms 1m9s 1m11s 1m14s 07 10,395 0 386ms 1m11s 1m13s 1m17s 08 11,031 0 412ms 1m15s 1m37s 3m10s 09 13,994 123 577ms 2m20s 2m32s 2m51s 10 10,327 0 385ms 1m9s 1m15s 1m20s 11 12,152 0 459ms 2m 2m8s 2m18s 12 11,588 0 538ms 1m51s 2m7s 2m32s 13 7,806 0 435ms 1m6s 1m15s 1m42s 14 7,232 0 443ms 1m1s 1m6s 1m17s 15 6,959 0 453ms 1m 1m9s 1m26s 16 6,022 0 467ms 46s237ms 1m 1m26s 17 5,655 0 451ms 44s251ms 45s49ms 45s914ms 18 5,702 0 450ms 44s68ms 45s29ms 47s4ms 19 5,561 0 462ms 44s232ms 45s934ms 51s479ms 20 4,509 0 391ms 43s822ms 45s179ms 46s278ms 21 2,918 0 153ms 7s417ms 8s193ms 13s317ms 22 2,849 0 139ms 7s89ms 7s861ms 11s477ms 23 2,315 0 140ms 7s459ms 7s885ms 9s806ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Sep 07 00 0 650 0 0 3s464ms 58s588ms 59s45ms 1m2s 01 0 968 0 0 3s474ms 1m4s 1m30s 1m36s 02 0 571 0 0 3s217ms 31s729ms 32s288ms 32s778ms 03 0 352 0 0 3s94ms 30s471ms 30s965ms 31s360ms 04 0 2 0 0 339ms 0ms 0ms 0ms 05 0 0 0 0 0ms 0ms 0ms 0ms 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 0 0 0 0ms 0ms 0ms 0ms 08 0 22 0 0 2s968ms 0ms 0ms 5s784ms 09 0 236 0 0 3s385ms 26s750ms 28s414ms 31s271ms 10 0 0 0 0 0ms 0ms 0ms 0ms 11 0 2 1 0 8s194ms 0ms 0ms 0ms 12 0 0 0 0 0ms 0ms 0ms 0ms 13 0 2 0 0 341ms 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 2 0 0 384ms 0ms 0ms 0ms 19 0 0 0 0 0ms 0ms 0ms 0ms 20 0 2 0 0 329ms 0ms 0ms 0ms 21 0 0 0 0 0ms 0ms 0ms 0ms 22 0 0 0 0 0ms 0ms 0ms 0ms 23 0 0 0 0 0ms 0ms 0ms 0ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Sep 07 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 07 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 07 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 07 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 07 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 07 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 07 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 07 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 07 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
- 164,609 Total read queries
- 40,099 Total write queries
Queries by database
Key values
- unknown Main database
- 204,708 Requests
- 23h43m49s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 205,327 Requests
User Request type Count Duration unknown Total 205,327 23h54m6s copy to 123 17m46s cte 37,166 1h50m51s delete 1 165ms select 165,075 18h59m30s tcl 1 135ms update 2,961 2h45m56s Duration by user
Key values
- 23h54m6s (unknown) Main time consuming user
User Request type Count Duration unknown Total 205,327 23h54m6s copy to 123 17m46s cte 37,166 1h50m51s delete 1 165ms select 165,075 18h59m30s tcl 1 135ms update 2,961 2h45m56s Queries by host
Key values
- unknown Main host
- 205,327 Requests
- 23h54m6s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 204,708 Requests
- 23h43m49s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-09-07 06:08:14 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 157,044 100-500ms duration
Slowest individual queries
Rank Duration Query 1 5m34s 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-07 09:13:24 ]
2 2m37s 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-07 09:05:16 ]
3 2m17s 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-07 09:07:48 ]
4 50s820ms COPY public.account_move_line (id, move_id, move_name, date, ref, parent_state, journal_id, company_id, company_currency_id, account_id, account_root_id, sequence, name, quantity, price_unit, discount, debit, credit, balance, amount_currency, price_subtotal, price_total, reconciled, blocked, date_maturity, currency_id, partner_id, product_uom_id, product_id, reconcile_model_id, payment_id, statement_line_id, statement_id, tax_line_id, tax_group_id, tax_base_amount, tax_exigible, tax_repartition_line_id, tax_audit, amount_residual, amount_residual_currency, full_reconcile_id, matching_number, analytic_account_id, display_type, is_rounding_line, exclude_from_invoice_tab, create_uid, create_date, write_uid, write_date, expected_pay_date, internal_note, next_action_date, followup_line_id, followup_date, is_anglo_saxon_line, purchase_line_id, branch_id, branch_name, vehicle_id, move_options, sign_product_qty, sign_price_subtotal, new_product_qty, sale_line_id, child_sale_line_id, main_invoice_line_id, core_bank_transaction, is_rtv_line, core_qty, rebate_amount, cost_price, is_visible_in_report, is_labour, can_be_paid, bal_core_bank_id, repair_line_id, inv_back_order_qty, sale_back_order_qty, product_pricelist_item_id, is_discount, is_sale_tax, auto_reconcile, is_writeoff, is_extra_line, is_carry_forward) TO stdout;[ Date: 2024-09-07 09:01:21 ]
5 30s535ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-09-07 11:53:13 ]
6 27s552ms COPY public.sale_history_line (id, history_data_link, company_id, customer_id, product_id, invoice_id, product_name, name, product_uom_qty, price_unit, cost_price_unit, price_subtotal, cost_subtotal, gross_profit, rebate_amount, rebate_subtotal, invoice_item_no, inventory_product_categ, inventory_part_type, inventory_short_vendor_name, currency_id, core_sales_amount, core_cost_amount, labor_amount, serial_number, labor_flag, note, under_warranty, contact_reference, contact_name, selling_branch, vehicle_unit_no, vehicle_identification_number, vehicle_odometer, customer_reference_no, sales_obtain, sale_order_no, sale_order_date, invoice_number, invoice_date, user_id, exception_sale, create_uid, create_date, write_uid, write_date, product_pricelist_item_id, history_id, history_date, history_type, so_line_id, new_user_id, gross_profit_amount, is_shipping, move_options, manufacturing_usage, technician_id, inventory_vendor_id, product_type) TO stdout;[ Date: 2024-09-07 09:16:47 ]
7 21s533ms 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-07 09:01:53 ]
8 21s83ms SELECT "mail_message".id FROM "mail_message" WHERE ((((("mail_message"."id" in ( SELECT "mail_message_res_partner_needaction_rel"."mail_message_id" FROM "mail_message_res_partner_needaction_rel" WHERE ("mail_message_res_partner_needaction_rel"."notification_status" in ('bounce', 'exception')))) AND ("mail_message"."author_id" = 3)) AND ("mail_message"."res_id" != 0)) AND "mail_message"."model" IS NOT NULL) AND (("mail_message"."message_type" != 'user_notification') OR "mail_message"."message_type" IS NULL)) ORDER BY "mail_message"."id" DESC;[ Date: 2024-09-07 05:13:31 ]
9 20s473ms 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, reconcile_date_from_add) TO stdout;[ Date: 2024-09-07 09:00:30 ]
10 17s553ms 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-07 09:13:43 ]
11 17s426ms with data as ( select distinct shl.id as record, 3926, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 45 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-09-06 00:00:00' and shl.invoice_date <= '2024-09-06 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (181338, 209320, 209457, 199620, 209506, 209572, 264484, 188461, 177857, 209255, 209487, 206498, 209427, 209305, 190640, 263941, 193726, 220159, 261130, 183364, 183351, 181401, 184449, 177926, 209372, 209273, 209492, 209415, 189018, 209526, 209199, 209269, 209537, 209559, 209379, 209211, 209496, 209479, 209416, 183353, 209181, 203493, 209312, 188135, 209462, 264473, 209485, 209214, 215194, 209299, 171894, 193591, 209238, 209514, 209280, 177927, 209513, 209216, 209389, 209403, 193594, 209525, 209556, 209446, 193209, 209568, 209340, 209266, 209456, 203637, 209257, 202634, 209184, 209438, 239482, 176416, 177935, 209339, 183350, 209202, 171849, 209569, 245856, 181365, 261331, 189041, 189318, 189042, 263443, 176845, 216169, 216830, 215132, 217993, 215083, 216172, 183363, 193332, 193196, 193330, 192820, 193255, 193222, 193411, 209344, 190567, 242323, 209518, 209354, 209398, 173869, 266143, 180822, 190593, 199584, 209497, 266100, 209319, 209475, 209503, 193161, 176822, 209243, 215085, 223745, 209356, 264748, 213509, 171831, 209488, 216254, 209271, 186294, 261675, 215733, 187649, 209315, 239469, 209284, 177870, 187570, 213582, 209396, 209374, 209203, 209423, 209241, 190566, 209298, 209250, 209254, 254005, 242315, 209352, 209316, 209563, 243667, 239388, 203634, 209512, 219450, 209188, 209327, 180951, 209228, 209459, 261328, 171794, 209180, 209434, 209469, 221177, 209226, 209452, 209177, 177947, 209318, 209219, 209307, 209421, 181407, 209309, 177831, 209422, 177915, 209272, 175953, 199518, 209538, 265694, 188127, 209277, 209207, 209332, 203447, 177874, 192883, 209509, 209173, 209183, 209197, 186232, 209560, 209185, 209227, 209314, 209235, 181339, 177924, 223565, 209360, 209187, 261330, 188062, 209381, 209392, 209231, 209264, 177948, 266141, 249176, 209494, 266142, 181419, 209267, 209253, 216252, 209268, 209466, 209325, 209342, 265634, 209435, 216174, 261677, 262098, 267466, 268736, 209491, 190746, 209281, 199617, 209270, 262287, 250980, 209440, 209179, 171808, 209573, 193387, 209393, 209358, 175955, 209473, 181014, 187530, 209224, 209330, 202460, 209517, 209464, 209265, 209346, 209519, 193166, 197225, 209276, 209565, 209524, 209370, 203203, 203523, 209172, 218649, 209357, 193237, 209378, 209501, 209244, 181349, 209776, 209380, 209390, 209278, 184037, 209259, 209561, 177942, 247896, 209365, 209495, 209436, 187560, 216042, 209209, 209414, 209472, 209571, 209335, 209247, 209424, 186233, 180821, 209192, 209317, 186845, 219285, 184009, 203703, 209258, 209233, 186297, 262859, 209323, 199592, 238977, 181406, 173819, 193534, 209263, 261332, 216043, 209313, 216568, 202879, 209234, 209262, 209439, 209359, 209412, 209252, 203552, 209382, 177885, 209245, 209447, 209212, 209311, 209413, 180922, 203223, 209555, 209516, 216165, 209529, 209546, 209437, 209201, 209191, 265701, 217925, 209175, 186295, 202477, 209304, 209279, 209345, 209196, 209221, 216353, 193086, 263534, 209362, 209220, 209198, 209527, 209303, 209598, 209474, 209483, 216967, 209430, 209193, 181334, 209545, 193059, 187918, 190525, 180730, 181369, 266060, 222935, 209367, 216504, 197864, 240858, 209366, 209394, 209229, 209338, 209251, 264696, 215536, 241898, 262499, 209310, 209567, 209347, 172604, 268988, 219982, 173580, 197276, 209306, 190999, 209328, 209361, 209230, 209521, 216044, 177070, 209425, 209441, 209505, 209210, 202687, 209225, 193595, 209528, 209515, 209451, 203231, 209286, 209470, 209510, 203235, 209308, 209333, 209471, 209554, 209558, 209391, 209442, 209232, 209261, 209182, 209174, 209493, 209482, 209507, 209260, 209384, 209178, 209520, 209511, 209322, 209329, 209176, 209282, 209206, 209246, 217801, 209566, 203522, 209562, 216288, 188406, 216289, 209194, 209468, 209343, 209256, 209418, 209242, 209195, 228007, 209570, 265380, 206627, 209460, 209324, 181415, 209433, 209236, 209321, 181409, 216761, 208831, 209186, 209484, 220144, 209189, 203690, 181351, 209331, 217980, 209326, 216887, 266076, 202476, 209302, 209480, 209502, 186298, 259262, 209334, 203233, 264977, 209190, 219448, 209239, 193529, 209200, 215288, 190785, 188425, 181348, 218167, 176679) UNION ALL ( select distinct sol.id as record, 3926, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 45 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-09-06 00:00:00' and so.date_order <= '2024-09-06 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (181338, 209320, 209457, 199620, 209506, 209572, 264484, 188461, 177857, 209255, 209487, 206498, 209427, 209305, 190640, 263941, 193726, 220159, 261130, 183364, 183351, 181401, 184449, 177926, 209372, 209273, 209492, 209415, 189018, 209526, 209199, 209269, 209537, 209559, 209379, 209211, 209496, 209479, 209416, 183353, 209181, 203493, 209312, 188135, 209462, 264473, 209485, 209214, 215194, 209299, 171894, 193591, 209238, 209514, 209280, 177927, 209513, 209216, 209389, 209403, 193594, 209525, 209556, 209446, 193209, 209568, 209340, 209266, 209456, 203637, 209257, 202634, 209184, 209438, 239482, 176416, 177935, 209339, 183350, 209202, 171849, 209569, 245856, 181365, 261331, 189041, 189318, 189042, 263443, 176845, 216169, 216830, 215132, 217993, 215083, 216172, 183363, 193332, 193196, 193330, 192820, 193255, 193222, 193411, 209344, 190567, 242323, 209518, 209354, 209398, 173869, 266143, 180822, 190593, 199584, 209497, 266100, 209319, 209475, 209503, 193161, 176822, 209243, 215085, 223745, 209356, 264748, 213509, 171831, 209488, 216254, 209271, 186294, 261675, 215733, 187649, 209315, 239469, 209284, 177870, 187570, 213582, 209396, 209374, 209203, 209423, 209241, 190566, 209298, 209250, 209254, 254005, 242315, 209352, 209316, 209563, 243667, 239388, 203634, 209512, 219450, 209188, 209327, 180951, 209228, 209459, 261328, 171794, 209180, 209434, 209469, 221177, 209226, 209452, 209177, 177947, 209318, 209219, 209307, 209421, 181407, 209309, 177831, 209422, 177915, 209272, 175953, 199518, 209538, 265694, 188127, 209277, 209207, 209332, 203447, 177874, 192883, 209509, 209173, 209183, 209197, 186232, 209560, 209185, 209227, 209314, 209235, 181339, 177924, 223565, 209360, 209187, 261330, 188062, 209381, 209392, 209231, 209264, 177948, 266141, 249176, 209494, 266142, 181419, 209267, 209253, 216252, 209268, 209466, 209325, 209342, 265634, 209435, 216174, 261677, 262098, 267466, 268736, 209491, 190746, 209281, 199617, 209270, 262287, 250980, 209440, 209179, 171808, 209573, 193387, 209393, 209358, 175955, 209473, 181014, 187530, 209224, 209330, 202460, 209517, 209464, 209265, 209346, 209519, 193166, 197225, 209276, 209565, 209524, 209370, 203203, 203523, 209172, 218649, 209357, 193237, 209378, 209501, 209244, 181349, 209776, 209380, 209390, 209278, 184037, 209259, 209561, 177942, 247896, 209365, 209495, 209436, 187560, 216042, 209209, 209414, 209472, 209571, 209335, 209247, 209424, 186233, 180821, 209192, 209317, 186845, 219285, 184009, 203703, 209258, 209233, 186297, 262859, 209323, 199592, 238977, 181406, 173819, 193534, 209263, 261332, 216043, 209313, 216568, 202879, 209234, 209262, 209439, 209359, 209412, 209252, 203552, 209382, 177885, 209245, 209447, 209212, 209311, 209413, 180922, 203223, 209555, 209516, 216165, 209529, 209546, 209437, 209201, 209191, 265701, 217925, 209175, 186295, 202477, 209304, 209279, 209345, 209196, 209221, 216353, 193086, 263534, 209362, 209220, 209198, 209527, 209303, 209598, 209474, 209483, 216967, 209430, 209193, 181334, 209545, 193059, 187918, 190525, 180730, 181369, 266060, 222935, 209367, 216504, 197864, 240858, 209366, 209394, 209229, 209338, 209251, 264696, 215536, 241898, 262499, 209310, 209567, 209347, 172604, 268988, 219982, 173580, 197276, 209306, 190999, 209328, 209361, 209230, 209521, 216044, 177070, 209425, 209441, 209505, 209210, 202687, 209225, 193595, 209528, 209515, 209451, 203231, 209286, 209470, 209510, 203235, 209308, 209333, 209471, 209554, 209558, 209391, 209442, 209232, 209261, 209182, 209174, 209493, 209482, 209507, 209260, 209384, 209178, 209520, 209511, 209322, 209329, 209176, 209282, 209206, 209246, 217801, 209566, 203522, 209562, 216288, 188406, 216289, 209194, 209468, 209343, 209256, 209418, 209242, 209195, 228007, 209570, 265380, 206627, 209460, 209324, 181415, 209433, 209236, 209321, 181409, 216761, 208831, 209186, 209484, 220144, 209189, 203690, 181351, 209331, 217980, 209326, 216887, 266076, 202476, 209302, 209480, 209502, 186298, 259262, 209334, 203233, 264977, 209190, 219448, 209239, 193529, 209200, 215288, 190785, 188425, 181348, 218167, 176679)) UNION ALL ( select distinct sm.id as record, 3926, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 45 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-09-06 00:00:00' and mrp.create_date <= '2024-09-06 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (181338, 209320, 209457, 199620, 209506, 209572, 264484, 188461, 177857, 209255, 209487, 206498, 209427, 209305, 190640, 263941, 193726, 220159, 261130, 183364, 183351, 181401, 184449, 177926, 209372, 209273, 209492, 209415, 189018, 209526, 209199, 209269, 209537, 209559, 209379, 209211, 209496, 209479, 209416, 183353, 209181, 203493, 209312, 188135, 209462, 264473, 209485, 209214, 215194, 209299, 171894, 193591, 209238, 209514, 209280, 177927, 209513, 209216, 209389, 209403, 193594, 209525, 209556, 209446, 193209, 209568, 209340, 209266, 209456, 203637, 209257, 202634, 209184, 209438, 239482, 176416, 177935, 209339, 183350, 209202, 171849, 209569, 245856, 181365, 261331, 189041, 189318, 189042, 263443, 176845, 216169, 216830, 215132, 217993, 215083, 216172, 183363, 193332, 193196, 193330, 192820, 193255, 193222, 193411, 209344, 190567, 242323, 209518, 209354, 209398, 173869, 266143, 180822, 190593, 199584, 209497, 266100, 209319, 209475, 209503, 193161, 176822, 209243, 215085, 223745, 209356, 264748, 213509, 171831, 209488, 216254, 209271, 186294, 261675, 215733, 187649, 209315, 239469, 209284, 177870, 187570, 213582, 209396, 209374, 209203, 209423, 209241, 190566, 209298, 209250, 209254, 254005, 242315, 209352, 209316, 209563, 243667, 239388, 203634, 209512, 219450, 209188, 209327, 180951, 209228, 209459, 261328, 171794, 209180, 209434, 209469, 221177, 209226, 209452, 209177, 177947, 209318, 209219, 209307, 209421, 181407, 209309, 177831, 209422, 177915, 209272, 175953, 199518, 209538, 265694, 188127, 209277, 209207, 209332, 203447, 177874, 192883, 209509, 209173, 209183, 209197, 186232, 209560, 209185, 209227, 209314, 209235, 181339, 177924, 223565, 209360, 209187, 261330, 188062, 209381, 209392, 209231, 209264, 177948, 266141, 249176, 209494, 266142, 181419, 209267, 209253, 216252, 209268, 209466, 209325, 209342, 265634, 209435, 216174, 261677, 262098, 267466, 268736, 209491, 190746, 209281, 199617, 209270, 262287, 250980, 209440, 209179, 171808, 209573, 193387, 209393, 209358, 175955, 209473, 181014, 187530, 209224, 209330, 202460, 209517, 209464, 209265, 209346, 209519, 193166, 197225, 209276, 209565, 209524, 209370, 203203, 203523, 209172, 218649, 209357, 193237, 209378, 209501, 209244, 181349, 209776, 209380, 209390, 209278, 184037, 209259, 209561, 177942, 247896, 209365, 209495, 209436, 187560, 216042, 209209, 209414, 209472, 209571, 209335, 209247, 209424, 186233, 180821, 209192, 209317, 186845, 219285, 184009, 203703, 209258, 209233, 186297, 262859, 209323, 199592, 238977, 181406, 173819, 193534, 209263, 261332, 216043, 209313, 216568, 202879, 209234, 209262, 209439, 209359, 209412, 209252, 203552, 209382, 177885, 209245, 209447, 209212, 209311, 209413, 180922, 203223, 209555, 209516, 216165, 209529, 209546, 209437, 209201, 209191, 265701, 217925, 209175, 186295, 202477, 209304, 209279, 209345, 209196, 209221, 216353, 193086, 263534, 209362, 209220, 209198, 209527, 209303, 209598, 209474, 209483, 216967, 209430, 209193, 181334, 209545, 193059, 187918, 190525, 180730, 181369, 266060, 222935, 209367, 216504, 197864, 240858, 209366, 209394, 209229, 209338, 209251, 264696, 215536, 241898, 262499, 209310, 209567, 209347, 172604, 268988, 219982, 173580, 197276, 209306, 190999, 209328, 209361, 209230, 209521, 216044, 177070, 209425, 209441, 209505, 209210, 202687, 209225, 193595, 209528, 209515, 209451, 203231, 209286, 209470, 209510, 203235, 209308, 209333, 209471, 209554, 209558, 209391, 209442, 209232, 209261, 209182, 209174, 209493, 209482, 209507, 209260, 209384, 209178, 209520, 209511, 209322, 209329, 209176, 209282, 209206, 209246, 217801, 209566, 203522, 209562, 216288, 188406, 216289, 209194, 209468, 209343, 209256, 209418, 209242, 209195, 228007, 209570, 265380, 206627, 209460, 209324, 181415, 209433, 209236, 209321, 181409, 216761, 208831, 209186, 209484, 220144, 209189, 203690, 181351, 209331, 217980, 209326, 216887, 266076, 202476, 209302, 209480, 209502, 186298, 259262, 209334, 203233, 264977, 209190, 219448, 209239, 193529, 209200, 215288, 190785, 188425, 181348, 218167, 176679))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3926, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 45);[ Date: 2024-09-07 00:27:47 ]
12 16s254ms with data as ( select distinct shl.id as record, 3928, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 48 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-09-06 00:00:00' and shl.invoice_date <= '2024-09-06 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193215, 209392, 209440, 209339, 180322, 193717, 209356, 264378, 203268, 209219, 190550, 209506, 209381, 249278, 209357, 266060, 268988, 209182, 207553, 209329, 209427, 209561, 227274, 209268, 209421, 185979, 209459, 209571, 209566, 209495, 209185, 209372, 217254, 209497, 217072, 209568, 239482, 209246, 209483, 209391, 209430, 209507, 209347, 209343, 209207, 209321, 209545, 209505, 209466, 177857, 209203, 209415, 209470, 209225, 209562, 245580, 190593, 209513, 245563, 242987, 209276, 181365, 228221, 250940, 209267, 209256, 209272, 183566, 209482, 239470, 209194, 209193, 209469, 209445, 209305, 179524, 209333, 209253, 209265, 209307, 193528, 177379, 209284, 209190, 209484, 209278, 209521, 180320, 203327, 209326, 179363, 209532, 209318, 209199, 209325, 209468, 209314, 209331, 209316, 209206, 206548, 187649, 209250, 209456, 209416, 173002, 209390, 193222, 172998, 209538, 209457, 209398, 209435, 209255, 209226, 209434, 209422, 209475, 209308, 209279, 209189, 176066, 209177, 209187, 209569, 209479, 209518, 221328, 209423, 209323, 209201, 209517, 214527, 179522, 181404, 209235, 209183, 209261, 180296, 209441, 209233, 209179, 209365, 209396, 209379, 179738, 209236, 209319, 209380, 209277, 209227, 179743, 177070, 209188, 209327, 209335, 176058, 209509, 209332, 209493, 209554, 209270, 181331, 209520, 209309, 209239, 181324, 209210, 209559, 209173, 209501, 216961, 209378, 209299, 266076, 209537, 209176, 173313, 209315, 209200, 209243, 209186, 209202, 217253, 227304, 209260, 209487, 209174, 209254, 209195, 209491, 180855, 209298, 209214, 209451, 209524, 209273, 209494, 209473, 209342, 209180, 171850, 209330, 209238, 209192, 176205, 209480, 193576, 209472, 192819, 209334, 209172, 209320, 209515, 252547, 209499, 209197, 211671, 209464, 177371, 209232, 209510, 172943, 203556, 209531, 179746, 197276, 209462, 209322, 209514, 209191, 209211, 193185, 209310, 173211, 193359, 193529, 197248, 179523, 209221, 193284, 209304, 179745, 177439, 203522, 209328, 209242, 190636, 209302, 209477, 209175, 209498, 209496, 209212, 209286, 209229, 209438, 209382, 180881, 209361, 192903, 209439, 209266, 209529, 209263, 209389, 209359, 203306, 209245, 180882, 172690, 209262, 209485, 209366, 209230, 209563, 203312, 209516, 209198, 209567, 209447, 209340, 209570, 193209, 209546, 209257, 209251, 209511, 209228, 209437, 209345, 209572, 209555, 209252, 209209, 209317, 185978, 209527, 209311, 209512, 209271, 209303, 209413, 209181, 209354, 179742, 209313, 183563, 249608, 209442, 209403, 209216, 209478, 209525, 179737, 209425, 209528, 209519, 209269, 209488, 209433, 209452, 209282, 209418, 172946, 193196, 209184, 209352, 267517, 209374, 209560, 209324, 209526, 209436, 209573, 209503, 209280, 209178, 193450, 209412, 209241, 218035, 209502, 209556, 209565, 209258, 209414, 209424, 209234, 260360, 209358, 209474, 209306, 209370, 207422, 209492, 209384, 209259, 209220, 193330, 207366, 209446, 199590, 209196, 209264, 209367, 209362, 190611, 209338, 209460, 188056, 209558, 265694, 209346, 209244, 209360, 209393, 209344, 209231, 186249, 180730, 177435, 181338, 216887, 209312, 209247, 192795, 240896, 172933, 180822, 203233, 197273, 193509, 260359, 197261) UNION ALL ( select distinct sol.id as record, 3928, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 48 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-09-06 00:00:00' and so.date_order <= '2024-09-06 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193215, 209392, 209440, 209339, 180322, 193717, 209356, 264378, 203268, 209219, 190550, 209506, 209381, 249278, 209357, 266060, 268988, 209182, 207553, 209329, 209427, 209561, 227274, 209268, 209421, 185979, 209459, 209571, 209566, 209495, 209185, 209372, 217254, 209497, 217072, 209568, 239482, 209246, 209483, 209391, 209430, 209507, 209347, 209343, 209207, 209321, 209545, 209505, 209466, 177857, 209203, 209415, 209470, 209225, 209562, 245580, 190593, 209513, 245563, 242987, 209276, 181365, 228221, 250940, 209267, 209256, 209272, 183566, 209482, 239470, 209194, 209193, 209469, 209445, 209305, 179524, 209333, 209253, 209265, 209307, 193528, 177379, 209284, 209190, 209484, 209278, 209521, 180320, 203327, 209326, 179363, 209532, 209318, 209199, 209325, 209468, 209314, 209331, 209316, 209206, 206548, 187649, 209250, 209456, 209416, 173002, 209390, 193222, 172998, 209538, 209457, 209398, 209435, 209255, 209226, 209434, 209422, 209475, 209308, 209279, 209189, 176066, 209177, 209187, 209569, 209479, 209518, 221328, 209423, 209323, 209201, 209517, 214527, 179522, 181404, 209235, 209183, 209261, 180296, 209441, 209233, 209179, 209365, 209396, 209379, 179738, 209236, 209319, 209380, 209277, 209227, 179743, 177070, 209188, 209327, 209335, 176058, 209509, 209332, 209493, 209554, 209270, 181331, 209520, 209309, 209239, 181324, 209210, 209559, 209173, 209501, 216961, 209378, 209299, 266076, 209537, 209176, 173313, 209315, 209200, 209243, 209186, 209202, 217253, 227304, 209260, 209487, 209174, 209254, 209195, 209491, 180855, 209298, 209214, 209451, 209524, 209273, 209494, 209473, 209342, 209180, 171850, 209330, 209238, 209192, 176205, 209480, 193576, 209472, 192819, 209334, 209172, 209320, 209515, 252547, 209499, 209197, 211671, 209464, 177371, 209232, 209510, 172943, 203556, 209531, 179746, 197276, 209462, 209322, 209514, 209191, 209211, 193185, 209310, 173211, 193359, 193529, 197248, 179523, 209221, 193284, 209304, 179745, 177439, 203522, 209328, 209242, 190636, 209302, 209477, 209175, 209498, 209496, 209212, 209286, 209229, 209438, 209382, 180881, 209361, 192903, 209439, 209266, 209529, 209263, 209389, 209359, 203306, 209245, 180882, 172690, 209262, 209485, 209366, 209230, 209563, 203312, 209516, 209198, 209567, 209447, 209340, 209570, 193209, 209546, 209257, 209251, 209511, 209228, 209437, 209345, 209572, 209555, 209252, 209209, 209317, 185978, 209527, 209311, 209512, 209271, 209303, 209413, 209181, 209354, 179742, 209313, 183563, 249608, 209442, 209403, 209216, 209478, 209525, 179737, 209425, 209528, 209519, 209269, 209488, 209433, 209452, 209282, 209418, 172946, 193196, 209184, 209352, 267517, 209374, 209560, 209324, 209526, 209436, 209573, 209503, 209280, 209178, 193450, 209412, 209241, 218035, 209502, 209556, 209565, 209258, 209414, 209424, 209234, 260360, 209358, 209474, 209306, 209370, 207422, 209492, 209384, 209259, 209220, 193330, 207366, 209446, 199590, 209196, 209264, 209367, 209362, 190611, 209338, 209460, 188056, 209558, 265694, 209346, 209244, 209360, 209393, 209344, 209231, 186249, 180730, 177435, 181338, 216887, 209312, 209247, 192795, 240896, 172933, 180822, 203233, 197273, 193509, 260359, 197261)) UNION ALL ( select distinct sm.id as record, 3928, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 48 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-09-06 00:00:00' and mrp.create_date <= '2024-09-06 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (193215, 209392, 209440, 209339, 180322, 193717, 209356, 264378, 203268, 209219, 190550, 209506, 209381, 249278, 209357, 266060, 268988, 209182, 207553, 209329, 209427, 209561, 227274, 209268, 209421, 185979, 209459, 209571, 209566, 209495, 209185, 209372, 217254, 209497, 217072, 209568, 239482, 209246, 209483, 209391, 209430, 209507, 209347, 209343, 209207, 209321, 209545, 209505, 209466, 177857, 209203, 209415, 209470, 209225, 209562, 245580, 190593, 209513, 245563, 242987, 209276, 181365, 228221, 250940, 209267, 209256, 209272, 183566, 209482, 239470, 209194, 209193, 209469, 209445, 209305, 179524, 209333, 209253, 209265, 209307, 193528, 177379, 209284, 209190, 209484, 209278, 209521, 180320, 203327, 209326, 179363, 209532, 209318, 209199, 209325, 209468, 209314, 209331, 209316, 209206, 206548, 187649, 209250, 209456, 209416, 173002, 209390, 193222, 172998, 209538, 209457, 209398, 209435, 209255, 209226, 209434, 209422, 209475, 209308, 209279, 209189, 176066, 209177, 209187, 209569, 209479, 209518, 221328, 209423, 209323, 209201, 209517, 214527, 179522, 181404, 209235, 209183, 209261, 180296, 209441, 209233, 209179, 209365, 209396, 209379, 179738, 209236, 209319, 209380, 209277, 209227, 179743, 177070, 209188, 209327, 209335, 176058, 209509, 209332, 209493, 209554, 209270, 181331, 209520, 209309, 209239, 181324, 209210, 209559, 209173, 209501, 216961, 209378, 209299, 266076, 209537, 209176, 173313, 209315, 209200, 209243, 209186, 209202, 217253, 227304, 209260, 209487, 209174, 209254, 209195, 209491, 180855, 209298, 209214, 209451, 209524, 209273, 209494, 209473, 209342, 209180, 171850, 209330, 209238, 209192, 176205, 209480, 193576, 209472, 192819, 209334, 209172, 209320, 209515, 252547, 209499, 209197, 211671, 209464, 177371, 209232, 209510, 172943, 203556, 209531, 179746, 197276, 209462, 209322, 209514, 209191, 209211, 193185, 209310, 173211, 193359, 193529, 197248, 179523, 209221, 193284, 209304, 179745, 177439, 203522, 209328, 209242, 190636, 209302, 209477, 209175, 209498, 209496, 209212, 209286, 209229, 209438, 209382, 180881, 209361, 192903, 209439, 209266, 209529, 209263, 209389, 209359, 203306, 209245, 180882, 172690, 209262, 209485, 209366, 209230, 209563, 203312, 209516, 209198, 209567, 209447, 209340, 209570, 193209, 209546, 209257, 209251, 209511, 209228, 209437, 209345, 209572, 209555, 209252, 209209, 209317, 185978, 209527, 209311, 209512, 209271, 209303, 209413, 209181, 209354, 179742, 209313, 183563, 249608, 209442, 209403, 209216, 209478, 209525, 179737, 209425, 209528, 209519, 209269, 209488, 209433, 209452, 209282, 209418, 172946, 193196, 209184, 209352, 267517, 209374, 209560, 209324, 209526, 209436, 209573, 209503, 209280, 209178, 193450, 209412, 209241, 218035, 209502, 209556, 209565, 209258, 209414, 209424, 209234, 260360, 209358, 209474, 209306, 209370, 207422, 209492, 209384, 209259, 209220, 193330, 207366, 209446, 199590, 209196, 209264, 209367, 209362, 190611, 209338, 209460, 188056, 209558, 265694, 209346, 209244, 209360, 209393, 209344, 209231, 186249, 180730, 177435, 181338, 216887, 209312, 209247, 192795, 240896, 172933, 180822, 203233, 197273, 193509, 260359, 197261))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3928, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 48);[ Date: 2024-09-07 01:00:43 ]
13 14s665ms with data as ( select distinct shl.id as record, 3927, shl.id as ref, 'Sales History' as ref_code, shl.product_id as product_id, shl.invoice_date as invoice_date, shl.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, shl.selling_branch as selling_branch, st.id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_history_line as shl LEFT JOIN stock_warehouse as st ON st.branch_id = shl.selling_branch LEFT JOIN product_product as pp ON pp.id = shl.product_id LEFT JOIN product_template as pt ON pt.id = pp.product_tmpl_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id where shl.selling_branch = 46 and shl.sales_obtain != 'direct' and shl.product_id is not null and shl.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and shl.invoice_date >= '2018-09-06 00:00:00' and shl.invoice_date <= '2024-09-06 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209565, 193055, 209857, 181750, 173638, 209436, 209380, 209174, 265955, 198576, 203275, 192883, 209495, 209238, 197891, 209506, 209570, 209464, 209246, 209257, 209503, 209537, 198495, 187620, 209231, 209181, 209233, 172081, 209430, 209538, 209226, 179402, 209563, 209195, 209250, 209179, 209479, 209194, 265694, 209323, 209315, 209327, 209207, 209497, 209298, 209284, 209441, 265700, 190567, 190550, 209234, 203802, 209507, 262098, 209480, 216069, 209280, 203203, 177857, 209172, 209252, 209255, 209424, 209393, 187581, 238922, 209493, 209361, 209216, 265954, 209384, 187614, 193459, 209302, 209229, 209367, 187623, 193593, 209212, 209487, 263941, 209571, 204352, 209200, 194995, 209447, 262083, 209184, 209196, 209472, 209473, 209069, 179986, 209433, 173567, 209566, 209556, 239470, 209528, 209317, 209573, 209502, 255571, 193768, 209496, 209474, 193113, 266060, 209328, 193836, 197248, 265696, 209342, 196025, 209320, 215067, 209505, 209511, 209372, 209391, 209347, 187616, 209266, 209221, 209273, 209442, 209403, 172445, 209230, 209516, 194996, 209338, 209359, 209366, 209198, 183549, 209572, 209340, 209236, 209303, 209568, 173418, 261330, 209343, 209262, 177070, 209345, 209209, 265701, 209189, 209268, 209202, 177161, 239523, 209521, 209561, 182564, 181735, 209344, 209261, 209225, 209242, 245580, 197258, 173212, 188062, 209173, 181886, 209494, 209245, 209451, 209329, 209382, 209446, 195880, 209555, 187628, 209334, 180879, 193114, 172548, 187626, 265477, 206177, 209438, 203288, 209545, 209210, 209197, 209310, 209362, 181724, 193763, 209185, 209191, 180751, 206629, 209491, 193739, 181742, 209244, 209390, 209354, 194999, 209509, 209311, 209324, 198580, 209418, 209488, 209519, 209518, 194990, 257872, 222484, 209471, 209203, 209339, 209526, 209219, 209199, 187627, 209201, 209379, 194223, 187619, 209392, 209267, 197227, 209254, 195175, 209330, 209318, 187859, 209569, 209178, 181744, 209413, 209182, 209256, 177178, 209281, 187615, 209251, 209299, 184051, 261332, 209206, 193195, 180730, 187810, 180915, 209264, 209356, 268988, 239359, 228221, 209188, 209567, 209398, 209279, 209272, 209276, 209269, 209176, 209227, 209374, 209321, 209277, 203231, 209278, 194997, 209316, 209260, 209211, 209326, 209425, 209308, 209314, 199231, 203327, 209412, 209510, 209365, 209313, 209322, 209346, 209319, 209187, 209440, 209512, 209180, 209228, 209177, 209527, 209312, 209304, 209232, 216040, 193109, 209529, 177186, 209331, 265956, 209457, 209271, 209468, 209422, 209475, 209259, 209456, 209435, 195890, 209469, 209462, 192820, 209416, 211457, 209243, 203268, 209253, 265871, 209560, 209270, 209520, 209514, 209360, 176845, 209241, 209335, 209484, 209220, 172099, 172082, 209466, 265380, 209427, 187618, 209305, 209175, 209352, 209396, 209235, 209434, 209439, 209263, 209214, 203423, 181929, 211458, 209515, 209525, 194998, 180855, 209485, 209378, 209423, 209415, 209558, 209389, 209358, 194992, 180822, 209370, 209513, 194994, 209192, 209193, 209381, 187622, 209562, 209554, 209546, 187624, 209306, 209460, 209239, 209325, 209517, 209186, 239482, 209559, 198568, 209332, 266076, 172148, 209492, 209421, 209414, 209333, 209437, 206621, 209524, 216887, 267753, 209190, 209307, 209357, 209482, 173211, 179977, 209286, 239421, 209459, 209501, 209183, 193399, 209470, 209452, 247896, 209483, 174123, 209309, 209265, 209258, 209247, 209282, 202387, 193241) UNION ALL ( select distinct sol.id as record, 3927, so.id as ref, 'Sale Order' as ref_code, sol.product_id as product_id, so.date_order as invoice_date, sol.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, so.branch_id as selling_branch, so.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from sale_order_line sol LEFT JOIN product_product as pp ON sol.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN sale_order as so ON sol.order_id = so.id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where sol.branch_id = 46 and sol.product_id is not null and sol.exception_sale IS NOT TRUE and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and so.date_order >= '2018-09-06 00:00:00' and so.date_order <= '2024-09-06 00:00:00' and so.state in ('permanent_order') and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209565, 193055, 209857, 181750, 173638, 209436, 209380, 209174, 265955, 198576, 203275, 192883, 209495, 209238, 197891, 209506, 209570, 209464, 209246, 209257, 209503, 209537, 198495, 187620, 209231, 209181, 209233, 172081, 209430, 209538, 209226, 179402, 209563, 209195, 209250, 209179, 209479, 209194, 265694, 209323, 209315, 209327, 209207, 209497, 209298, 209284, 209441, 265700, 190567, 190550, 209234, 203802, 209507, 262098, 209480, 216069, 209280, 203203, 177857, 209172, 209252, 209255, 209424, 209393, 187581, 238922, 209493, 209361, 209216, 265954, 209384, 187614, 193459, 209302, 209229, 209367, 187623, 193593, 209212, 209487, 263941, 209571, 204352, 209200, 194995, 209447, 262083, 209184, 209196, 209472, 209473, 209069, 179986, 209433, 173567, 209566, 209556, 239470, 209528, 209317, 209573, 209502, 255571, 193768, 209496, 209474, 193113, 266060, 209328, 193836, 197248, 265696, 209342, 196025, 209320, 215067, 209505, 209511, 209372, 209391, 209347, 187616, 209266, 209221, 209273, 209442, 209403, 172445, 209230, 209516, 194996, 209338, 209359, 209366, 209198, 183549, 209572, 209340, 209236, 209303, 209568, 173418, 261330, 209343, 209262, 177070, 209345, 209209, 265701, 209189, 209268, 209202, 177161, 239523, 209521, 209561, 182564, 181735, 209344, 209261, 209225, 209242, 245580, 197258, 173212, 188062, 209173, 181886, 209494, 209245, 209451, 209329, 209382, 209446, 195880, 209555, 187628, 209334, 180879, 193114, 172548, 187626, 265477, 206177, 209438, 203288, 209545, 209210, 209197, 209310, 209362, 181724, 193763, 209185, 209191, 180751, 206629, 209491, 193739, 181742, 209244, 209390, 209354, 194999, 209509, 209311, 209324, 198580, 209418, 209488, 209519, 209518, 194990, 257872, 222484, 209471, 209203, 209339, 209526, 209219, 209199, 187627, 209201, 209379, 194223, 187619, 209392, 209267, 197227, 209254, 195175, 209330, 209318, 187859, 209569, 209178, 181744, 209413, 209182, 209256, 177178, 209281, 187615, 209251, 209299, 184051, 261332, 209206, 193195, 180730, 187810, 180915, 209264, 209356, 268988, 239359, 228221, 209188, 209567, 209398, 209279, 209272, 209276, 209269, 209176, 209227, 209374, 209321, 209277, 203231, 209278, 194997, 209316, 209260, 209211, 209326, 209425, 209308, 209314, 199231, 203327, 209412, 209510, 209365, 209313, 209322, 209346, 209319, 209187, 209440, 209512, 209180, 209228, 209177, 209527, 209312, 209304, 209232, 216040, 193109, 209529, 177186, 209331, 265956, 209457, 209271, 209468, 209422, 209475, 209259, 209456, 209435, 195890, 209469, 209462, 192820, 209416, 211457, 209243, 203268, 209253, 265871, 209560, 209270, 209520, 209514, 209360, 176845, 209241, 209335, 209484, 209220, 172099, 172082, 209466, 265380, 209427, 187618, 209305, 209175, 209352, 209396, 209235, 209434, 209439, 209263, 209214, 203423, 181929, 211458, 209515, 209525, 194998, 180855, 209485, 209378, 209423, 209415, 209558, 209389, 209358, 194992, 180822, 209370, 209513, 194994, 209192, 209193, 209381, 187622, 209562, 209554, 209546, 187624, 209306, 209460, 209239, 209325, 209517, 209186, 239482, 209559, 198568, 209332, 266076, 172148, 209492, 209421, 209414, 209333, 209437, 206621, 209524, 216887, 267753, 209190, 209307, 209357, 209482, 173211, 179977, 209286, 239421, 209459, 209501, 209183, 193399, 209470, 209452, 247896, 209483, 174123, 209309, 209265, 209258, 209247, 209282, 202387, 193241)) UNION ALL ( select distinct sm.id as record, 3927, mrp.id as ref, 'Manufacturing Orders' as ref_code, sm.product_id as product_id, mrp.create_date as invoice_date, sm.product_uom_qty as product_uom_qty, inv.id as inventory_vendor_id, mrp.branch_id as selling_branch, sm.warehouse_id as warehouse_id, pt.method as method, now() at time zone 'UTC', True from mrp_production mrp LEFT JOIN stock_move as sm ON sm.raw_material_production_id = mrp.id LEFT JOIN product_product as pp ON sm.product_id = pp.id LEFT JOIN product_template as pt ON pp.product_tmpl_id = pt.id LEFT JOIN psd_custom_inventory_vendor as inv ON inv.id = pt.inventory_vendor_id LEFT JOIN product_warehouse_inventory as pwi ON pwi.product_id = pp.id where mrp.state = 'done' and mrp.branch_id = 46 and sm.product_id is not null and pt.never_stock = False and pt.discontinued = False and pt.is_core = False and mrp.create_date >= '2018-09-06 00:00:00' and mrp.create_date <= '2024-09-06 00:00:00' and COALESCE(pt.active, False) = True and pt.inventory_vendor_id not in (2911, 2931, 2932, 2993, 3000, 3007, 3008, 3010, 3011, 3012, 3013, 3014, 3015, 3049, 3063, 3064, 3065, 3079, 3087, 3097, 3099, 3100, 3114, 3124, 3127, 3150, 3291) and pp.id not in (209565, 193055, 209857, 181750, 173638, 209436, 209380, 209174, 265955, 198576, 203275, 192883, 209495, 209238, 197891, 209506, 209570, 209464, 209246, 209257, 209503, 209537, 198495, 187620, 209231, 209181, 209233, 172081, 209430, 209538, 209226, 179402, 209563, 209195, 209250, 209179, 209479, 209194, 265694, 209323, 209315, 209327, 209207, 209497, 209298, 209284, 209441, 265700, 190567, 190550, 209234, 203802, 209507, 262098, 209480, 216069, 209280, 203203, 177857, 209172, 209252, 209255, 209424, 209393, 187581, 238922, 209493, 209361, 209216, 265954, 209384, 187614, 193459, 209302, 209229, 209367, 187623, 193593, 209212, 209487, 263941, 209571, 204352, 209200, 194995, 209447, 262083, 209184, 209196, 209472, 209473, 209069, 179986, 209433, 173567, 209566, 209556, 239470, 209528, 209317, 209573, 209502, 255571, 193768, 209496, 209474, 193113, 266060, 209328, 193836, 197248, 265696, 209342, 196025, 209320, 215067, 209505, 209511, 209372, 209391, 209347, 187616, 209266, 209221, 209273, 209442, 209403, 172445, 209230, 209516, 194996, 209338, 209359, 209366, 209198, 183549, 209572, 209340, 209236, 209303, 209568, 173418, 261330, 209343, 209262, 177070, 209345, 209209, 265701, 209189, 209268, 209202, 177161, 239523, 209521, 209561, 182564, 181735, 209344, 209261, 209225, 209242, 245580, 197258, 173212, 188062, 209173, 181886, 209494, 209245, 209451, 209329, 209382, 209446, 195880, 209555, 187628, 209334, 180879, 193114, 172548, 187626, 265477, 206177, 209438, 203288, 209545, 209210, 209197, 209310, 209362, 181724, 193763, 209185, 209191, 180751, 206629, 209491, 193739, 181742, 209244, 209390, 209354, 194999, 209509, 209311, 209324, 198580, 209418, 209488, 209519, 209518, 194990, 257872, 222484, 209471, 209203, 209339, 209526, 209219, 209199, 187627, 209201, 209379, 194223, 187619, 209392, 209267, 197227, 209254, 195175, 209330, 209318, 187859, 209569, 209178, 181744, 209413, 209182, 209256, 177178, 209281, 187615, 209251, 209299, 184051, 261332, 209206, 193195, 180730, 187810, 180915, 209264, 209356, 268988, 239359, 228221, 209188, 209567, 209398, 209279, 209272, 209276, 209269, 209176, 209227, 209374, 209321, 209277, 203231, 209278, 194997, 209316, 209260, 209211, 209326, 209425, 209308, 209314, 199231, 203327, 209412, 209510, 209365, 209313, 209322, 209346, 209319, 209187, 209440, 209512, 209180, 209228, 209177, 209527, 209312, 209304, 209232, 216040, 193109, 209529, 177186, 209331, 265956, 209457, 209271, 209468, 209422, 209475, 209259, 209456, 209435, 195890, 209469, 209462, 192820, 209416, 211457, 209243, 203268, 209253, 265871, 209560, 209270, 209520, 209514, 209360, 176845, 209241, 209335, 209484, 209220, 172099, 172082, 209466, 265380, 209427, 187618, 209305, 209175, 209352, 209396, 209235, 209434, 209439, 209263, 209214, 203423, 181929, 211458, 209515, 209525, 194998, 180855, 209485, 209378, 209423, 209415, 209558, 209389, 209358, 194992, 180822, 209370, 209513, 194994, 209192, 209193, 209381, 187622, 209562, 209554, 209546, 187624, 209306, 209460, 209239, 209325, 209517, 209186, 239482, 209559, 198568, 209332, 266076, 172148, 209492, 209421, 209414, 209333, 209437, 206621, 209524, 216887, 267753, 209190, 209307, 209357, 209482, 173211, 179977, 209286, 239421, 209459, 209501, 209183, 193399, 209470, 209452, 247896, 209483, 174123, 209309, 209265, 209258, 209247, 209282, 202387, 193241))) insert into item_list_line (item_demand_plan_id, product_id, invoice_date, product_uom_qty, inventory_vendor_id, selling_branch, warehouse_id, method, ref_id, ref, create_date, active) ( select 3927, data.product_id as product_id, data.invoice_date as invoice_date, data.product_uom_qty as product_uom_qty, data.inventory_vendor_id as inventory_vendor_id, data.selling_branch as selling_branch, data.warehouse_id as warehouse_id, brpm.method as method, data.ref as ref_id, data.ref_code as ref, now() at time zone 'UTC', True from data LEFT JOIN branch_product_method as brpm ON brpm.product_id = data.product_id and brpm.branch_id = 46);[ Date: 2024-09-07 00:43:50 ]
14 13s628ms COPY public.bus_bus (id, channel, message, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-09-07 09:02:08 ]
15 13s260ms SELECT "account_move".id FROM "account_move" WHERE (((("account_move"."move_type" in ('out_invoice', 'out_refund')) OR ("account_move"."non_inventory_entry" = true)) AND ("account_move"."move_type" in ('out_invoice', 'out_refund'))) AND ((((((((((unaccent ("account_move"."name"::text) ilike unaccent ('%F-INV-04001%')) OR (unaccent ("account_move"."invoice_origin"::text) ilike unaccent ('%F-INV-04001%'))) OR (unaccent ("account_move"."ref"::text) ilike unaccent ('%F-INV-04001%'))) OR (unaccent ("account_move"."payment_reference"::text) ilike unaccent ('%F-INV-04001%'))) OR FALSE) OR (((((unaccent ("account_move"."name"::text) ilike unaccent ('%F-INV-04019%')) OR (unaccent ("account_move"."invoice_origin"::text) ilike unaccent ('%F-INV-04019%'))) OR (unaccent ("account_move"."ref"::text) ilike unaccent ('%F-INV-04019%'))) OR (unaccent ("account_move"."payment_reference"::text) ilike unaccent ('%F-INV-04019%'))) OR FALSE)) OR (((((unaccent ("account_move"."name"::text) ilike unaccent ('%F-INV-04042%')) OR (unaccent ("account_move"."invoice_origin"::text) ilike unaccent ('%F-INV-04042%'))) OR (unaccent ("account_move"."ref"::text) ilike unaccent ('%F-INV-04042%'))) OR (unaccent ("account_move"."payment_reference"::text) ilike unaccent ('%F-INV-04042%'))) OR FALSE)) OR (((((unaccent ("account_move"."name"::text) ilike unaccent ('%F-INV-04076%')) OR (unaccent ("account_move"."invoice_origin"::text) ilike unaccent ('%F-INV-04076%'))) OR (unaccent ("account_move"."ref"::text) ilike unaccent ('%F-INV-04076%'))) OR (unaccent ("account_move"."payment_reference"::text) ilike unaccent ('%F-INV-04076%'))) OR FALSE)) OR (((((unaccent ("account_move"."name"::text) ilike unaccent ('%F-INV-04094%')) OR (unaccent ("account_move"."invoice_origin"::text) ilike unaccent ('%F-INV-04094%'))) OR (unaccent ("account_move"."ref"::text) ilike unaccent ('%F-INV-04094%'))) OR (unaccent ("account_move"."payment_reference"::text) ilike unaccent ('%F-INV-04094%'))) OR FALSE)) OR (((((unaccent ("account_move"."name"::text) ilike unaccent ('%F-INV-04121%')) OR (unaccent ("account_move"."invoice_origin"::text) ilike unaccent ('%F-INV-04121%'))) OR (unaccent ("account_move"."ref"::text) ilike unaccent ('%F-INV-04121%'))) OR (unaccent ("account_move"."payment_reference"::text) ilike unaccent ('%F-INV-04121%'))) OR FALSE))) AND ("account_move"."company_id" IS NULL OR ("account_move"."company_id" in (1))) ORDER BY "account_move"."invoice_date_due" LIMIT 80;[ Date: 2024-09-07 11:53:48 ]
16 12s923ms 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-07 09:16:08 ]
17 12s568ms 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-07 09:17:24 ]
18 12s210ms update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);[ Date: 2024-09-07 11:30:20 ]
19 12s207ms update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);[ Date: 2024-09-07 11:30:20 ]
20 11s780ms update item_demand_plan set is_start_forecast = False where id in ( with data_demand as ( select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where method in (7, 8) and idp.fetch_data_done = True and idp.active = True group by ill.item_demand_plan_id INTERSECT select ill.item_demand_plan_id as item_demand_plan_id, count(ill.id) as total_count from item_list_line as ill where ill.active = True group by ill.item_demand_plan_id ) select data_demand.item_demand_plan_id from data_demand LEFT JOIN item_demand_plan as idp2 ON data_demand.item_demand_plan_id = idp2.id where idp2.is_start_forecast = True);[ Date: 2024-09-07 09:47:13 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 11h7m12s 39,767 888ms 4s269ms 1s6ms select date_part(?, invoice_date) as year, date_part(?, invoice_date) as month, date_part(?, invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = ? and item_demand_plan_id = ? group by product_id, date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date) order by date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date);Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Sep 07 01 651 10m31s 969ms 02 571 9m11s 965ms 03 351 5m36s 957ms 04 1,584 25m25s 963ms 05 2,290 38m53s 1s19ms 06 2,108 34m5s 970ms 07 2,108 34m20s 977ms 08 2,134 35m46s 1s6ms 09 2,711 53m31s 1s184ms 10 2,122 34m7s 965ms 11 3,020 53m52s 1s70ms 12 3,983 1h14m 1s114ms 13 2,119 34m1s 963ms 14 2,103 33m52s 966ms 15 2,107 34m9s 972ms 16 2,110 33m46s 960ms 17 2,119 33m32s 949ms 18 2,129 33m38s 948ms 19 2,117 33m39s 953ms 20 1,330 21m5s 951ms -
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 187538 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:02:25 Duration: 4s269ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 190829 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:03:37 Duration: 4s70ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 206038 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:09:46 Duration: 3s517ms
2 2h39m33s 58,215 121ms 1s172ms 164ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Sep 07 00 2,554 6m7s 144ms 01 2,447 6m7s 150ms 02 2,340 5m52s 150ms 03 2,512 5m47s 138ms 04 2,322 6m9s 158ms 05 2,258 6m38s 176ms 06 2,374 6m38s 167ms 07 2,395 6m34s 164ms 08 2,308 6m49s 177ms 09 2,397 8m38s 216ms 10 2,315 6m33s 169ms 11 2,303 7m20s 191ms 12 2,438 9m11s 226ms 13 2,657 7m22s 166ms 14 2,474 6m59s 169ms 15 2,530 7m16s 172ms 16 2,551 6m56s 163ms 17 2,480 6m27s 156ms 18 2,522 6m30s 154ms 19 2,383 6m29s 163ms 20 2,422 6m25s 159ms 21 2,594 5m56s 137ms 22 2,566 5m50s 136ms 23 2,073 4m45s 137ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 09:46:40') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 09:47:32 Duration: 1s172ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 13:13:26') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 13:14:17 Duration: 1s162ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 13:13:26') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_992"', '["pointspring_master","calendar.alarm",19530]', '["pointspring_master","mail.channel",35]', '["pointspring_master","mail.channel",44]', '["pointspring_master","mail.channel",425]', '["pointspring_master","mail.channel",436]', '["pointspring_master","mail.channel",451]', '["pointspring_master","mail.channel",500]', '["pointspring_master","mail.channel",502]', '["pointspring_master","mail.channel",638]', '["pointspring_master","res.partner",19530]', '["pointspring_master","ir.needaction",19530]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 13:14:17 Duration: 1s147ms
3 1h49m16s 37,148 144ms 773ms 176ms with data as ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and item_demand_plan_id = ? and date::date = date ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) select id from data where rnum > ?;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Sep 07 04 1,583 4m15s 161ms 05 2,071 6m2s 174ms 06 2,107 5m54s 168ms 07 2,108 5m57s 169ms 08 2,093 6m6s 174ms 09 1,927 6m41s 208ms 10 2,123 6m 169ms 11 3,019 9m42s 192ms 12 3,983 13m22s 201ms 13 2,117 5m59s 170ms 14 2,104 5m58s 170ms 15 2,107 6m 171ms 16 2,109 5m56s 169ms 17 2,119 5m52s 166ms 18 2,129 5m52s 165ms 19 2,118 5m53s 167ms 20 1,331 3m40s 165ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 186039 and item_demand_plan_id = 3925 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 12:48:15 Duration: 773ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 184438 and item_demand_plan_id = 3921 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 09:21:45 Duration: 762ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 179263 and item_demand_plan_id = 3925 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 12:13:18 Duration: 748ms
4 1h40m14s 1,826 2s695ms 4s981ms 3s293ms update item_list_line set method = ?, min_product_len_1 = ?, min_product_len_2 = ?, min_baseline_size = ?, seasonal_period = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Sep 07 01 649 37m28s 3s464ms 02 571 30m37s 3s217ms 03 352 18m9s 3s94ms 08 20 1m3s 3s181ms 09 234 12m55s 3s314ms -
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 269493 and item_demand_plan_id = 3927;
Date: 2024-09-07 01:00:14 Duration: 4s981ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 171585 and item_demand_plan_id = 3919;
Date: 2024-09-07 01:00:13 Duration: 4s980ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 220627 and item_demand_plan_id = 3919;
Date: 2024-09-07 01:11:14 Duration: 4s242ms
5 1h2m30s 10,164 313ms 1s111ms 369ms 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 07 00 186 1m1s 333ms 01 171 56s243ms 328ms 02 180 59s212ms 328ms 03 87 28s186ms 323ms 04 99 33s279ms 336ms 05 477 2m47s 351ms 06 1,241 7m10s 347ms 07 1,252 7m20s 351ms 08 1,260 7m45s 369ms 09 1,119 8m9s 437ms 10 1,125 6m35s 351ms 11 1,182 7m39s 388ms 12 426 3m5s 435ms 13 516 3m3s 354ms 14 375 2m10s 347ms 15 240 1m26s 361ms 16 24 8s639ms 359ms 17 21 7s422ms 353ms 18 33 11s246ms 340ms 19 30 10s345ms 344ms 20 30 9s961ms 332ms 21 42 13s722ms 326ms 22 30 9s823ms 327ms 23 18 5s882ms 326ms -
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-07 12:50:09 Duration: 1s111ms
-
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-07 09:03:13 Duration: 989ms
-
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-07 09:13:11 Duration: 936ms
6 56m7s 969 3s348ms 4s775ms 3s474ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true, method = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Sep 07 00 650 37m32s 3s464ms 01 319 18m35s 3s495ms -
update item_list_line set product_id = 267540, supercede_product_id = 242324, superceded = True, method = Null where product_id = 242324 and item_demand_plan_id = 3927;
Date: 2024-09-07 01:00:14 Duration: 4s775ms
-
update item_list_line set product_id = 173208, supercede_product_id = 174025, superceded = True, method = Null where product_id = 174025 and item_demand_plan_id = 3928;
Date: 2024-09-07 01:11:14 Duration: 4s247ms
-
update item_list_line set product_id = 254171, supercede_product_id = 172368, superceded = True, method = Null where product_id = 172368 and item_demand_plan_id = 3928;
Date: 2024-09-07 01:09:36 Duration: 4s200ms
7 49m23s 8,043 314ms 1s75ms 368ms 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 07 00 144 47s518ms 329ms 01 180 59s994ms 333ms 02 99 32s493ms 328ms 03 66 21s708ms 328ms 04 54 17s692ms 327ms 05 276 1m37s 351ms 06 876 5m6s 349ms 07 843 4m55s 350ms 08 1,095 6m35s 361ms 09 1,026 7m16s 425ms 10 1,134 6m39s 352ms 11 1,143 7m20s 384ms 12 288 2m2s 424ms 13 339 1m58s 350ms 14 264 1m33s 352ms 15 201 1m12s 361ms 16 3 1s786ms 595ms 17 3 966ms 322ms 18 3 1s99ms 366ms 19 6 1s976ms 329ms -
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-07 12:13:49 Duration: 1s75ms
-
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-07 09:03:44 Duration: 1s
-
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-07 08:53:25 Duration: 945ms
8 43m30s 9,465 234ms 911ms 275ms 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 #8
Day Hour Count Duration Avg duration Sep 07 00 174 42s684ms 245ms 01 210 51s527ms 245ms 02 180 44s225ms 245ms 03 81 19s725ms 243ms 04 63 15s969ms 253ms 05 402 1m46s 265ms 06 1,296 5m37s 260ms 07 1,290 5m40s 264ms 08 1,137 5m7s 270ms 09 1,124 6m6s 326ms 10 1,114 4m50s 260ms 11 1,032 5m2s 292ms 12 411 2m11s 318ms 13 375 1m39s 264ms 14 372 1m38s 265ms 15 183 48s786ms 266ms 16 21 5s970ms 284ms -
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-07 09:47:31 Duration: 911ms
-
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-07 09:11:51 Duration: 892ms
-
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-07 09:05:28 Duration: 756ms
9 37m13s 16,223 120ms 491ms 137ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Sep 07 04 351 46s774ms 133ms 05 954 2m10s 136ms 06 754 1m41s 134ms 07 771 1m43s 134ms 08 820 1m53s 137ms 09 1,309 3m16s 150ms 10 742 1m38s 132ms 11 1,860 4m28s 144ms 12 2,958 7m5s 143ms 13 786 1m44s 132ms 14 744 1m38s 132ms 15 828 1m49s 132ms 16 785 1m43s 132ms 17 744 1m36s 129ms 18 663 1m26s 130ms 19 718 1m33s 130ms 20 436 56s838ms 130ms -
select id, class_code from product_warehouse_inventory where product_id = 218008 and warehouse_id = 35;
Date: 2024-09-07 06:26:34 Duration: 491ms
-
select id, class_code from product_warehouse_inventory where product_id = 205585 and warehouse_id = 42;
Date: 2024-09-07 16:51:07 Duration: 488ms
-
select id, class_code from product_warehouse_inventory where product_id = 184516 and warehouse_id = 41;
Date: 2024-09-07 12:24:16 Duration: 479ms
10 31m8s 6,803 232ms 823ms 274ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" desc, "product_template"."id" desc;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Sep 07 00 159 38s628ms 242ms 01 111 27s65ms 243ms 02 159 38s597ms 242ms 03 75 18s164ms 242ms 04 78 19s585ms 251ms 05 273 1m13s 269ms 06 951 4m8s 261ms 07 942 4m8s 263ms 08 750 3m21s 268ms 09 861 4m42s 328ms 10 752 3m16s 260ms 11 675 3m15s 289ms 12 288 1m30s 314ms 13 279 1m13s 263ms 14 273 1m9s 255ms 15 165 43s975ms 266ms 16 3 764ms 254ms 19 3 979ms 326ms 20 3 734ms 244ms 22 3 718ms 239ms -
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-07 08:53:31 Duration: 823ms
-
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-07 12:13:17 Duration: 804ms
-
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-07 09:21:53 Duration: 787ms
11 18m 6,449 120ms 429ms 167ms select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."website_sequence" asc, "product_template"."id" desc;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Sep 07 00 20 2s566ms 128ms 01 34 4s783ms 140ms 02 26 3s494ms 134ms 03 25 3s446ms 137ms 04 54 8s97ms 149ms 05 178 29s94ms 163ms 06 348 53s55ms 152ms 07 530 1m21s 154ms 08 1,004 2m43s 163ms 09 1,634 5m2s 185ms 10 782 2m2s 156ms 11 612 1m47s 176ms 12 350 1m5s 186ms 13 217 33s844ms 155ms 14 171 27s264ms 159ms 15 139 22s113ms 159ms 16 56 8s756ms 156ms 17 46 6s582ms 143ms 18 99 15s33ms 151ms 19 55 8s542ms 155ms 20 48 7s646ms 159ms 21 6 758ms 126ms 22 10 1s332ms 133ms 23 5 672ms 134ms -
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-07 09:02:16 Duration: 429ms
-
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-07 09:00:30 Duration: 428ms
-
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-07 13:14:17 Duration: 417ms
12 15m56s 548 1s192ms 9s365ms 1s745ms select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Sep 07 09 548 15m56s 1s745ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 172607)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:00:18 Duration: 9s365ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 172823)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:01:11 Duration: 5s741ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 197891)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:18:28 Duration: 5s89ms
13 15m5s 5,715 139ms 505ms 158ms 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 #13
Day Hour Count Duration Avg duration Sep 07 00 239 35s23ms 146ms 01 240 35s674ms 148ms 02 240 35s147ms 146ms 03 240 34s952ms 145ms 04 240 35s939ms 149ms 05 240 40s305ms 167ms 06 240 37s850ms 157ms 07 240 38s22ms 158ms 08 240 39s299ms 163ms 09 240 47s95ms 196ms 10 240 38s384ms 159ms 11 239 41s610ms 174ms 12 240 46s390ms 193ms 13 239 37s978ms 158ms 14 239 37s771ms 158ms 15 240 38s547ms 160ms 16 239 38s395ms 160ms 17 240 38s25ms 158ms 18 240 36s965ms 154ms 19 240 38s221ms 159ms 20 240 36s611ms 152ms 21 240 34s394ms 143ms 22 240 34s346ms 143ms 23 200 28s623ms 143ms -
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_auth_members', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_views', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_type', 'pg_catalog.pg_constraint', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_proc', 'pg_catalog.pg_conversion', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_amproc', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_roles', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_policies', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_settings', 'pg_catalog.pg_index', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_group', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_class', 'pg_catalog.pg_depend', 'pg_catalog.pg_collation', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_extension', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_subscription', 'pg_catalog.pg_description', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_sequence', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_operator', 'pg_catalog.pg_enum', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_attribute', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_trigger', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_publication', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_xacts', 'information_schema.column_domain_usage', 'information_schema.sequences', 'information_schema.collation_character_set_applicability', 'information_schema.column_column_usage', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.column_options', 'information_schema.foreign_tables', 'information_schema.administrable_role_authorizations', 'information_schema.schemata', 'information_schema.referential_constraints', 'information_schema.foreign_server_options', 'information_schema.domain_constraints', 'information_schema.check_constraints', 'information_schema.parameters', 'information_schema.applicable_roles', 'information_schema.routine_routine_usage', 'information_schema.routine_sequence_usage', 'information_schema.key_column_usage', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.routine_table_usage', 'information_schema.column_udt_usage', 'information_schema.data_type_privileges', 'information_schema.collations', 'information_schema.sql_implementation_info', 'information_schema.foreign_data_wrappers', 'information_schema.domain_udt_usage', 'information_schema.constraint_table_usage', 'information_schema.routine_privileges', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.triggered_update_columns', 'information_schema.role_udt_grants', 'information_schema.column_privileges', 'information_schema.role_column_grants', 'information_schema.columns', 'information_schema.user_mappings', 'information_schema.role_usage_grants', 'information_schema.routines', 'information_schema.character_sets', 'information_schema.role_routine_grants', 'information_schema.table_constraints', 'information_schema.user_mapping_options', 'information_schema.check_constraint_routine_usage', 'information_schema.sql_sizing', 'information_schema.view_table_usage', 'information_schema.usage_privileges', 'information_schema.enabled_roles', 'information_schema.role_table_grants', 'information_schema.tables', 'information_schema.element_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.constraint_column_usage', 'information_schema.view_column_usage', 'information_schema.information_schema_catalog_name', 'information_schema.view_routine_usage', 'information_schema.foreign_servers', 'information_schema.user_defined_types', 'information_schema.triggers', 'information_schema.foreign_table_options', 'information_schema.attributes', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-09-07 12:51:32 Duration: 505ms
-
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 ('information_schema.foreign_servers', 'information_schema.key_column_usage', 'information_schema.routine_routine_usage', 'information_schema.views', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.constraint_column_usage', 'information_schema.role_udt_grants', 'information_schema.user_mapping_options', 'information_schema.column_column_usage', 'information_schema.column_privileges', 'information_schema.enabled_roles', 'information_schema.view_table_usage', 'information_schema.user_mappings', 'information_schema.udt_privileges', 'information_schema.foreign_data_wrappers', 'information_schema.role_usage_grants', 'information_schema.applicable_roles', 'information_schema.foreign_table_options', 'information_schema.routine_column_usage', 'information_schema.sql_implementation_info', 'information_schema.view_routine_usage', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.routine_sequence_usage', 'information_schema.element_types', 'information_schema.schemata', 'information_schema.routines', 'information_schema.constraint_table_usage', 'information_schema.sql_features', 'information_schema.sql_sizing', 'information_schema.collations', 'information_schema.check_constraints', 'information_schema.domain_udt_usage', 'information_schema.domains', 'information_schema.triggered_update_columns', 'information_schema.user_defined_types', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_privileges', 'information_schema.role_table_grants', 'information_schema.column_options', 'information_schema.role_column_grants', 'information_schema.data_type_privileges', 'information_schema.view_column_usage', 'information_schema.table_constraints', 'information_schema.referential_constraints', 'information_schema.table_privileges', 'information_schema.triggers', 'information_schema.role_routine_grants', 'information_schema.foreign_tables', 'information_schema.attributes', 'information_schema.columns', 'information_schema.column_udt_usage', 'information_schema.foreign_server_options', 'information_schema.parameters', 'information_schema.domain_constraints', 'information_schema.sequences', 'information_schema.routine_table_usage', 'information_schema.tables', 'information_schema.usage_privileges', 'information_schema.collation_character_set_applicability', 'public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_depend', 'pg_catalog.pg_collation', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_group', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_trigger', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_settings', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_policy', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_proc', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_roles', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_am', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_matviews', 'pg_catalog.pg_sequences', 'pg_catalog.pg_attribute', 'pg_catalog.pg_database', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_extension', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_namespace', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_language', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_rules', 'pg_catalog.pg_stats', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_transform', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_opclass', 'pg_catalog.pg_conversion', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_cast', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription', 'pg_catalog.pg_operator', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_available_extension_versions');
Date: 2024-09-07 09:14:16 Duration: 452ms
-
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_seclabels', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_settings', 'pg_catalog.pg_constraint', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_roles', 'pg_catalog.pg_index', 'pg_catalog.pg_amop', 'pg_catalog.pg_description', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_inherits', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_tables', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_matviews', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_enum', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_publication', 'pg_catalog.pg_proc', 'pg_catalog.pg_extension', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_opclass', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_group', 'pg_catalog.pg_depend', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_type', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_views', 'pg_catalog.pg_stats', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_database', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_amproc', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_namespace', 'pg_catalog.pg_range', 'pg_catalog.pg_rules', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_class', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_trigger', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_operator', 'pg_catalog.pg_indexes', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_locks', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_language', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_foreign_data_wrapper', 'information_schema.user_mappings', 'information_schema.foreign_servers', 'information_schema.information_schema_catalog_name', 'information_schema.constraint_table_usage', 'information_schema.foreign_table_options', 'information_schema.constraint_column_usage', 'information_schema.referential_constraints', 'information_schema.role_routine_grants', 'information_schema.view_column_usage', 'information_schema.attributes', 'information_schema.column_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.check_constraint_routine_usage', 'information_schema.collations', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.enabled_roles', 'information_schema.routine_routine_usage', 'information_schema.sequences', 'information_schema.data_type_privileges', 'information_schema.column_udt_usage', 'information_schema.sql_implementation_info', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.parameters', 'information_schema.view_table_usage', 'information_schema.triggers', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.tables', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.user_defined_types', 'information_schema.administrable_role_authorizations', 'information_schema.schemata', 'information_schema.view_routine_usage', 'information_schema.foreign_tables', 'information_schema.domains', 'information_schema.routine_sequence_usage', 'information_schema.element_types', 'information_schema.foreign_server_options', 'information_schema.user_mapping_options', 'information_schema.routines', 'information_schema.domain_constraints', 'information_schema.foreign_data_wrapper_options', 'information_schema.table_constraints', 'information_schema.role_usage_grants', 'information_schema.triggered_update_columns', 'information_schema.column_options', 'information_schema.columns', 'information_schema.routine_column_usage', 'information_schema.domain_udt_usage', 'information_schema.sql_sizing', 'information_schema.role_udt_grants', 'information_schema.applicable_roles', 'information_schema.check_constraints', 'information_schema.key_column_usage', 'information_schema.routine_table_usage', 'information_schema.role_column_grants', 'information_schema.routine_privileges', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-09-07 09:49:01 Duration: 427ms
14 6m16s 353 829ms 2s691ms 1s66ms select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Sep 07 05 237 4m1s 1s18ms 08 116 2m15s 1s165ms -
select id from item_list_line where product_id = 172982 and item_demand_plan_id = 3929;
Date: 2024-09-07 08:52:08 Duration: 2s691ms
-
select id from item_list_line where product_id = 225961 and item_demand_plan_id = 3929;
Date: 2024-09-07 08:53:57 Duration: 2s337ms
-
select id from item_list_line where product_id = 171866 and item_demand_plan_id = 3930;
Date: 2024-09-07 05:15:24 Duration: 2s274ms
15 5m40s 239 1s69ms 3s595ms 1s425ms 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 #15
Day Hour Count Duration Avg duration Sep 07 05 17 23s505ms 1s382ms 08 27 46s305ms 1s715ms 09 8 13s581ms 1s697ms 12 26 46s380ms 1s783ms 13 41 53s182ms 1s297ms 14 38 50s137ms 1s319ms 15 41 55s193ms 1s346ms 16 41 52s499ms 1s280ms -
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-07 08:52:40 Duration: 3s595ms
-
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 = 3928 and ill.method not in (8, 7);
Date: 2024-09-07 12:50:45 Duration: 2s549ms
-
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-07 15:13:34 Duration: 2s200ms
16 5m34s 1 5m34s 5m34s 5m34s 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 #16
Day Hour Count Duration Avg duration Sep 07 09 1 5m34s 5m34s -
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-07 09:13:24 Duration: 5m34s
17 5m7s 239 965ms 3s734ms 1s284ms select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Sep 07 05 17 22s940ms 1s349ms 08 27 38s444ms 1s423ms 09 8 11s356ms 1s419ms 12 26 38s569ms 1s483ms 13 41 48s896ms 1s192ms 14 38 45s114ms 1s187ms 15 41 52s709ms 1s285ms 16 41 49s22ms 1s195ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3926 and active = True;
Date: 2024-09-07 15:25:16 Duration: 3s734ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3927 and active = True;
Date: 2024-09-07 05:15:44 Duration: 2s480ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3922 and active = True;
Date: 2024-09-07 08:53:10 Duration: 2s424ms
18 5m1s 239 961ms 3s682ms 1s261ms select ill.item_demand_plan_id from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where ill.method is null and idp.active = true and ill.item_demand_plan_id = ? group by ill.item_demand_plan_id having count(ill.id) > ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Sep 07 05 17 20s491ms 1s205ms 08 27 39s159ms 1s450ms 09 8 12s204ms 1s525ms 12 26 40s77ms 1s541ms 13 41 48s126ms 1s173ms 14 38 44s410ms 1s168ms 15 41 47s109ms 1s149ms 16 41 50s26ms 1s220ms -
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3928 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 12:47:40 Duration: 3s682ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3921 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 08:53:23 Duration: 2s585ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3928 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 08:58:24 Duration: 2s436ms
19 4m22s 239 827ms 3s32ms 1s97ms 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 07 05 17 19s543ms 1s149ms 08 27 32s403ms 1s200ms 09 8 13s41ms 1s630ms 12 26 35s556ms 1s367ms 13 41 41s567ms 1s13ms 14 38 38s573ms 1s15ms 15 41 40s894ms 997ms 16 41 40s840ms 996ms -
select count(id) from item_list_line where item_demand_plan_id = 3926;
Date: 2024-09-07 05:14:04 Duration: 3s32ms
-
select count(id) from item_list_line where item_demand_plan_id = 3928;
Date: 2024-09-07 09:54:36 Duration: 2s910ms
-
select count(id) from item_list_line where item_demand_plan_id = 3928;
Date: 2024-09-07 12:50:41 Duration: 2s456ms
20 2m37s 1 2m37s 2m37s 2m37s 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 #20
Day Hour Count Duration Avg duration Sep 07 09 1 2m37s 2m37s -
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-07 09:05:16 Duration: 2m37s
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 58,215 2h39m33s 121ms 1s172ms 164ms 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 07 00 2,554 6m7s 144ms 01 2,447 6m7s 150ms 02 2,340 5m52s 150ms 03 2,512 5m47s 138ms 04 2,322 6m9s 158ms 05 2,258 6m38s 176ms 06 2,374 6m38s 167ms 07 2,395 6m34s 164ms 08 2,308 6m49s 177ms 09 2,397 8m38s 216ms 10 2,315 6m33s 169ms 11 2,303 7m20s 191ms 12 2,438 9m11s 226ms 13 2,657 7m22s 166ms 14 2,474 6m59s 169ms 15 2,530 7m16s 172ms 16 2,551 6m56s 163ms 17 2,480 6m27s 156ms 18 2,522 6m30s 154ms 19 2,383 6m29s 163ms 20 2,422 6m25s 159ms 21 2,594 5m56s 137ms 22 2,566 5m50s 136ms 23 2,073 4m45s 137ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 09:46:40') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 09:47:32 Duration: 1s172ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 13:13:26') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 13:14:17 Duration: 1s162ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 13:13:26') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_992"', '["pointspring_master","calendar.alarm",19530]', '["pointspring_master","mail.channel",35]', '["pointspring_master","mail.channel",44]', '["pointspring_master","mail.channel",425]', '["pointspring_master","mail.channel",436]', '["pointspring_master","mail.channel",451]', '["pointspring_master","mail.channel",500]', '["pointspring_master","mail.channel",502]', '["pointspring_master","mail.channel",638]', '["pointspring_master","res.partner",19530]', '["pointspring_master","ir.needaction",19530]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 13:14:17 Duration: 1s147ms
2 39,767 11h7m12s 888ms 4s269ms 1s6ms select date_part(?, invoice_date) as year, date_part(?, invoice_date) as month, date_part(?, invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = ? and item_demand_plan_id = ? group by product_id, date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date) order by date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date);Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Sep 07 01 651 10m31s 969ms 02 571 9m11s 965ms 03 351 5m36s 957ms 04 1,584 25m25s 963ms 05 2,290 38m53s 1s19ms 06 2,108 34m5s 970ms 07 2,108 34m20s 977ms 08 2,134 35m46s 1s6ms 09 2,711 53m31s 1s184ms 10 2,122 34m7s 965ms 11 3,020 53m52s 1s70ms 12 3,983 1h14m 1s114ms 13 2,119 34m1s 963ms 14 2,103 33m52s 966ms 15 2,107 34m9s 972ms 16 2,110 33m46s 960ms 17 2,119 33m32s 949ms 18 2,129 33m38s 948ms 19 2,117 33m39s 953ms 20 1,330 21m5s 951ms -
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 187538 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:02:25 Duration: 4s269ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 190829 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:03:37 Duration: 4s70ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 206038 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:09:46 Duration: 3s517ms
3 37,148 1h49m16s 144ms 773ms 176ms with data as ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and item_demand_plan_id = ? and date::date = date ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) select id from data where rnum > ?;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Sep 07 04 1,583 4m15s 161ms 05 2,071 6m2s 174ms 06 2,107 5m54s 168ms 07 2,108 5m57s 169ms 08 2,093 6m6s 174ms 09 1,927 6m41s 208ms 10 2,123 6m 169ms 11 3,019 9m42s 192ms 12 3,983 13m22s 201ms 13 2,117 5m59s 170ms 14 2,104 5m58s 170ms 15 2,107 6m 171ms 16 2,109 5m56s 169ms 17 2,119 5m52s 166ms 18 2,129 5m52s 165ms 19 2,118 5m53s 167ms 20 1,331 3m40s 165ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 186039 and item_demand_plan_id = 3925 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 12:48:15 Duration: 773ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 184438 and item_demand_plan_id = 3921 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 09:21:45 Duration: 762ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 179263 and item_demand_plan_id = 3925 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 12:13:18 Duration: 748ms
4 16,223 37m13s 120ms 491ms 137ms select id, class_code from product_warehouse_inventory where product_id = ? and warehouse_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Sep 07 04 351 46s774ms 133ms 05 954 2m10s 136ms 06 754 1m41s 134ms 07 771 1m43s 134ms 08 820 1m53s 137ms 09 1,309 3m16s 150ms 10 742 1m38s 132ms 11 1,860 4m28s 144ms 12 2,958 7m5s 143ms 13 786 1m44s 132ms 14 744 1m38s 132ms 15 828 1m49s 132ms 16 785 1m43s 132ms 17 744 1m36s 129ms 18 663 1m26s 130ms 19 718 1m33s 130ms 20 436 56s838ms 130ms -
select id, class_code from product_warehouse_inventory where product_id = 218008 and warehouse_id = 35;
Date: 2024-09-07 06:26:34 Duration: 491ms
-
select id, class_code from product_warehouse_inventory where product_id = 205585 and warehouse_id = 42;
Date: 2024-09-07 16:51:07 Duration: 488ms
-
select id, class_code from product_warehouse_inventory where product_id = 184516 and warehouse_id = 41;
Date: 2024-09-07 12:24:16 Duration: 479ms
5 10,164 1h2m30s 313ms 1s111ms 369ms 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 07 00 186 1m1s 333ms 01 171 56s243ms 328ms 02 180 59s212ms 328ms 03 87 28s186ms 323ms 04 99 33s279ms 336ms 05 477 2m47s 351ms 06 1,241 7m10s 347ms 07 1,252 7m20s 351ms 08 1,260 7m45s 369ms 09 1,119 8m9s 437ms 10 1,125 6m35s 351ms 11 1,182 7m39s 388ms 12 426 3m5s 435ms 13 516 3m3s 354ms 14 375 2m10s 347ms 15 240 1m26s 361ms 16 24 8s639ms 359ms 17 21 7s422ms 353ms 18 33 11s246ms 340ms 19 30 10s345ms 344ms 20 30 9s961ms 332ms 21 42 13s722ms 326ms 22 30 9s823ms 327ms 23 18 5s882ms 326ms -
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-07 12:50:09 Duration: 1s111ms
-
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-07 09:03:13 Duration: 989ms
-
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-07 09:13:11 Duration: 936ms
6 9,465 43m30s 234ms 911ms 275ms 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 #6
Day Hour Count Duration Avg duration Sep 07 00 174 42s684ms 245ms 01 210 51s527ms 245ms 02 180 44s225ms 245ms 03 81 19s725ms 243ms 04 63 15s969ms 253ms 05 402 1m46s 265ms 06 1,296 5m37s 260ms 07 1,290 5m40s 264ms 08 1,137 5m7s 270ms 09 1,124 6m6s 326ms 10 1,114 4m50s 260ms 11 1,032 5m2s 292ms 12 411 2m11s 318ms 13 375 1m39s 264ms 14 372 1m38s 265ms 15 183 48s786ms 266ms 16 21 5s970ms 284ms -
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-07 09:47:31 Duration: 911ms
-
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-07 09:11:51 Duration: 892ms
-
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-07 09:05:28 Duration: 756ms
7 8,043 49m23s 314ms 1s75ms 368ms 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 07 00 144 47s518ms 329ms 01 180 59s994ms 333ms 02 99 32s493ms 328ms 03 66 21s708ms 328ms 04 54 17s692ms 327ms 05 276 1m37s 351ms 06 876 5m6s 349ms 07 843 4m55s 350ms 08 1,095 6m35s 361ms 09 1,026 7m16s 425ms 10 1,134 6m39s 352ms 11 1,143 7m20s 384ms 12 288 2m2s 424ms 13 339 1m58s 350ms 14 264 1m33s 352ms 15 201 1m12s 361ms 16 3 1s786ms 595ms 17 3 966ms 322ms 18 3 1s99ms 366ms 19 6 1s976ms 329ms -
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-07 12:13:49 Duration: 1s75ms
-
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-07 09:03:44 Duration: 1s
-
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-07 08:53:25 Duration: 945ms
8 6,803 31m8s 232ms 823ms 274ms 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 07 00 159 38s628ms 242ms 01 111 27s65ms 243ms 02 159 38s597ms 242ms 03 75 18s164ms 242ms 04 78 19s585ms 251ms 05 273 1m13s 269ms 06 951 4m8s 261ms 07 942 4m8s 263ms 08 750 3m21s 268ms 09 861 4m42s 328ms 10 752 3m16s 260ms 11 675 3m15s 289ms 12 288 1m30s 314ms 13 279 1m13s 263ms 14 273 1m9s 255ms 15 165 43s975ms 266ms 16 3 764ms 254ms 19 3 979ms 326ms 20 3 734ms 244ms 22 3 718ms 239ms -
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-07 08:53:31 Duration: 823ms
-
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-07 12:13:17 Duration: 804ms
-
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-07 09:21:53 Duration: 787ms
9 6,449 18m 120ms 429ms 167ms 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 #9
Day Hour Count Duration Avg duration Sep 07 00 20 2s566ms 128ms 01 34 4s783ms 140ms 02 26 3s494ms 134ms 03 25 3s446ms 137ms 04 54 8s97ms 149ms 05 178 29s94ms 163ms 06 348 53s55ms 152ms 07 530 1m21s 154ms 08 1,004 2m43s 163ms 09 1,634 5m2s 185ms 10 782 2m2s 156ms 11 612 1m47s 176ms 12 350 1m5s 186ms 13 217 33s844ms 155ms 14 171 27s264ms 159ms 15 139 22s113ms 159ms 16 56 8s756ms 156ms 17 46 6s582ms 143ms 18 99 15s33ms 151ms 19 55 8s542ms 155ms 20 48 7s646ms 159ms 21 6 758ms 126ms 22 10 1s332ms 133ms 23 5 672ms 134ms -
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-07 09:02:16 Duration: 429ms
-
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-07 09:00:30 Duration: 428ms
-
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-07 13:14:17 Duration: 417ms
10 5,715 15m5s 139ms 505ms 158ms 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 #10
Day Hour Count Duration Avg duration Sep 07 00 239 35s23ms 146ms 01 240 35s674ms 148ms 02 240 35s147ms 146ms 03 240 34s952ms 145ms 04 240 35s939ms 149ms 05 240 40s305ms 167ms 06 240 37s850ms 157ms 07 240 38s22ms 158ms 08 240 39s299ms 163ms 09 240 47s95ms 196ms 10 240 38s384ms 159ms 11 239 41s610ms 174ms 12 240 46s390ms 193ms 13 239 37s978ms 158ms 14 239 37s771ms 158ms 15 240 38s547ms 160ms 16 239 38s395ms 160ms 17 240 38s25ms 158ms 18 240 36s965ms 154ms 19 240 38s221ms 159ms 20 240 36s611ms 152ms 21 240 34s394ms 143ms 22 240 34s346ms 143ms 23 200 28s623ms 143ms -
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_auth_members', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_views', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_type', 'pg_catalog.pg_constraint', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_proc', 'pg_catalog.pg_conversion', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_amproc', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_roles', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_policies', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_settings', 'pg_catalog.pg_index', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_group', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_class', 'pg_catalog.pg_depend', 'pg_catalog.pg_collation', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_extension', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_subscription', 'pg_catalog.pg_description', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_sequence', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_operator', 'pg_catalog.pg_enum', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_attribute', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_trigger', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_publication', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_xacts', 'information_schema.column_domain_usage', 'information_schema.sequences', 'information_schema.collation_character_set_applicability', 'information_schema.column_column_usage', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.column_options', 'information_schema.foreign_tables', 'information_schema.administrable_role_authorizations', 'information_schema.schemata', 'information_schema.referential_constraints', 'information_schema.foreign_server_options', 'information_schema.domain_constraints', 'information_schema.check_constraints', 'information_schema.parameters', 'information_schema.applicable_roles', 'information_schema.routine_routine_usage', 'information_schema.routine_sequence_usage', 'information_schema.key_column_usage', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.routine_table_usage', 'information_schema.column_udt_usage', 'information_schema.data_type_privileges', 'information_schema.collations', 'information_schema.sql_implementation_info', 'information_schema.foreign_data_wrappers', 'information_schema.domain_udt_usage', 'information_schema.constraint_table_usage', 'information_schema.routine_privileges', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.triggered_update_columns', 'information_schema.role_udt_grants', 'information_schema.column_privileges', 'information_schema.role_column_grants', 'information_schema.columns', 'information_schema.user_mappings', 'information_schema.role_usage_grants', 'information_schema.routines', 'information_schema.character_sets', 'information_schema.role_routine_grants', 'information_schema.table_constraints', 'information_schema.user_mapping_options', 'information_schema.check_constraint_routine_usage', 'information_schema.sql_sizing', 'information_schema.view_table_usage', 'information_schema.usage_privileges', 'information_schema.enabled_roles', 'information_schema.role_table_grants', 'information_schema.tables', 'information_schema.element_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.constraint_column_usage', 'information_schema.view_column_usage', 'information_schema.information_schema_catalog_name', 'information_schema.view_routine_usage', 'information_schema.foreign_servers', 'information_schema.user_defined_types', 'information_schema.triggers', 'information_schema.foreign_table_options', 'information_schema.attributes', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-09-07 12:51:32 Duration: 505ms
-
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 ('information_schema.foreign_servers', 'information_schema.key_column_usage', 'information_schema.routine_routine_usage', 'information_schema.views', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.constraint_column_usage', 'information_schema.role_udt_grants', 'information_schema.user_mapping_options', 'information_schema.column_column_usage', 'information_schema.column_privileges', 'information_schema.enabled_roles', 'information_schema.view_table_usage', 'information_schema.user_mappings', 'information_schema.udt_privileges', 'information_schema.foreign_data_wrappers', 'information_schema.role_usage_grants', 'information_schema.applicable_roles', 'information_schema.foreign_table_options', 'information_schema.routine_column_usage', 'information_schema.sql_implementation_info', 'information_schema.view_routine_usage', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.routine_sequence_usage', 'information_schema.element_types', 'information_schema.schemata', 'information_schema.routines', 'information_schema.constraint_table_usage', 'information_schema.sql_features', 'information_schema.sql_sizing', 'information_schema.collations', 'information_schema.check_constraints', 'information_schema.domain_udt_usage', 'information_schema.domains', 'information_schema.triggered_update_columns', 'information_schema.user_defined_types', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_privileges', 'information_schema.role_table_grants', 'information_schema.column_options', 'information_schema.role_column_grants', 'information_schema.data_type_privileges', 'information_schema.view_column_usage', 'information_schema.table_constraints', 'information_schema.referential_constraints', 'information_schema.table_privileges', 'information_schema.triggers', 'information_schema.role_routine_grants', 'information_schema.foreign_tables', 'information_schema.attributes', 'information_schema.columns', 'information_schema.column_udt_usage', 'information_schema.foreign_server_options', 'information_schema.parameters', 'information_schema.domain_constraints', 'information_schema.sequences', 'information_schema.routine_table_usage', 'information_schema.tables', 'information_schema.usage_privileges', 'information_schema.collation_character_set_applicability', 'public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_depend', 'pg_catalog.pg_collation', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_group', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_trigger', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_settings', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_policy', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_proc', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_roles', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_am', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_matviews', 'pg_catalog.pg_sequences', 'pg_catalog.pg_attribute', 'pg_catalog.pg_database', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_extension', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_namespace', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_language', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_rules', 'pg_catalog.pg_stats', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_transform', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_opclass', 'pg_catalog.pg_conversion', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_cast', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription', 'pg_catalog.pg_operator', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_available_extension_versions');
Date: 2024-09-07 09:14:16 Duration: 452ms
-
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_seclabels', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_settings', 'pg_catalog.pg_constraint', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_roles', 'pg_catalog.pg_index', 'pg_catalog.pg_amop', 'pg_catalog.pg_description', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_inherits', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_tables', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_matviews', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_enum', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_publication', 'pg_catalog.pg_proc', 'pg_catalog.pg_extension', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_opclass', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_group', 'pg_catalog.pg_depend', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_type', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_views', 'pg_catalog.pg_stats', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_database', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_amproc', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_namespace', 'pg_catalog.pg_range', 'pg_catalog.pg_rules', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_class', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_trigger', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_operator', 'pg_catalog.pg_indexes', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_locks', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_language', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_foreign_data_wrapper', 'information_schema.user_mappings', 'information_schema.foreign_servers', 'information_schema.information_schema_catalog_name', 'information_schema.constraint_table_usage', 'information_schema.foreign_table_options', 'information_schema.constraint_column_usage', 'information_schema.referential_constraints', 'information_schema.role_routine_grants', 'information_schema.view_column_usage', 'information_schema.attributes', 'information_schema.column_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.check_constraint_routine_usage', 'information_schema.collations', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.enabled_roles', 'information_schema.routine_routine_usage', 'information_schema.sequences', 'information_schema.data_type_privileges', 'information_schema.column_udt_usage', 'information_schema.sql_implementation_info', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.parameters', 'information_schema.view_table_usage', 'information_schema.triggers', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.tables', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.user_defined_types', 'information_schema.administrable_role_authorizations', 'information_schema.schemata', 'information_schema.view_routine_usage', 'information_schema.foreign_tables', 'information_schema.domains', 'information_schema.routine_sequence_usage', 'information_schema.element_types', 'information_schema.foreign_server_options', 'information_schema.user_mapping_options', 'information_schema.routines', 'information_schema.domain_constraints', 'information_schema.foreign_data_wrapper_options', 'information_schema.table_constraints', 'information_schema.role_usage_grants', 'information_schema.triggered_update_columns', 'information_schema.column_options', 'information_schema.columns', 'information_schema.routine_column_usage', 'information_schema.domain_udt_usage', 'information_schema.sql_sizing', 'information_schema.role_udt_grants', 'information_schema.applicable_roles', 'information_schema.check_constraints', 'information_schema.key_column_usage', 'information_schema.routine_table_usage', 'information_schema.role_column_grants', 'information_schema.routine_privileges', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-09-07 09:49:01 Duration: 427ms
11 1,826 1h40m14s 2s695ms 4s981ms 3s293ms update item_list_line set method = ?, min_product_len_1 = ?, min_product_len_2 = ?, min_baseline_size = ?, seasonal_period = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Sep 07 01 649 37m28s 3s464ms 02 571 30m37s 3s217ms 03 352 18m9s 3s94ms 08 20 1m3s 3s181ms 09 234 12m55s 3s314ms -
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 269493 and item_demand_plan_id = 3927;
Date: 2024-09-07 01:00:14 Duration: 4s981ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 171585 and item_demand_plan_id = 3919;
Date: 2024-09-07 01:00:13 Duration: 4s980ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 220627 and item_demand_plan_id = 3919;
Date: 2024-09-07 01:11:14 Duration: 4s242ms
12 969 56m7s 3s348ms 4s775ms 3s474ms update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true, method = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Sep 07 00 650 37m32s 3s464ms 01 319 18m35s 3s495ms -
update item_list_line set product_id = 267540, supercede_product_id = 242324, superceded = True, method = Null where product_id = 242324 and item_demand_plan_id = 3927;
Date: 2024-09-07 01:00:14 Duration: 4s775ms
-
update item_list_line set product_id = 173208, supercede_product_id = 174025, superceded = True, method = Null where product_id = 174025 and item_demand_plan_id = 3928;
Date: 2024-09-07 01:11:14 Duration: 4s247ms
-
update item_list_line set product_id = 254171, supercede_product_id = 172368, superceded = True, method = Null where product_id = 172368 and item_demand_plan_id = 3928;
Date: 2024-09-07 01:09:36 Duration: 4s200ms
13 548 15m56s 1s192ms 9s365ms 1s745ms select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Sep 07 09 548 15m56s 1s745ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 172607)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:00:18 Duration: 9s365ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 172823)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:01:11 Duration: 5s741ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 197891)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:18:28 Duration: 5s89ms
14 548 2m2s 145ms 872ms 223ms select id from ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and date::date = date ?::timestamp and item_demand_plan_id = ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) t where t.rnum > ?;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Sep 07 09 548 2m2s 223ms -
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 184219 and date::date = DATE '2024-09-30T00:00:00'::timestamp and item_demand_plan_id = 3930 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-09-07 09:07:38 Duration: 872ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 254144 and date::date = DATE '2024-09-30T00:00:00'::timestamp and item_demand_plan_id = 3930 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-09-07 09:34:24 Duration: 854ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 173641 and date::date = DATE '2024-09-30T00:00:00'::timestamp and item_demand_plan_id = 3930 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-09-07 09:02:25 Duration: 817ms
15 354 49s772ms 120ms 294ms 140ms 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 #15
Day Hour Count Duration Avg duration Sep 07 09 354 49s772ms 140ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (203814, 172564, 172607, 172769, 172771, 172785, 172786, 172793, 172806, 172809, 172823, 172863, 172870, 172874, 172876, 172944, 172945, 173230, 173241, 173302, 173556, 173638, 173641, 173685, 173719, 173724, 173726, 173771, 173881, 174043, 174246, 174401, 175770, 175808, 175978, 176001, 176027, 176276, 176457, 176475, 176759, 176777, 176781, 176994, 177025, 177037, 177053, 177160, 177581, 178622, 179028, 179031, 179041, 179337, 180227, 180301, 180342, 181331, 181407, 181426, 181428, 181698, 181710, 181802, 182889, 183035, 183040, 183060, 183350, 183351, 183353, 183356, 183363, 183364, 183894, 184010, 184219, 184426, 184445, 184461, 184468, 184510, 184513, 184596, 184597, 184643, 184673, 184748, 184779, 184787, 184808, 185146, 185159, 185162, 185467, 185544, 185690, 185816, 185856, 186051, 186063, 186111, 186212, 186339, 186487, 186685, 186750, 187390, 187411, 187431, 187433, 187438, 187444, 187457, 187468, 187681, 187705, 187708, 187721, 187740, 187754, 187782, 187807, 187855, 188243, 188244, 188603, 188645, 188650, 188685, 188762, 188806, 188843, 188851, 188852, 188862, 189101, 189183, 189290, 189295, 189303, 189335, 189485, 189486, 189534, 189565, 190001, 190567, 190611, 190710, 190831, 190839, 190853, 190855, 190857, 190859, 190860, 190862, 190863, 190874, 190938, 193113, 193114, 193940, 193946, 194097, 194239, 194586, 194821, 194823, 194831, 194931, 195017, 195046, 195051, 195385, 195399, 195585, 195616, 195666, 195808, 195869, 196593, 197386, 197876, 197891, 197892, 198541, 198851, 199517, 199603, 199604, 199630, 203728, 203784, 203796, 203801, 203804, 203816, 203827, 203847, 203853, 203856, 203858, 203873, 203875, 203890, 203981, 203989, 203991, 203994, 203999, 204078, 204128, 204129, 204162, 204250, 204252, 204333, 204448, 204561, 205636, 205756, 205974, 205992, 206034, 206105, 206193, 206205, 206278, 206287, 206328, 206330, 206331, 206354, 206357, 206360, 206362, 206364, 206435, 206627, 207666, 207719, 207764, 207784, 207786, 207798, 207805, 207814, 207888, 207921, 207924, 207925, 207946, 207966, 207975, 207992, 207993, 208010, 208019, 208020, 208050, 208054, 208090, 208092, 208093, 208097, 208104, 208146, 208167, 208206, 208218, 208252, 208255, 208262, 208265, 208307, 208308, 208313, 208314, 208318, 208348, 208350, 208373, 208388, 208389, 208396, 208409, 208483, 208540, 208542, 208571, 208580, 209800, 209801, 209881, 210159, 210163, 210165, 210166, 210168, 210179, 210205, 210214, 210231, 210237, 210896, 211881, 211909, 211939, 212097, 213410, 216318, 218824, 219135, 219197, 220095, 220110, 220145, 220150, 220152, 220172, 220183, 220289, 221199, 221367, 221380, 221924, 221925, 221992, 223697, 223886, 223951, 226531, 226627, 238867, 238917, 238997, 239099, 239120, 239125, 239141, 239193, 239228, 239238, 239322, 239393, 239405, 239415, 239420, 239475, 239480, 242126, 246786, 247264, 249334, 253699, 253842, 253898, 254144, 254146, 254152, 254167, 255618, 255626, 255632, 255639, 255654, 255667, 255672, 255675, 255676, 255688, 255689, 255698, 255710, 255738, 255740, 255794, 255806, 255833, 255834, 255836, 255837, 255886, 255889, 255890, 255898, 255904, 255913, 255920, 255926, 255931, 255932, 255948, 255954, 255975, 256001, 256017, 256027, 256032, 256057, 256058, 256059, 256060, 256078, 256093, 256125, 256126, 256127, 256132, 256164, 256186, 256189, 256304, 256310, 256311, 256312, 256321, 256322, 256326, 256330, 256331, 256334, 256337, 256342, 256346, 256370, 256384, 256403, 256404, 256406, 256427, 256429, 256463, 256486, 256487, 256488, 256496, 256502, 256508, 256510, 256511, 256564, 256568, 256612, 256613, 256622, 256636, 256656, 256659, 256661, 256675, 256683, 256684, 256685, 256686, 256738, 256752, 256753, 256756, 256793, 256794, 256796, 256797, 256798, 256799, 256800, 256804, 256805, 256807, 256808, 256810, 256811, 256812, 256813, 256814, 256815, 256816, 256817, 256818, 256819, 256827, 256828, 256829, 256830, 256831, 256832, 256834, 256841, 256844, 256858, 256867, 256887, 256890, 256892, 256893, 256894, 256896, 256897, 256898, 256901, 256909, 256913, 256999, 257000, 257001, 257002, 257004, 257028, 257029, 257057, 257087, 257098, 257100, 257130, 257152, 257154, 257175, 257182, 257204, 257234, 257266, 257267, 257270, 257271, 257292, 257293, 257294, 257418, 257469, 257479, 257488, 257496, 257511, 257514, 257536, 257544, 257603, 257870, 257902, 257947, 257969, 258436, 259053, 262097, 263726, 265006)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-07 09:19:42 Duration: 294ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (173638, 172564, 172607, 172769, 172771, 172785, 172786, 172793, 172806, 172809, 172823, 172863, 172870, 172874, 172876, 172944, 172945, 173230, 173241, 173302, 173556, 173641, 173685, 173719, 173724, 173726, 173771, 173881, 174043, 174246, 174401, 175770, 175808, 175978, 176001, 176027, 176276, 176457, 176475, 176759, 176777, 176781, 176994, 177025, 177037, 177053, 177160, 177581, 178622, 179028, 179031, 179041, 179337, 180227, 180301, 180342, 181331, 181407, 181426, 181428, 181698, 181710, 181802, 182889, 183035, 183040, 183060, 183350, 183351, 183353, 183356, 183363, 183364, 183894, 184010, 184219, 184426, 184445, 184461, 184468, 184510, 184513, 184596, 184597, 184643, 184673, 184748, 184779, 184787, 184808, 185146, 185159, 185162, 185467, 185544, 185690, 185816, 185856, 186051, 186063, 186111, 186212, 186339, 186487, 186685, 186750, 187390, 187411, 187431, 187433, 187438, 187444, 187457, 187468, 187681, 187705, 187708, 187721, 187740, 187754, 187782, 187807, 187855, 188243, 188244, 188603, 188645, 188650, 188685, 188762, 188806, 188843, 188851, 188852, 188862, 189101, 189183, 189290, 189295, 189303, 189335, 189485, 189486, 189534, 189565, 190001, 190567, 190611, 190710, 190831, 190839, 190853, 190855, 190857, 190859, 190860, 190862, 190863, 190874, 190938, 193113, 193114, 193940, 193946, 194097, 194239, 194586, 194821, 194823, 194831, 194931, 195017, 195046, 195051, 195385, 195399, 195585, 195616, 195666, 195808, 195869, 196593, 197386, 197876, 197891, 197892, 198541, 198851, 199517, 199603, 199604, 199630, 203728, 203784, 203796, 203801, 203804, 203814, 203816, 203827, 203847, 203853, 203856, 203858, 203873, 203875, 203890, 203981, 203989, 203991, 203994, 203999, 204078, 204128, 204129, 204162, 204250, 204252, 204333, 204448, 204561, 205636, 205756, 205974, 205992, 206034, 206105, 206193, 206205, 206278, 206287, 206328, 206330, 206331, 206354, 206357, 206360, 206362, 206364, 206435, 206627, 207666, 207719, 207764, 207784, 207786, 207798, 207805, 207814, 207888, 207921, 207924, 207925, 207946, 207966, 207975, 207992, 207993, 208010, 208019, 208020, 208050, 208054, 208090, 208092, 208093, 208097, 208104, 208146, 208167, 208206, 208218, 208252, 208255, 208262, 208265, 208307, 208308, 208313, 208314, 208318, 208348, 208350, 208373, 208388, 208389, 208396, 208409, 208483, 208540, 208542, 208571, 208580, 209800, 209801, 209881, 210159, 210163, 210165, 210166, 210168, 210179, 210205, 210214, 210231, 210237, 210896, 211881, 211909, 211939, 212097, 213410, 216318, 218824, 219135, 219197, 220095, 220110, 220145, 220150, 220152, 220172, 220183, 220289, 221199, 221367, 221380, 221924, 221925, 221992, 223697, 223886, 223951, 226531, 226627, 238867, 238917, 238997, 239099, 239120, 239125, 239141, 239193, 239228, 239238, 239322, 239393, 239405, 239415, 239420, 239475, 239480, 242126, 246786, 247264, 249334, 253699, 253842, 253898, 254144, 254146, 254152, 254167, 255618, 255626, 255632, 255639, 255654, 255667, 255672, 255675, 255676, 255688, 255689, 255698, 255710, 255738, 255740, 255794, 255806, 255833, 255834, 255836, 255837, 255886, 255889, 255890, 255898, 255904, 255913, 255920, 255926, 255931, 255932, 255948, 255954, 255975, 256001, 256017, 256027, 256032, 256057, 256058, 256059, 256060, 256078, 256093, 256125, 256126, 256127, 256132, 256164, 256186, 256189, 256304, 256310, 256311, 256312, 256321, 256322, 256326, 256330, 256331, 256334, 256337, 256342, 256346, 256370, 256384, 256403, 256404, 256406, 256427, 256429, 256463, 256486, 256487, 256488, 256496, 256502, 256508, 256510, 256511, 256564, 256568, 256612, 256613, 256622, 256636, 256656, 256659, 256661, 256675, 256683, 256684, 256685, 256686, 256738, 256752, 256753, 256756, 256793, 256794, 256796, 256797, 256798, 256799, 256800, 256804, 256805, 256807, 256808, 256810, 256811, 256812, 256813, 256814, 256815, 256816, 256817, 256818, 256819, 256827, 256828, 256829, 256830, 256831, 256832, 256834, 256841, 256844, 256858, 256867, 256887, 256890, 256892, 256893, 256894, 256896, 256897, 256898, 256901, 256909, 256913, 256999, 257000, 257001, 257002, 257004, 257028, 257029, 257057, 257087, 257098, 257100, 257130, 257152, 257154, 257175, 257182, 257204, 257234, 257266, 257267, 257270, 257271, 257292, 257293, 257294, 257418, 257469, 257479, 257488, 257496, 257511, 257514, 257536, 257544, 257603, 257870, 257902, 257947, 257969, 258436, 259053, 262097, 263726, 265006)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-07 09:02:14 Duration: 257ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (194931, 172564, 172607, 172769, 172771, 172785, 172786, 172793, 172806, 172809, 172823, 172863, 172870, 172874, 172876, 172944, 172945, 173230, 173241, 173302, 173556, 173638, 173641, 173685, 173719, 173724, 173726, 173771, 173881, 174043, 174246, 174401, 175770, 175808, 175978, 176001, 176027, 176276, 176457, 176475, 176759, 176777, 176781, 176994, 177025, 177037, 177053, 177160, 177581, 178622, 179028, 179031, 179041, 179337, 180227, 180301, 180342, 181331, 181407, 181426, 181428, 181698, 181710, 181802, 182889, 183035, 183040, 183060, 183350, 183351, 183353, 183356, 183363, 183364, 183894, 184010, 184219, 184426, 184445, 184461, 184468, 184510, 184513, 184596, 184597, 184643, 184673, 184748, 184779, 184787, 184808, 185146, 185159, 185162, 185467, 185544, 185690, 185816, 185856, 186051, 186063, 186111, 186212, 186339, 186487, 186685, 186750, 187390, 187411, 187431, 187433, 187438, 187444, 187457, 187468, 187681, 187705, 187708, 187721, 187740, 187754, 187782, 187807, 187855, 188243, 188244, 188603, 188645, 188650, 188685, 188762, 188806, 188843, 188851, 188852, 188862, 189101, 189183, 189290, 189295, 189303, 189335, 189485, 189486, 189534, 189565, 190001, 190567, 190611, 190710, 190831, 190839, 190853, 190855, 190857, 190859, 190860, 190862, 190863, 190874, 190938, 193113, 193114, 193940, 193946, 194097, 194239, 194586, 194821, 194823, 194831, 195017, 195046, 195051, 195385, 195399, 195585, 195616, 195666, 195808, 195869, 196593, 197386, 197876, 197891, 197892, 198541, 198851, 199517, 199603, 199604, 199630, 203728, 203784, 203796, 203801, 203804, 203814, 203816, 203827, 203847, 203853, 203856, 203858, 203873, 203875, 203890, 203981, 203989, 203991, 203994, 203999, 204078, 204128, 204129, 204162, 204250, 204252, 204333, 204448, 204561, 205636, 205756, 205974, 205992, 206034, 206105, 206193, 206205, 206278, 206287, 206328, 206330, 206331, 206354, 206357, 206360, 206362, 206364, 206435, 206627, 207666, 207719, 207764, 207784, 207786, 207798, 207805, 207814, 207888, 207921, 207924, 207925, 207946, 207966, 207975, 207992, 207993, 208010, 208019, 208020, 208050, 208054, 208090, 208092, 208093, 208097, 208104, 208146, 208167, 208206, 208218, 208252, 208255, 208262, 208265, 208307, 208308, 208313, 208314, 208318, 208348, 208350, 208373, 208388, 208389, 208396, 208409, 208483, 208540, 208542, 208571, 208580, 209800, 209801, 209881, 210159, 210163, 210165, 210166, 210168, 210179, 210205, 210214, 210231, 210237, 210896, 211881, 211909, 211939, 212097, 213410, 216318, 218824, 219135, 219197, 220095, 220110, 220145, 220150, 220152, 220172, 220183, 220289, 221199, 221367, 221380, 221924, 221925, 221992, 223697, 223886, 223951, 226531, 226627, 238867, 238917, 238997, 239099, 239120, 239125, 239141, 239193, 239228, 239238, 239322, 239393, 239405, 239415, 239420, 239475, 239480, 242126, 246786, 247264, 249334, 253699, 253842, 253898, 254144, 254146, 254152, 254167, 255618, 255626, 255632, 255639, 255654, 255667, 255672, 255675, 255676, 255688, 255689, 255698, 255710, 255738, 255740, 255794, 255806, 255833, 255834, 255836, 255837, 255886, 255889, 255890, 255898, 255904, 255913, 255920, 255926, 255931, 255932, 255948, 255954, 255975, 256001, 256017, 256027, 256032, 256057, 256058, 256059, 256060, 256078, 256093, 256125, 256126, 256127, 256132, 256164, 256186, 256189, 256304, 256310, 256311, 256312, 256321, 256322, 256326, 256330, 256331, 256334, 256337, 256342, 256346, 256370, 256384, 256403, 256404, 256406, 256427, 256429, 256463, 256486, 256487, 256488, 256496, 256502, 256508, 256510, 256511, 256564, 256568, 256612, 256613, 256622, 256636, 256656, 256659, 256661, 256675, 256683, 256684, 256685, 256686, 256738, 256752, 256753, 256756, 256793, 256794, 256796, 256797, 256798, 256799, 256800, 256804, 256805, 256807, 256808, 256810, 256811, 256812, 256813, 256814, 256815, 256816, 256817, 256818, 256819, 256827, 256828, 256829, 256830, 256831, 256832, 256834, 256841, 256844, 256858, 256867, 256887, 256890, 256892, 256893, 256894, 256896, 256897, 256898, 256901, 256909, 256913, 256999, 257000, 257001, 257002, 257004, 257028, 257029, 257057, 257087, 257098, 257100, 257130, 257152, 257154, 257175, 257182, 257204, 257234, 257266, 257267, 257270, 257271, 257292, 257293, 257294, 257418, 257469, 257479, 257488, 257496, 257511, 257514, 257536, 257544, 257603, 257870, 257902, 257947, 257969, 258436, 259053, 262097, 263726, 265006)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-09-07 09:16:53 Duration: 243ms
16 353 6m16s 829ms 2s691ms 1s66ms select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Sep 07 05 237 4m1s 1s18ms 08 116 2m15s 1s165ms -
select id from item_list_line where product_id = 172982 and item_demand_plan_id = 3929;
Date: 2024-09-07 08:52:08 Duration: 2s691ms
-
select id from item_list_line where product_id = 225961 and item_demand_plan_id = 3929;
Date: 2024-09-07 08:53:57 Duration: 2s337ms
-
select id from item_list_line where product_id = 171866 and item_demand_plan_id = 3930;
Date: 2024-09-07 05:15:24 Duration: 2s274ms
17 239 5m40s 1s69ms 3s595ms 1s425ms select distinct ill.product_id from item_list_line as ill left join res_forecast_method as fm on fm.id = ill.method where ill.item_demand_plan_id = ? and ill.method not in (...);Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Sep 07 05 17 23s505ms 1s382ms 08 27 46s305ms 1s715ms 09 8 13s581ms 1s697ms 12 26 46s380ms 1s783ms 13 41 53s182ms 1s297ms 14 38 50s137ms 1s319ms 15 41 55s193ms 1s346ms 16 41 52s499ms 1s280ms -
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-07 08:52:40 Duration: 3s595ms
-
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 = 3928 and ill.method not in (8, 7);
Date: 2024-09-07 12:50:45 Duration: 2s549ms
-
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-07 15:13:34 Duration: 2s200ms
18 239 5m7s 965ms 3s734ms 1s284ms select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Sep 07 05 17 22s940ms 1s349ms 08 27 38s444ms 1s423ms 09 8 11s356ms 1s419ms 12 26 38s569ms 1s483ms 13 41 48s896ms 1s192ms 14 38 45s114ms 1s187ms 15 41 52s709ms 1s285ms 16 41 49s22ms 1s195ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3926 and active = True;
Date: 2024-09-07 15:25:16 Duration: 3s734ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3927 and active = True;
Date: 2024-09-07 05:15:44 Duration: 2s480ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3922 and active = True;
Date: 2024-09-07 08:53:10 Duration: 2s424ms
19 239 5m1s 961ms 3s682ms 1s261ms select ill.item_demand_plan_id from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where ill.method is null and idp.active = true and ill.item_demand_plan_id = ? group by ill.item_demand_plan_id having count(ill.id) > ?;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Sep 07 05 17 20s491ms 1s205ms 08 27 39s159ms 1s450ms 09 8 12s204ms 1s525ms 12 26 40s77ms 1s541ms 13 41 48s126ms 1s173ms 14 38 44s410ms 1s168ms 15 41 47s109ms 1s149ms 16 41 50s26ms 1s220ms -
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3928 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 12:47:40 Duration: 3s682ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3921 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 08:53:23 Duration: 2s585ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3928 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 08:58:24 Duration: 2s436ms
20 239 4m22s 827ms 3s32ms 1s97ms select count(id) from item_list_line where item_demand_plan_id = ?;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Sep 07 05 17 19s543ms 1s149ms 08 27 32s403ms 1s200ms 09 8 13s41ms 1s630ms 12 26 35s556ms 1s367ms 13 41 41s567ms 1s13ms 14 38 38s573ms 1s15ms 15 41 40s894ms 997ms 16 41 40s840ms 996ms -
select count(id) from item_list_line where item_demand_plan_id = 3926;
Date: 2024-09-07 05:14:04 Duration: 3s32ms
-
select count(id) from item_list_line where item_demand_plan_id = 3928;
Date: 2024-09-07 09:54:36 Duration: 2s910ms
-
select count(id) from item_list_line where item_demand_plan_id = 3928;
Date: 2024-09-07 12:50:41 Duration: 2s456ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 5m34s 5m34s 5m34s 1 5m34s 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 07 09 1 5m34s 5m34s -
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-07 09:13:24 Duration: 5m34s
2 2m37s 2m37s 2m37s 1 2m37s 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 07 09 1 2m37s 2m37s -
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-07 09:05:16 Duration: 2m37s
3 3s348ms 4s775ms 3s474ms 969 56m7s update item_list_line set product_id = ?, supercede_product_id = ?, superceded = true, method = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Sep 07 00 650 37m32s 3s464ms 01 319 18m35s 3s495ms -
update item_list_line set product_id = 267540, supercede_product_id = 242324, superceded = True, method = Null where product_id = 242324 and item_demand_plan_id = 3927;
Date: 2024-09-07 01:00:14 Duration: 4s775ms
-
update item_list_line set product_id = 173208, supercede_product_id = 174025, superceded = True, method = Null where product_id = 174025 and item_demand_plan_id = 3928;
Date: 2024-09-07 01:11:14 Duration: 4s247ms
-
update item_list_line set product_id = 254171, supercede_product_id = 172368, superceded = True, method = Null where product_id = 172368 and item_demand_plan_id = 3928;
Date: 2024-09-07 01:09:36 Duration: 4s200ms
4 2s695ms 4s981ms 3s293ms 1,826 1h40m14s update item_list_line set method = ?, min_product_len_1 = ?, min_product_len_2 = ?, min_baseline_size = ?, seasonal_period = ? where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Sep 07 01 649 37m28s 3s464ms 02 571 30m37s 3s217ms 03 352 18m9s 3s94ms 08 20 1m3s 3s181ms 09 234 12m55s 3s314ms -
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 269493 and item_demand_plan_id = 3927;
Date: 2024-09-07 01:00:14 Duration: 4s981ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 171585 and item_demand_plan_id = 3919;
Date: 2024-09-07 01:00:13 Duration: 4s980ms
-
update item_list_line set method = 8, min_product_len_1 = 0, min_product_len_2 = 0, min_baseline_size = 0, seasonal_period = 0 where product_id = 220627 and item_demand_plan_id = 3919;
Date: 2024-09-07 01:11:14 Duration: 4s242ms
5 1s192ms 9s365ms 1s745ms 548 15m56s select "item_list_line".id from "item_list_line" where (((("item_list_line"."active" = true) and ("item_list_line"."product_id" = ?)) and (("item_list_line"."method" not in (...)) or "item_list_line"."method" is null)) and ("item_list_line"."item_demand_plan_id" = ?)) order by "item_list_line"."id" limit ?;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Sep 07 09 548 15m56s 1s745ms -
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 172607)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:00:18 Duration: 9s365ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 172823)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:01:11 Duration: 5s741ms
-
SELECT "item_list_line".id FROM "item_list_line" WHERE (((("item_list_line"."active" = true) AND ("item_list_line"."product_id" = 197891)) AND (("item_list_line"."method" not in (7, 8)) OR "item_list_line"."method" IS NULL)) AND ("item_list_line"."item_demand_plan_id" = 3930)) ORDER BY "item_list_line"."id" LIMIT 1;
Date: 2024-09-07 09:18:28 Duration: 5s89ms
6 1s69ms 3s595ms 1s425ms 239 5m40s 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 #6
Day Hour Count Duration Avg duration Sep 07 05 17 23s505ms 1s382ms 08 27 46s305ms 1s715ms 09 8 13s581ms 1s697ms 12 26 46s380ms 1s783ms 13 41 53s182ms 1s297ms 14 38 50s137ms 1s319ms 15 41 55s193ms 1s346ms 16 41 52s499ms 1s280ms -
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-07 08:52:40 Duration: 3s595ms
-
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 = 3928 and ill.method not in (8, 7);
Date: 2024-09-07 12:50:45 Duration: 2s549ms
-
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-07 15:13:34 Duration: 2s200ms
7 965ms 3s734ms 1s284ms 239 5m7s select count(id) as total_count from item_list_line where item_demand_plan_id = ? and active = true;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Sep 07 05 17 22s940ms 1s349ms 08 27 38s444ms 1s423ms 09 8 11s356ms 1s419ms 12 26 38s569ms 1s483ms 13 41 48s896ms 1s192ms 14 38 45s114ms 1s187ms 15 41 52s709ms 1s285ms 16 41 49s22ms 1s195ms -
select count(id) as total_count from item_list_line where item_demand_plan_id = 3926 and active = True;
Date: 2024-09-07 15:25:16 Duration: 3s734ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3927 and active = True;
Date: 2024-09-07 05:15:44 Duration: 2s480ms
-
select count(id) as total_count from item_list_line where item_demand_plan_id = 3922 and active = True;
Date: 2024-09-07 08:53:10 Duration: 2s424ms
8 961ms 3s682ms 1s261ms 239 5m1s select ill.item_demand_plan_id from item_list_line ill left join item_demand_plan as idp on ill.item_demand_plan_id = idp.id where ill.method is null and idp.active = true and ill.item_demand_plan_id = ? group by ill.item_demand_plan_id having count(ill.id) > ?;Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Sep 07 05 17 20s491ms 1s205ms 08 27 39s159ms 1s450ms 09 8 12s204ms 1s525ms 12 26 40s77ms 1s541ms 13 41 48s126ms 1s173ms 14 38 44s410ms 1s168ms 15 41 47s109ms 1s149ms 16 41 50s26ms 1s220ms -
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3928 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 12:47:40 Duration: 3s682ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3921 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 08:53:23 Duration: 2s585ms
-
select ill.item_demand_plan_id from item_list_line ill LEFT JOIN item_demand_plan as idp ON ill.item_demand_plan_id = idp.id where ill.method is NULL and idp.active = True and ill.item_demand_plan_id = 3928 GROUP BY ill.item_demand_plan_id having count(ill.id) > 0;
Date: 2024-09-07 08:58:24 Duration: 2s436ms
9 827ms 3s32ms 1s97ms 239 4m22s 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 07 05 17 19s543ms 1s149ms 08 27 32s403ms 1s200ms 09 8 13s41ms 1s630ms 12 26 35s556ms 1s367ms 13 41 41s567ms 1s13ms 14 38 38s573ms 1s15ms 15 41 40s894ms 997ms 16 41 40s840ms 996ms -
select count(id) from item_list_line where item_demand_plan_id = 3926;
Date: 2024-09-07 05:14:04 Duration: 3s32ms
-
select count(id) from item_list_line where item_demand_plan_id = 3928;
Date: 2024-09-07 09:54:36 Duration: 2s910ms
-
select count(id) from item_list_line where item_demand_plan_id = 3928;
Date: 2024-09-07 12:50:41 Duration: 2s456ms
10 829ms 2s691ms 1s66ms 353 6m16s select id from item_list_line where product_id = ? and item_demand_plan_id = ?;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Sep 07 05 237 4m1s 1s18ms 08 116 2m15s 1s165ms -
select id from item_list_line where product_id = 172982 and item_demand_plan_id = 3929;
Date: 2024-09-07 08:52:08 Duration: 2s691ms
-
select id from item_list_line where product_id = 225961 and item_demand_plan_id = 3929;
Date: 2024-09-07 08:53:57 Duration: 2s337ms
-
select id from item_list_line where product_id = 171866 and item_demand_plan_id = 3930;
Date: 2024-09-07 05:15:24 Duration: 2s274ms
11 888ms 4s269ms 1s6ms 39,767 11h7m12s select date_part(?, invoice_date) as year, date_part(?, invoice_date) as month, date_part(?, invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = ? and item_demand_plan_id = ? group by product_id, date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date) order by date_part(?, invoice_date), date_part(?, invoice_date), date_part(?, invoice_date);Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Sep 07 01 651 10m31s 969ms 02 571 9m11s 965ms 03 351 5m36s 957ms 04 1,584 25m25s 963ms 05 2,290 38m53s 1s19ms 06 2,108 34m5s 970ms 07 2,108 34m20s 977ms 08 2,134 35m46s 1s6ms 09 2,711 53m31s 1s184ms 10 2,122 34m7s 965ms 11 3,020 53m52s 1s70ms 12 3,983 1h14m 1s114ms 13 2,119 34m1s 963ms 14 2,103 33m52s 966ms 15 2,107 34m9s 972ms 16 2,110 33m46s 960ms 17 2,119 33m32s 949ms 18 2,129 33m38s 948ms 19 2,117 33m39s 953ms 20 1,330 21m5s 951ms -
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 187538 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:02:25 Duration: 4s269ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 190829 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:03:37 Duration: 4s70ms
-
select date_part('year', invoice_date) as Year, date_part('month', invoice_date) as Month, date_part('day', invoice_date) as day, product_id, sum(product_uom_qty) as total from item_list_line where product_id = 206038 and item_demand_plan_id = 3928 group by product_id, date_part('month', invoice_date), date_part('year', invoice_date), date_part('day', invoice_date) order by date_part('year', invoice_date), date_part('month', invoice_date), date_part('day', invoice_date);
Date: 2024-09-07 09:09:46 Duration: 3s517ms
12 313ms 1s111ms 369ms 10,164 1h2m30s 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 #12
Day Hour Count Duration Avg duration Sep 07 00 186 1m1s 333ms 01 171 56s243ms 328ms 02 180 59s212ms 328ms 03 87 28s186ms 323ms 04 99 33s279ms 336ms 05 477 2m47s 351ms 06 1,241 7m10s 347ms 07 1,252 7m20s 351ms 08 1,260 7m45s 369ms 09 1,119 8m9s 437ms 10 1,125 6m35s 351ms 11 1,182 7m39s 388ms 12 426 3m5s 435ms 13 516 3m3s 354ms 14 375 2m10s 347ms 15 240 1m26s 361ms 16 24 8s639ms 359ms 17 21 7s422ms 353ms 18 33 11s246ms 340ms 19 30 10s345ms 344ms 20 30 9s961ms 332ms 21 42 13s722ms 326ms 22 30 9s823ms 327ms 23 18 5s882ms 326ms -
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-07 12:50:09 Duration: 1s111ms
-
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-07 09:03:13 Duration: 989ms
-
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-07 09:13:11 Duration: 936ms
13 314ms 1s75ms 368ms 8,043 49m23s 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 #13
Day Hour Count Duration Avg duration Sep 07 00 144 47s518ms 329ms 01 180 59s994ms 333ms 02 99 32s493ms 328ms 03 66 21s708ms 328ms 04 54 17s692ms 327ms 05 276 1m37s 351ms 06 876 5m6s 349ms 07 843 4m55s 350ms 08 1,095 6m35s 361ms 09 1,026 7m16s 425ms 10 1,134 6m39s 352ms 11 1,143 7m20s 384ms 12 288 2m2s 424ms 13 339 1m58s 350ms 14 264 1m33s 352ms 15 201 1m12s 361ms 16 3 1s786ms 595ms 17 3 966ms 322ms 18 3 1s99ms 366ms 19 6 1s976ms 329ms -
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-07 12:13:49 Duration: 1s75ms
-
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-07 09:03:44 Duration: 1s
-
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-07 08:53:25 Duration: 945ms
14 234ms 911ms 275ms 9,465 43m30s select "product_template".id from "product_template" where (("product_template"."active" = true) and (("product_template"."sale_ok" = true) and (("product_template"."website_id" in (...)) or "product_template"."website_id" is null))) order by coalesce("product_template"."is_published", false) desc, "product_template"."list_price" asc, "product_template"."id" desc;Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Sep 07 00 174 42s684ms 245ms 01 210 51s527ms 245ms 02 180 44s225ms 245ms 03 81 19s725ms 243ms 04 63 15s969ms 253ms 05 402 1m46s 265ms 06 1,296 5m37s 260ms 07 1,290 5m40s 264ms 08 1,137 5m7s 270ms 09 1,124 6m6s 326ms 10 1,114 4m50s 260ms 11 1,032 5m2s 292ms 12 411 2m11s 318ms 13 375 1m39s 264ms 14 372 1m38s 265ms 15 183 48s786ms 266ms 16 21 5s970ms 284ms -
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-07 09:47:31 Duration: 911ms
-
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-07 09:11:51 Duration: 892ms
-
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-07 09:05:28 Duration: 756ms
15 232ms 823ms 274ms 6,803 31m8s 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 #15
Day Hour Count Duration Avg duration Sep 07 00 159 38s628ms 242ms 01 111 27s65ms 243ms 02 159 38s597ms 242ms 03 75 18s164ms 242ms 04 78 19s585ms 251ms 05 273 1m13s 269ms 06 951 4m8s 261ms 07 942 4m8s 263ms 08 750 3m21s 268ms 09 861 4m42s 328ms 10 752 3m16s 260ms 11 675 3m15s 289ms 12 288 1m30s 314ms 13 279 1m13s 263ms 14 273 1m9s 255ms 15 165 43s975ms 266ms 16 3 764ms 254ms 19 3 979ms 326ms 20 3 734ms 244ms 22 3 718ms 239ms -
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-07 08:53:31 Duration: 823ms
-
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-07 12:13:17 Duration: 804ms
-
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-07 09:21:53 Duration: 787ms
16 145ms 872ms 223ms 548 2m2s select id from ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and date::date = date ?::timestamp and item_demand_plan_id = ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) t where t.rnum > ?;Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Sep 07 09 548 2m2s 223ms -
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 184219 and date::date = DATE '2024-09-30T00:00:00'::timestamp and item_demand_plan_id = 3930 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-09-07 09:07:38 Duration: 872ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 254144 and date::date = DATE '2024-09-30T00:00:00'::timestamp and item_demand_plan_id = 3930 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-09-07 09:34:24 Duration: 854ms
-
SELECT id FROM ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 173641 and date::date = DATE '2024-09-30T00:00:00'::timestamp and item_demand_plan_id = 3930 and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) t WHERE t.rnum > 0;
Date: 2024-09-07 09:02:25 Duration: 817ms
17 144ms 773ms 176ms 37,148 1h49m16s with data as ( select id, row_number() over w as rnum from forecasted_data where product_id = ? and item_demand_plan_id = ? and date::date = date ? and active = true and is_forcast = true window w as (partition by product_id, date, min_product_uom_qty, max_product_uom_qty order by id)) select id from data where rnum > ?;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Sep 07 04 1,583 4m15s 161ms 05 2,071 6m2s 174ms 06 2,107 5m54s 168ms 07 2,108 5m57s 169ms 08 2,093 6m6s 174ms 09 1,927 6m41s 208ms 10 2,123 6m 169ms 11 3,019 9m42s 192ms 12 3,983 13m22s 201ms 13 2,117 5m59s 170ms 14 2,104 5m58s 170ms 15 2,107 6m 171ms 16 2,109 5m56s 169ms 17 2,119 5m52s 166ms 18 2,129 5m52s 165ms 19 2,118 5m53s 167ms 20 1,331 3m40s 165ms -
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 186039 and item_demand_plan_id = 3925 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 12:48:15 Duration: 773ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 184438 and item_demand_plan_id = 3921 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 09:21:45 Duration: 762ms
-
with data as ( SELECT id, row_number() OVER w as rnum FROM forecasted_data where product_id = 179263 and item_demand_plan_id = 3925 AND date::date = DATE '2024-09-30' and active = True and is_forcast = True WINDOW w AS (PARTITION BY product_id, date, min_product_uom_qty, max_product_uom_qty ORDER BY id)) SELECT id FROM data WHERE rnum > 0;
Date: 2024-09-07 12:13:18 Duration: 748ms
18 120ms 429ms 167ms 6,449 18m 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 #18
Day Hour Count Duration Avg duration Sep 07 00 20 2s566ms 128ms 01 34 4s783ms 140ms 02 26 3s494ms 134ms 03 25 3s446ms 137ms 04 54 8s97ms 149ms 05 178 29s94ms 163ms 06 348 53s55ms 152ms 07 530 1m21s 154ms 08 1,004 2m43s 163ms 09 1,634 5m2s 185ms 10 782 2m2s 156ms 11 612 1m47s 176ms 12 350 1m5s 186ms 13 217 33s844ms 155ms 14 171 27s264ms 159ms 15 139 22s113ms 159ms 16 56 8s756ms 156ms 17 46 6s582ms 143ms 18 99 15s33ms 151ms 19 55 8s542ms 155ms 20 48 7s646ms 159ms 21 6 758ms 126ms 22 10 1s332ms 133ms 23 5 672ms 134ms -
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-07 09:02:16 Duration: 429ms
-
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-07 09:00:30 Duration: 428ms
-
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-07 13:14:17 Duration: 417ms
19 121ms 1s172ms 164ms 58,215 2h39m33s 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 #19
Day Hour Count Duration Avg duration Sep 07 00 2,554 6m7s 144ms 01 2,447 6m7s 150ms 02 2,340 5m52s 150ms 03 2,512 5m47s 138ms 04 2,322 6m9s 158ms 05 2,258 6m38s 176ms 06 2,374 6m38s 167ms 07 2,395 6m34s 164ms 08 2,308 6m49s 177ms 09 2,397 8m38s 216ms 10 2,315 6m33s 169ms 11 2,303 7m20s 191ms 12 2,438 9m11s 226ms 13 2,657 7m22s 166ms 14 2,474 6m59s 169ms 15 2,530 7m16s 172ms 16 2,551 6m56s 163ms 17 2,480 6m27s 156ms 18 2,522 6m30s 154ms 19 2,383 6m29s 163ms 20 2,422 6m25s 159ms 21 2,594 5m56s 137ms 22 2,566 5m50s 136ms 23 2,073 4m45s 137ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 09:46:40') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 09:47:32 Duration: 1s172ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 13:13:26') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 13:14:17 Duration: 1s162ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-09-07 13:13:26') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_992"', '["pointspring_master","calendar.alarm",19530]', '["pointspring_master","mail.channel",35]', '["pointspring_master","mail.channel",44]', '["pointspring_master","mail.channel",425]', '["pointspring_master","mail.channel",436]', '["pointspring_master","mail.channel",451]', '["pointspring_master","mail.channel",500]', '["pointspring_master","mail.channel",502]', '["pointspring_master","mail.channel",638]', '["pointspring_master","res.partner",19530]', '["pointspring_master","ir.needaction",19530]'))) ORDER BY "bus_bus"."id";
Date: 2024-09-07 13:14:17 Duration: 1s147ms
20 139ms 505ms 158ms 5,715 15m5s 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 07 00 239 35s23ms 146ms 01 240 35s674ms 148ms 02 240 35s147ms 146ms 03 240 34s952ms 145ms 04 240 35s939ms 149ms 05 240 40s305ms 167ms 06 240 37s850ms 157ms 07 240 38s22ms 158ms 08 240 39s299ms 163ms 09 240 47s95ms 196ms 10 240 38s384ms 159ms 11 239 41s610ms 174ms 12 240 46s390ms 193ms 13 239 37s978ms 158ms 14 239 37s771ms 158ms 15 240 38s547ms 160ms 16 239 38s395ms 160ms 17 240 38s25ms 158ms 18 240 36s965ms 154ms 19 240 38s221ms 159ms 20 240 36s611ms 152ms 21 240 34s394ms 143ms 22 240 34s346ms 143ms 23 200 28s623ms 143ms -
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_auth_members', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_views', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_type', 'pg_catalog.pg_constraint', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_proc', 'pg_catalog.pg_conversion', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_amproc', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_matviews', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_roles', 'pg_catalog.pg_user', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_policies', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_settings', 'pg_catalog.pg_index', 'pg_catalog.pg_language', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_group', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_class', 'pg_catalog.pg_depend', 'pg_catalog.pg_collation', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_extension', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_subscription', 'pg_catalog.pg_description', 'pg_catalog.pg_namespace', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_sequence', 'pg_catalog.pg_rules', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_operator', 'pg_catalog.pg_enum', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_attribute', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_trigger', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_database', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_publication', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_opclass', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_stats', 'pg_catalog.pg_prepared_xacts', 'information_schema.column_domain_usage', 'information_schema.sequences', 'information_schema.collation_character_set_applicability', 'information_schema.column_column_usage', 'information_schema.routine_column_usage', 'information_schema.domains', 'information_schema.column_options', 'information_schema.foreign_tables', 'information_schema.administrable_role_authorizations', 'information_schema.schemata', 'information_schema.referential_constraints', 'information_schema.foreign_server_options', 'information_schema.domain_constraints', 'information_schema.check_constraints', 'information_schema.parameters', 'information_schema.applicable_roles', 'information_schema.routine_routine_usage', 'information_schema.routine_sequence_usage', 'information_schema.key_column_usage', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.routine_table_usage', 'information_schema.column_udt_usage', 'information_schema.data_type_privileges', 'information_schema.collations', 'information_schema.sql_implementation_info', 'information_schema.foreign_data_wrappers', 'information_schema.domain_udt_usage', 'information_schema.constraint_table_usage', 'information_schema.routine_privileges', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.triggered_update_columns', 'information_schema.role_udt_grants', 'information_schema.column_privileges', 'information_schema.role_column_grants', 'information_schema.columns', 'information_schema.user_mappings', 'information_schema.role_usage_grants', 'information_schema.routines', 'information_schema.character_sets', 'information_schema.role_routine_grants', 'information_schema.table_constraints', 'information_schema.user_mapping_options', 'information_schema.check_constraint_routine_usage', 'information_schema.sql_sizing', 'information_schema.view_table_usage', 'information_schema.usage_privileges', 'information_schema.enabled_roles', 'information_schema.role_table_grants', 'information_schema.tables', 'information_schema.element_types', 'information_schema.foreign_data_wrapper_options', 'information_schema.constraint_column_usage', 'information_schema.view_column_usage', 'information_schema.information_schema_catalog_name', 'information_schema.view_routine_usage', 'information_schema.foreign_servers', 'information_schema.user_defined_types', 'information_schema.triggers', 'information_schema.foreign_table_options', 'information_schema.attributes', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-09-07 12:51:32 Duration: 505ms
-
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 ('information_schema.foreign_servers', 'information_schema.key_column_usage', 'information_schema.routine_routine_usage', 'information_schema.views', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.constraint_column_usage', 'information_schema.role_udt_grants', 'information_schema.user_mapping_options', 'information_schema.column_column_usage', 'information_schema.column_privileges', 'information_schema.enabled_roles', 'information_schema.view_table_usage', 'information_schema.user_mappings', 'information_schema.udt_privileges', 'information_schema.foreign_data_wrappers', 'information_schema.role_usage_grants', 'information_schema.applicable_roles', 'information_schema.foreign_table_options', 'information_schema.routine_column_usage', 'information_schema.sql_implementation_info', 'information_schema.view_routine_usage', 'information_schema.information_schema_catalog_name', 'information_schema.foreign_data_wrapper_options', 'information_schema.administrable_role_authorizations', 'information_schema.routine_sequence_usage', 'information_schema.element_types', 'information_schema.schemata', 'information_schema.routines', 'information_schema.constraint_table_usage', 'information_schema.sql_features', 'information_schema.sql_sizing', 'information_schema.collations', 'information_schema.check_constraints', 'information_schema.domain_udt_usage', 'information_schema.domains', 'information_schema.triggered_update_columns', 'information_schema.user_defined_types', 'information_schema.check_constraint_routine_usage', 'information_schema.routine_privileges', 'information_schema.role_table_grants', 'information_schema.column_options', 'information_schema.role_column_grants', 'information_schema.data_type_privileges', 'information_schema.view_column_usage', 'information_schema.table_constraints', 'information_schema.referential_constraints', 'information_schema.table_privileges', 'information_schema.triggers', 'information_schema.role_routine_grants', 'information_schema.foreign_tables', 'information_schema.attributes', 'information_schema.columns', 'information_schema.column_udt_usage', 'information_schema.foreign_server_options', 'information_schema.parameters', 'information_schema.domain_constraints', 'information_schema.sequences', 'information_schema.routine_table_usage', 'information_schema.tables', 'information_schema.usage_privileges', 'information_schema.collation_character_set_applicability', 'public.pg_stat_statements_info', 'public.pg_stat_statements', 'pg_catalog.pg_amop', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_cursors', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_foreign_data_wrapper', 'pg_catalog.pg_views', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_depend', 'pg_catalog.pg_collation', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_constraint', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_group', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_trigger', 'pg_catalog.pg_enum', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_settings', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_policy', 'pg_catalog.pg_seclabels', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_proc', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_sequence', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_index', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_roles', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_locks', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_type', 'pg_catalog.pg_amproc', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_am', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_matviews', 'pg_catalog.pg_sequences', 'pg_catalog.pg_attribute', 'pg_catalog.pg_database', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_class', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_extension', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_inherits', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_namespace', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_language', 'pg_catalog.pg_range', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_rules', 'pg_catalog.pg_stats', 'pg_catalog.pg_description', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_transform', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_opclass', 'pg_catalog.pg_conversion', 'pg_catalog.pg_indexes', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_cast', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_publication', 'pg_catalog.pg_subscription', 'pg_catalog.pg_operator', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_available_extension_versions');
Date: 2024-09-07 09:14:16 Duration: 452ms
-
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_seclabels', 'pg_catalog.pg_ts_dict', 'pg_catalog.pg_foreign_server', 'pg_catalog.pg_stat_sys_indexes', 'pg_catalog.pg_subscription_rel', 'pg_catalog.pg_sequences', 'pg_catalog.pg_stat_user_indexes', 'pg_catalog.pg_stat_slru', 'pg_catalog.pg_settings', 'pg_catalog.pg_constraint', 'pg_catalog.pg_aggregate', 'pg_catalog.pg_auth_members', 'pg_catalog.pg_roles', 'pg_catalog.pg_index', 'pg_catalog.pg_amop', 'pg_catalog.pg_description', 'pg_catalog.pg_statio_user_indexes', 'pg_catalog.pg_inherits', 'pg_catalog.pg_db_role_setting', 'pg_catalog.pg_policies', 'pg_catalog.pg_stat_database_conflicts', 'pg_catalog.pg_tables', 'pg_catalog.pg_publication_tables', 'pg_catalog.pg_subscription', 'pg_catalog.pg_stat_wal', 'pg_catalog.pg_stat_progress_analyze', 'pg_catalog.pg_matviews', 'pg_catalog.pg_rewrite', 'pg_catalog.pg_stat_user_tables', 'pg_catalog.pg_stat_all_indexes', 'pg_catalog.pg_enum', 'pg_catalog.pg_conversion', 'pg_catalog.pg_ts_config', 'pg_catalog.pg_publication', 'pg_catalog.pg_proc', 'pg_catalog.pg_extension', 'pg_catalog.pg_transform', 'pg_catalog.pg_stat_subscription', 'pg_catalog.pg_foreign_table', 'pg_catalog.pg_opclass', 'pg_catalog.pg_timezone_abbrevs', 'pg_catalog.pg_stat_gssapi', 'pg_catalog.pg_group', 'pg_catalog.pg_depend', 'pg_catalog.pg_shseclabel', 'pg_catalog.pg_sequence', 'pg_catalog.pg_user', 'pg_catalog.pg_statio_user_sequences', 'pg_catalog.pg_type', 'pg_catalog.pg_available_extension_versions', 'pg_catalog.pg_views', 'pg_catalog.pg_stats', 'pg_catalog.pg_replication_origin', 'pg_catalog.pg_database', 'pg_catalog.pg_opfamily', 'pg_catalog.pg_stat_progress_create_index', 'pg_catalog.pg_cast', 'pg_catalog.pg_shdepend', 'pg_catalog.pg_stat_bgwriter', 'pg_catalog.pg_policy', 'pg_catalog.pg_stat_replication', 'pg_catalog.pg_amproc', 'pg_catalog.pg_publication_rel', 'pg_catalog.pg_statio_sys_indexes', 'pg_catalog.pg_timezone_names', 'pg_catalog.pg_stat_replication_slots', 'pg_catalog.pg_attribute', 'pg_catalog.pg_stat_progress_cluster', 'pg_catalog.pg_stat_sys_tables', 'pg_catalog.pg_stat_archiver', 'pg_catalog.pg_collation', 'pg_catalog.pg_statio_all_indexes', 'pg_catalog.pg_cursors', 'pg_catalog.pg_stat_progress_copy', 'pg_catalog.pg_namespace', 'pg_catalog.pg_range', 'pg_catalog.pg_rules', 'pg_catalog.pg_attrdef', 'pg_catalog.pg_ts_parser', 'pg_catalog.pg_stat_xact_user_tables', 'pg_catalog.pg_stat_database', 'pg_catalog.pg_ts_config_map', 'pg_catalog.pg_init_privs', 'pg_catalog.pg_user_mappings', 'pg_catalog.pg_ts_template', 'pg_catalog.pg_stats_ext', 'pg_catalog.pg_statio_all_tables', 'pg_catalog.pg_statio_all_sequences', 'pg_catalog.pg_stat_xact_sys_tables', 'pg_catalog.pg_statio_user_tables', 'pg_catalog.pg_stat_user_functions', 'pg_catalog.pg_tablespace', 'pg_catalog.pg_class', 'pg_catalog.pg_statistic_ext', 'pg_catalog.pg_trigger', 'pg_catalog.pg_default_acl', 'pg_catalog.pg_operator', 'pg_catalog.pg_indexes', 'pg_catalog.pg_prepared_xacts', 'pg_catalog.pg_stat_activity', 'pg_catalog.pg_stat_progress_vacuum', 'pg_catalog.pg_stat_xact_all_tables', 'pg_catalog.pg_statio_sys_sequences', 'pg_catalog.pg_seclabel', 'pg_catalog.pg_locks', 'pg_catalog.pg_prepared_statements', 'pg_catalog.pg_stat_all_tables', 'pg_catalog.pg_shdescription', 'pg_catalog.pg_stats_ext_exprs', 'pg_catalog.pg_statio_sys_tables', 'pg_catalog.pg_am', 'pg_catalog.pg_language', 'pg_catalog.pg_largeobject_metadata', 'pg_catalog.pg_event_trigger', 'pg_catalog.pg_stat_ssl', 'pg_catalog.pg_replication_slots', 'pg_catalog.pg_stat_xact_user_functions', 'pg_catalog.pg_stat_progress_basebackup', 'pg_catalog.pg_partitioned_table', 'pg_catalog.pg_stat_wal_receiver', 'pg_catalog.pg_available_extensions', 'pg_catalog.pg_foreign_data_wrapper', 'information_schema.user_mappings', 'information_schema.foreign_servers', 'information_schema.information_schema_catalog_name', 'information_schema.constraint_table_usage', 'information_schema.foreign_table_options', 'information_schema.constraint_column_usage', 'information_schema.referential_constraints', 'information_schema.role_routine_grants', 'information_schema.view_column_usage', 'information_schema.attributes', 'information_schema.column_column_usage', 'information_schema.foreign_data_wrappers', 'information_schema.check_constraint_routine_usage', 'information_schema.collations', 'information_schema.role_table_grants', 'information_schema.usage_privileges', 'information_schema.enabled_roles', 'information_schema.routine_routine_usage', 'information_schema.sequences', 'information_schema.data_type_privileges', 'information_schema.column_udt_usage', 'information_schema.sql_implementation_info', 'information_schema.collation_character_set_applicability', 'information_schema.column_privileges', 'information_schema.parameters', 'information_schema.view_table_usage', 'information_schema.triggers', 'information_schema.character_sets', 'information_schema.column_domain_usage', 'information_schema.sql_features', 'information_schema.table_privileges', 'information_schema.tables', 'information_schema.views', 'information_schema.udt_privileges', 'information_schema.user_defined_types', 'information_schema.administrable_role_authorizations', 'information_schema.schemata', 'information_schema.view_routine_usage', 'information_schema.foreign_tables', 'information_schema.domains', 'information_schema.routine_sequence_usage', 'information_schema.element_types', 'information_schema.foreign_server_options', 'information_schema.user_mapping_options', 'information_schema.routines', 'information_schema.domain_constraints', 'information_schema.foreign_data_wrapper_options', 'information_schema.table_constraints', 'information_schema.role_usage_grants', 'information_schema.triggered_update_columns', 'information_schema.column_options', 'information_schema.columns', 'information_schema.routine_column_usage', 'information_schema.domain_udt_usage', 'information_schema.sql_sizing', 'information_schema.role_udt_grants', 'information_schema.applicable_roles', 'information_schema.check_constraints', 'information_schema.key_column_usage', 'information_schema.routine_table_usage', 'information_schema.role_column_grants', 'information_schema.routine_privileges', 'public.pg_stat_statements', 'public.pg_stat_statements_info');
Date: 2024-09-07 09:49:01 Duration: 427ms
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
- 208,442 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 1864 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 1,833 Max number of times the same event was reported
- 1,864 Total events found
Rank Times reported Error 1 1,833 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Sep 07 00 432 01 387 02 36 03 38 04 37 05 40 06 40 07 111 08 128 09 41 10 38 11 56 12 50 13 42 14 41 15 41 16 43 17 36 18 39 19 38 20 31 21 39 22 34 23 15 - 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-07 21:50:05
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=87 FOR UPDATE NOWAIT
Date: 2024-09-07 21:53:02
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=89 FOR UPDATE NOWAIT
Date: 2024-09-07 21:54:03
2 30 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Sep 07 01 4 05 3 08 2 11 1 12 1 13 14 15 4 17 1 - ERROR: could not serialize access due to concurrent update
- ERROR: could not serialize access due to concurrent update
- ERROR: could not serialize access due to concurrent update
Statement: UPDATE "bus_presence" SET "last_poll"='2024-09-07 15:06:08',"last_presence"='2024-09-07 15:06:08.359667' WHERE id IN (1)
Date: 2024-09-07 15:06:08
Statement: UPDATE "bus_presence" SET "last_poll"='2024-09-07 15:06:46',"last_presence"='2024-09-07 15:06:08.363252' WHERE id IN (1)
Date: 2024-09-07 15:06:46
Statement: UPDATE "bus_presence" SET "last_poll"='2024-09-07 15:11:15',"last_presence"='2024-09-07 15:11:14.738047' WHERE id IN (1)
Date: 2024-09-07 15:11:15
3 1 ERROR: current transaction is aborted, commands ignored until end of transaction block
Times Reported Most Frequent Error / Event #3
Day Hour Count Sep 07 01 1 - ERROR: current transaction is aborted, commands ignored until end of transaction block
Statement: SELECT "item_list_line"."id" as "id", "item_list_line"."item_demand_plan_id" as "item_demand_plan_id", "item_list_line"."product_id" as "product_id", "item_list_line"."selling_branch" as "selling_branch", "item_list_line"."product_uom_qty" as "product_uom_qty", "item_list_line"."invoice_date" as "invoice_date", "item_list_line"."warehouse_id" as "warehouse_id", "item_list_line"."method" as "method", "item_list_line"."inventory_vendor_id" as "inventory_vendor_id", "item_list_line"."active" as "active", "item_list_line"."min_product_len_1" as "min_product_len_1", "item_list_line"."min_product_len_2" as "min_product_len_2", "item_list_line"."min_baseline_size" as "min_baseline_size", "item_list_line"."seasonal_period" as "seasonal_period", "item_list_line"."supercede_product_id" as "supercede_product_id", "item_list_line"."superceded" as "superceded", "item_list_line"."ref_id" as "ref_id", "item_list_line"."ref" as "ref", "item_list_line"."campaign_id" as "campaign_id", "item_list_line"."source_id" as "source_id", "item_list_line"."medium_id" as "medium_id", "item_list_line"."message_main_attachment_id" as "message_main_attachment_id", "item_list_line"."access_token" as "access_token", "item_list_line"."create_uid" as "create_uid", "item_list_line"."create_date" as "create_date", "item_list_line"."write_uid" as "write_uid", "item_list_line"."write_date" as "write_date" FROM "item_list_line" WHERE "item_list_line".id IN (53098980, 53098981, 53098982, 53098983, 53098984, 53098985, 53098986, 53098987, 53098988, 53098989, 53098990, 53098991, 53098992, 53098993, 53098994, 53098995, 53098996, 53098997, 53098998, 53098999, 53099000, 53099001, 53099002, 53099003, 53099004, 53099005, 53099006, 53099007, 53099008, 53099009, 53099010, 53099011, 53099012, 53099013, 53099014, 53099015, 53099016, 53099017, 53099018, 53099019, 53099020, 53099021, 53099022, 53099023, 53099024, 53099025, 53099026, 53099027, 53099028, 53099029, 53099030, 53099031, 53099032, 53099033, 53099034, 53099035, 53099036, 53099037, 53099038, 53099039, 53099040, 53099041, 53099042, 53099043, 53099044, 53099045, 53099046, 53099047, 53099048, 53099049, 53099050, 53099051, 53099052, 53099053, 53099054, 53099055, 53099056, 53099057, 53099058, 53099059, 53099060, 53099061, 53099062, 53099063, 53099064, 53099065, 53099066, 53099067, 53099068, 53099069, 53099070, 53099071, 53099072, 53099073, 53099074, 53099075, 53099076, 53099077, 53099078, 53099079, 53099080, 53099081, 53099082, 53099083, 53099084, 53099085, 53099086, 53099087, 53099088, 53099089, 53099090, 53099091, 53099092, 53099093, 53099094, 53099095, 53099096, 53099097, 53099098, 53099099, 53099100, 53099101, 53099102, 53099103, 53099104, 53099105, 53099106, 53099107, 53099108, 53099109, 53099110, 53099111, 53099112, 53099113, 53099114, 53099115, 53099116, 53099117, 53099118, 53099119, 53099120, 53099121, 53099122, 53099123, 53099124, 53099125, 53099126, 53099127, 53099128, 53099129, 53099130, 53099131, 53099132, 53099133, 53099134, 53099135, 53099136, 53099137, 53099138, 53099139, 53099140, 53099141, 53099142, 53099143, 53099144, 53099145, 53099146, 53099147, 53099148, 53099149, 53099150, 53099151, 53099152, 53099153, 53099154, 53099155, 53099156, 53099157, 53099158, 53099159, 53099160, 53099161, 53099162, 53099163, 53099164, 53099165, 53099166, 53099167, 53099168, 53099169, 53099170, 53099171, 53099172, 53099173, 53099174, 53099175, 53099176, 53099177, 53099178, 53099179, 53099180, 53099181, 53099182, 53099183, 53099184, 53099185, 53099186, 53099187, 53099188, 53099189, 53099190, 53099191, 53099192, 53099193, 53099194, 53099195, 53099196, 53099197, 53099198, 53099199, 53099200, 53099201, 53099202, 53099203, 53099204, 53099205, 53099206, 53099207, 53099208, 53099209, 53099210, 53099211, 53099212, 53099213, 53099214, 53099215, 53099216, 53099217, 53099218, 53099219, 53099220, 53099221, 53099222, 53099223, 53099224, 53099225, 53099226, 53099227, 53099228, 53099229, 53099230, 53099231, 53099232, 53099233, 53099234, 53099235, 53099236, 53099237, 53099238, 53099239, 53099240, 53099241, 53099242, 53099243, 53099244, 53099245, 53099246, 53099247, 53099248, 53099249, 53099250, 53099251, 53099252, 53099253, 53099254, 53099255, 53099256, 53099257, 53099258, 53099259, 53099260, 53099261, 53099262, 53099263, 53099264, 53099265, 53099266, 53099267, 53099268, 53099269, 53099270, 53099271, 53099272, 53099273, 53099274, 53099275, 53099276, 53099277, 53099278, 53099279, 53099280, 53099281, 53099282, 53099283, 53099284, 53099285, 53099286, 53099287, 53099288, 53099289, 53099290, 53099291, 53099292, 53099293, 53099294, 53099295, 53099296, 53099297, 53099298, 53099299, 53099300, 53099301, 53099302, 53099303, 53099304, 53099305, 53099306, 53099307, 53099308, 53099309, 53099310, 53099311, 53099312, 53099313, 53099314, 53099315, 53099316, 53099317, 53099318, 53099319, 53099320, 53099321, 53099322, 53099323, 53099324, 53099325, 53099326, 53099327, 53099328, 53099329, 53099330, 53099331, 53099332, 53099333, 53099334, 53099335, 53099336, 53099337, 53099338, 53099339, 53099340, 53099341, 53099342, 53099343, 53099344, 53099345, 53099346, 53099347, 53099348, 53099349, 53099350, 53099351, 53099352, 53099353, 53099354, 53099355, 53099356, 53099357, 53099358, 53099359, 53099360, 53099361, 53099362, 53099363, 53099364, 53099365, 53099366, 53099367, 53099368, 53099369, 53099370, 53099371, 53099372, 53099373, 53099374, 53099375, 53099376, 53099377, 53099378, 53099379, 53099380, 53099381, 53099382, 53099383, 53099384, 53099385, 53099386, 53099387, 53099388, 53099389, 53099390, 53099391, 53099392, 53099393, 53099394, 53099395, 53099396, 53099397, 53099398, 53099399, 53099400, 53099401, 53099402, 53099403, 53099404, 53099405, 53099406, 53099407, 53099408, 53099409, 53099410, 53099411, 53099412, 53099413, 53099414, 53099415, 53099416, 53099417, 53099418, 53099419, 53099420, 53099421, 53099422, 53099423, 53099424, 53099425, 53099426, 53099427, 53099428, 53099429, 53099430, 53099431, 53099432, 53099433, 53099434, 53099435, 53099436, 53099437, 53099438, 53099439, 53099440, 53099441, 53099442, 53099443, 53099444, 53099445, 53099446, 53099447, 53099448, 53099449, 53099450, 53099451, 53099452, 53099453, 53099454, 53099455, 53099456, 53099457, 53099458, 53099459, 53099460, 53099461, 53099462, 53099463, 53099464, 53099465, 53099466, 53099467, 53099468, 53099469, 53099470, 53099471, 53099472, 53099473, 53099474, 53099475, 53099476, 53099477, 53099478, 53099479, 53099480, 53099481, 53099482, 53099483, 53099484, 53099485, 53099486, 53099487, 53099488, 53099489, 53099490, 53099491, 53099492, 53099493, 53099494, 53099495, 53099496, 53099497, 53099498, 53099499, 53099500, 53099501, 53099502, 53099503, 53099504, 53099505, 53099506, 53099507, 53099508, 53099509, 53099510, 53099511, 53099512, 53099513, 53099514, 53099515, 53099516, 53099517, 53099518, 53099519, 53099520, 53099521, 53099522, 53099523, 53099524, 53099525, 53099526, 53099527, 53099528, 53099529, 53099530, 53099531, 53099532, 53099533, 53099534, 53099535, 53099536, 53099537, 53099538, 53099539, 53099540, 53099541, 53099542, 53099543, 53099544, 53099545, 53099546, 53099547, 53099548, 53099549, 53099550, 53099551, 53099552, 53099553, 53099554, 53099555, 53099556, 53099557, 53099558, 53099559, 53099560, 53099561, 53099562, 53099563, 53099564, 53099565, 53099566, 53099567, 53099568, 53099569, 53099570, 53099571, 53099572, 53099573, 53099574, 53099575, 53099576, 53099577, 53099578, 53099579, 53099580, 53099581, 53099582, 53099583, 53099584, 53099585, 53099586, 53099587, 53099588, 53099589, 53099590, 53099591, 53099592, 53099593, 53099594, 53099595, 53099596, 53099597, 53099598, 53099599, 53099600, 53099601, 53099602, 53099603, 53099604, 53099605, 53099606, 53099607, 53099608, 53099609, 53099610, 53099611, 53099612, 53099613, 53099614, 53099615, 53099616, 53099617, 53099618, 53099619, 53099620, 53099621, 53099622, 53099623, 53099624, 53099625, 53099626, 53099627, 53099628, 53099629, 53099630, 53099631, 53099632, 53099633, 53099634, 53099635, 53099636, 53099637, 53099638, 53099639, 53099640, 53099641, 53099642, 53099643, 53099644, 53099645, 53099646, 53099647, 53099648, 53099649, 53099650, 53099651, 53099652, 53099653, 53099654, 53099655, 53099656, 53099657, 53099658, 53099659, 53099660, 53099661, 53099662, 53099663, 53099664, 53099665, 53099666, 53099667, 53099668, 53099669, 53099670, 53099671, 53099672, 53099673, 53099674, 53099675, 53099676, 53099677, 53099678, 53099679, 53099680, 53099681, 53099682, 53099683, 53099684, 53099685, 53099686, 53099687, 53099688, 53099689, 53099690, 53099691, 53099692, 53099693, 53099694, 53099695, 53099696, 53099697, 53099698, 53099699, 53099700, 53099701, 53099702, 53099703, 53099704, 53099705, 53099706, 53099707, 53099708, 53099709, 53099710, 53099711, 53099712, 53099713, 53099714, 53099715, 53099716, 53099717, 53099718, 53099719, 53099720, 53099721, 53099722, 53099723, 53099724, 53099725, 53099726, 53099727, 53099728, 53099729, 53099730, 53099731, 53099732, 53099733, 53099734, 53099735, 53099736, 53099737, 53099738, 53099739, 53099740, 53099741, 53099742, 53099743, 53099744, 53099745, 53099746, 53099747, 53099748, 53099749, 53099750, 53099751, 53099752, 53099753, 53099754, 53099755, 53099756, 53099757, 53099758, 53099759, 53099760, 53099761, 53099762, 53099763, 53099764, 53099765, 53099766, 53099767, 53099768, 53099769, 53099770, 53099771, 53099772, 53099773, 53099774, 53099775, 53099776, 53099777, 53099778, 53099779, 53099780, 53099781, 53099782, 53099783, 53099784, 53099785, 53099786, 53099787, 53099788, 53099789, 53099790, 53099791, 53099792, 53099793, 53099794, 53099795, 53099796, 53099797, 53099798, 53099799, 53099800, 53099801, 53099802, 53099803, 53099804, 53099805, 53099806, 53099807, 53099808, 53099809, 53099810, 53099811, 53099812, 53099813, 53099814, 53099815, 53099816, 53099817, 53099818, 53099819, 53099820, 53099821, 53099822, 53099823, 53099824, 53099825, 53099826, 53099827, 53099828, 53099829, 53099830, 53099831, 53099832, 53099833, 53099834, 53099835, 53099836, 53099837, 53099838, 53099839, 53099840, 53099841, 53099842, 53099843, 53099844, 53099845, 53099846, 53099847, 53099848, 53099849, 53099850, 53099851, 53099852, 53099853, 53099854, 53099855, 53099856, 53099857, 53099858, 53099859, 53099860, 53099861, 53099862, 53099863, 53099864, 53099865, 53099866, 53099867, 53099868, 53099869, 53099870, 53099871, 53099872, 53099873, 53099874, 53099875, 53099876, 53099877, 53099878, 53099879, 53099880, 53099881, 53099882, 53099883, 53099884, 53099885, 53099886, 53099887, 53099888, 53099889, 53099890, 53099891, 53099892, 53099893, 53099894, 53099895, 53099896, 53099897, 53099898, 53099899, 53099900, 53099901, 53099902, 53099903, 53099904, 53099905, 53099906, 53099907, 53099908, 53099909, 53099910, 53099911, 53099912, 53099913, 53099914, 53099915, 53099916, 53099917, 53099918, 53099919, 53099920, 53099921, 53099922, 53099923, 53099924, 53099925, 53099926, 53099927, 53099928, 53099929, 53099930, 53099931, 53099932, 53099933, 53099934, 53099935, 53099936, 53099937, 53099938, 53099939, 53099940, 53099941, 53099942, 53099943, 53099944, 53099945, 53099946, 53099947, 53099948, 53099949, 53099950, 53099951, 53099952, 53099953, 53099954, 53099955, 53099956, 53099957, 53099958, 53099959, 53099960, 53099961, 53099962, 53099963, 53099964, 53099965, 53099966, 53099967, 53099968, 53099969, 53099970, 53099971, 53099972, 53099973, 53099974, 53099975, 53099976, 53099977, 53099978, 53099979)
Date: 2024-09-07 01:52:11