Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038289
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] I. Performanceminoralways2018-04-06 13:592018-04-13 10:53
ReporterngarciaView Statuspublic 
Assigned Toalostale 
PriorityhighResolutionfixedFixed in Version3.0PR18Q3
StatusclosedFix in branchFixed in SCM revision0b70358a2e29
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038289: Log Clean Up Process takes too long to delete the records in AD_PROCESS_REQUEST window with Process Groups

DescriptionLog Clean Up Process takes too long to delete the records in AD_PROCESS_REQUEST window with Process Groups

Having an environment with around 700000 records to be deleted in ad_process_request (status = 'COM' created < now()-15), the following query lasts 22 hours

delete from AD_Process_Request where Created<now()-15 and Status='COM' and AD_Client_ID=<>;

Result of Explain Analyze was:

'Delete on ad_process_request (cost=0.00..380218.30 rows=718678 width=6) (actual time=46464.380..46464.380 rows=0 loops=1)' ' -> Seq Scan on ad_process_request (cost=0.00..380218.30 rows=718678 width=6) (actual time=0.031..2275.472 rows=720995 loops=1)' ' Filter: (((status)::text = 'COM'::text) AND ((ad_client_id)::text = '101C8C9C4A8D4C84857E3F5FBD722757'::text) AND (created < (now() - 15::numeric)))' ' Rows Removed by Filter: 162711' 'Trigger for constraint ad_process_request_group: time=79140555.117 calls=720995' 'Trigger for constraint ad_process_run_ad_process_requ: time=27889.646 calls=720995' 'Trigger ad_process_request_trg: time=12800.440 calls=720995' 'Total runtime: 79215399.399 ms'

Steps To ReproduceAsk for an environment in which the problem can be reproduced in case is needed
Proposed SolutionCreate an index similar to

CREATE INDEX ad_process_reqgroup_idx
  ON ad_process_request
  USING btree
  (ad_process_request_group_id COLLATE pg_catalog."default")
   WHERE ad_process_request_group_id IS NOT NULL
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0038291 closedcaristu Modules Log Clean Up process doesn't finish deleting C_IMPORT_ENTRY_ARCHIVE table with big amount of data 

-  Notes
(0103870)
hgbot (developer)
2018-04-13 09:35

Repository: erp/devel/pi
Changeset: 0b70358a2e29459502143a08f3ba30ae440be92f
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Apr 13 09:35:13 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0b70358a2e29459502143a08f3ba30ae440be92f [^]

fixed 38289: slow Log Clean Up with records in AD_PROCESS_REQUEST using Groups

  Added index to ad_process_request.ad_process_request_group_id to prevent seq
  scans when deleing on this table having requests linked to groups.

---
M src-db/database/model/tables/AD_PROCESS_REQUEST.xml
---
(0103871)
caristu (developer)
2018-04-13 10:53

Reviewed

- Issue History
Date Modified Username Field Change
2018-04-06 13:59 ngarcia New Issue
2018-04-06 13:59 ngarcia Assigned To => platform
2018-04-06 13:59 ngarcia Modules => Core
2018-04-06 13:59 ngarcia Triggers an Emergency Pack => No
2018-04-06 13:59 ngarcia Issue Monitored: networkb
2018-04-06 14:00 ngarcia Priority urgent => high
2018-04-06 14:00 ngarcia Severity major => minor
2018-04-09 10:10 Practics Issue Monitored: Practics
2018-04-13 09:23 alostale Tag Attached: Performance
2018-04-13 09:23 alostale Relationship added related to 0038291
2018-04-13 09:32 alostale Assigned To platform => alostale
2018-04-13 09:32 alostale Review Assigned To => caristu
2018-04-13 09:35 hgbot Checkin
2018-04-13 09:35 hgbot Note Added: 0103870
2018-04-13 09:35 hgbot Status new => resolved
2018-04-13 09:35 hgbot Resolution open => fixed
2018-04-13 09:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0b70358a2e29459502143a08f3ba30ae440be92f [^]
2018-04-13 10:53 caristu Note Added: 0103871
2018-04-13 10:53 caristu Status resolved => closed
2018-04-13 10:53 caristu Fixed in Version => 3.0PR18Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker