Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034917Openbravo ERP02. Master data managementpublic2017-01-11 14:042017-01-25 14:40
qualitic_tecnico 
Triage Omni OMS 
normalminorhave not tried
newopen 
30
 
 
Google Chrome, Mozilla Firefox
Core
No
0034917: Deletion of a business partner requires an excessive long time due to trigger for constraint c_buspartner_fact_acct
Deletion of a business partner requires an excessive long time, after upgrading from PR16Q3.3 to PR16Q4 we noticed that deleting a Business Partner in the application takes an excessive amount of time.
An explain plan was run some times in a test environment (database fresh start) against table C_BPARTNER containing around 25K lines.
What we noticed is that trigger for constraint c_buspartner_fact_acct is taking too long to end execution:

"Trigger for constraint c_buspartner_fact_acct: time=10254.363 calls=1"

this means that to delete a single business partner could take even more than 10 seconds before giving back control to user.

BEGIN;
EXPLAIN ANALYSE
DELETE FROM C_BPARTNER WHERE C_BPARTNER_ID = '1E8AF074EB814998A35CD148F928092F';
ROLLBACK;

------------------------------------------------------------------
QUERY PLAN
Delete on c_bpartner (cost=0.41..8.43 rows=1 width=6) (actual time=0.224..0.224 rows=0 loops=1)
  -> Index Scan using c_bpartner_idsalesrep on c_bpartner (cost=0.41..8.43 rows=1 width=6) (actual time=0.052..0.056 rows=1 loops=1)
        Index Cond: ((c_bpartner_id)::text = '1E8AF074EB814998A35CD148F928092F'::text)
Trigger for constraint a_amortline_acctd_bpartner: time=0.898 calls=1
Trigger for constraint a_asset_c_bpartner: time=0.777 calls=1
Trigger for constraint ad_clientinfo_c_bpartnercashtr: time=0.440 calls=1
Trigger for constraint ad_orginfo_c_bpartner: time=0.407 calls=1
Trigger for constraint ad_user_c_bpartner: time=0.419 calls=1
Trigger for constraint c_acctschema_element_c_bpartne: time=0.452 calls=1
Trigger for constraint c_bank_c_bpartner: time=0.540 calls=1
Trigger for constraint c_bp_bankaccount_c_bpartner: time=0.190 calls=1
Trigger for constraint c_bp_customer_acct_c_bpartner: time=0.245 calls=1
Trigger for constraint c_bp_employee_acct_c_bpartner: time=0.347 calls=1
Trigger for constraint c_bp_salcategory_c_bpartner: time=0.457 calls=1
Trigger for constraint c_bp_withholding_c_bpartner: time=0.169 calls=1
Trigger for constraint c_bpartner_bpartner_parent: time=10.250 calls=1
Trigger for constraint c_bpartner_c_bpartner: time=8.579 calls=1
Trigger for constraint c_bpartner_discount_c_bpartner: time=0.425 calls=1
Trigger for constraint c_bpartner_location_c_bpartner: time=0.216 calls=1
Trigger for constraint c_bpartner_m_rappel_bpartner: time=0.317 calls=1
Trigger for constraint c_bpartner_m_requisition: time=1.519 calls=1
Trigger for constraint c_bpartner_m_requisitionline: time=3.823 calls=1
Trigger for constraint c_bpartner_maweemployee: time=0.447 calls=1
Trigger for constraint c_bpartner_mrp_run_production: time=0.309 calls=1
Trigger for constraint c_bpartner_mrp_run_purchase: time=0.280 calls=1
Trigger for constraint c_bpartner_mrp_salesforecast: time=0.355 calls=1
Trigger for constraint c_buspartner_c_bp_vendor_acct: time=0.160 calls=1
Trigger for constraint c_buspartner_c_budgetline: time=0.306 calls=1
Trigger for constraint c_buspartner_fact_acct: time=10254.363 calls=1 <-------------------------
Trigger for constraint c_buspartner_m_product_po: time=0.413 calls=1
Trigger for constraint c_commission_c_bpartner: time=0.288 calls=1
Trigger for constraint c_commissionline_c_bpartner: time=0.168 calls=1
Trigger for constraint c_debt_payment_c_bpartner: time=0.252 calls=1
Trigger for constraint c_externalpos_c_bpartner: time=0.166 calls=1
Trigger for constraint c_invoice_c_bpartner: time=0.212 calls=1
Trigger for constraint c_invoiceline_acctd_bpartner: time=0.168 calls=1
Trigger for constraint c_invoiceline_c_bpartner: time=1752.844 calls=1
Trigger for constraint c_order_c_bpartner: time=0.512 calls=1
Trigger for constraint c_order_dropship_bpartner: time=1.628 calls=1
Trigger for constraint c_orderline_acctd_bpartner: time=0.287 calls=1
Trigger for constraint c_orderline_c_bpartner: time=2.785 calls=1
Trigger for constraint c_poc_email_c_bpartner: time=0.270 calls=1
Trigger for constraint c_project_c_bpartner: time=0.300 calls=1
Trigger for constraint c_project_responsible: time=0.346 calls=1
Trigger for constraint c_project_vendor_c_bpartner: time=0.232 calls=1
Trigger for constraint c_projectproposal_c_bpartner: time=0.237 calls=1
Trigger for constraint c_taxpayment_c_bpartner: time=0.349 calls=1
Trigger for constraint c_validcombination_c_bpartner: time=0.919 calls=1
Trigger for constraint c_withholding_beneficiary: time=0.257 calls=1
Trigger for constraint em_aeat349_cinvrev_fk_cbp: time=0.221 calls=1
Trigger for constraint em_obretco_org_bpartner: time=0.254 calls=1
Trigger for constraint fin_bankstatline_cbpartner: time=0.350 calls=1
Trigger for constraint fin_c_bpartner_payments: time=1315.212 calls=1
Trigger for constraint fin_c_bpartner_yment_proposal: time=0.289 calls=1
Trigger for constraint fin_doubtful_debt_c_bpartner: time=0.229 calls=1
Trigger for constraint fin_doubtful_debt_run_bp: time=0.130 calls=1
Trigger for constraint fin_finacc_bpartner: time=0.169 calls=1
Trigger for constraint fin_finacc_trans_c_bpartner: time=1124.048 calls=1
Trigger for constraint fin_scheduledetail_c_bpartner: time=0.822 calls=1
Trigger for constraint gl_journal_c_bpartner_id: time=12.502 calls=1
Trigger for constraint gl_journalline_c_bpartner: time=301.060 calls=1
Trigger for constraint m_discountschemaline_c_bpartne: time=0.733 calls=1
Trigger for constraint m_inout_c_bpartner: time=0.649 calls=1
Trigger for constraint m_inoutline_acctd_bpartner: time=0.523 calls=1
Trigger for constraint m_inoutline_c_bpartner: time=3.394 calls=1
Trigger for constraint m_offer_bpartner_bpartner: time=0.578 calls=1
Trigger for constraint m_product_c_bpartner: time=0.847 calls=1
Trigger for constraint m_product_customer_c_bpartner: time=0.518 calls=1
Trigger for constraint m_product_template_c_bpartner: time=0.497 calls=1
Trigger for constraint m_reservation_bpartner: time=0.520 calls=1
Trigger for constraint m_shipper_c_bpartner: time=0.471 calls=1
Trigger for constraint m_warehouse_shipper_c_bpartner: time=0.494 calls=1
Trigger for constraint ma_maint_worker_c_bpartner: time=0.463 calls=1
Trigger for constraint ma_pl_employee_c_bpartner: time=0.472 calls=1
Trigger for constraint mrp_run_purchase_vendor: time=0.500 calls=1
Trigger for constraint mrp_run_purchaseline_c_bpartne: time=0.510 calls=1
Trigger for constraint obanaly_fact_disc_c_bp_fk: time=0.666 calls=1
Trigger for constraint obanaly_fact_order_c_bp_fk: time=0.848 calls=1
Trigger for constraint obanaly_fact_soh_bpartner_fk: time=0.689 calls=1
Trigger for constraint obfchp_cp_c_bpartner_id: time=0.470 calls=1
Trigger for constraint obirb_invbookline_c_bpartner: time=0.513 calls=1
Trigger for constraint obpos_applications_bpartner: time=0.552 calls=1
Trigger for constraint rem_instruction_bpartner: time=0.490 calls=1
Trigger for constraint s_timeexpense_c_bpartner: time=0.486 calls=1
Trigger for constraint s_timeexpenseline_c_bpartner: time=0.552 calls=1
Total runtime: 14821.503 ms
Create a fresh new business partner in Openbravo and right after that delete it
PR16Q4, trigger
Issue History
2017-01-11 14:04qualitic_tecnicoNew Issue
2017-01-11 14:04qualitic_tecnicoAssigned To => Triage Finance
2017-01-11 14:04qualitic_tecnicoWeb browser => Google Chrome, Mozilla Firefox
2017-01-11 14:04qualitic_tecnicoModules => Core
2017-01-11 14:04qualitic_tecnicoTriggers an Emergency Pack => No
2017-01-11 15:52qualitic_tecnicoTag Attached: PR16Q4
2017-01-11 15:52qualitic_tecnicoTag Attached: trigger
2017-01-25 14:40qualitic_tecnicoNote Added: 0093817

Notes
(0093817)
qualitic_tecnico   
2017-01-25 14:40   
This issue has been reproduces various times (Reproducibility field has been wrong filled)