Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039407Retail ModulesWeb POSpublic2018-09-03 09:022018-10-05 10:03
ALopetegui 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
RR17Q2 
RR18Q4RR18Q4 
marvintm
No
0039407: Slow query in logical munin monitoring obmobc_logclient
There is a logigal monitoring pluging to obmobc_logclient which counts obmobc_logclient erros and is very slow because it needs an index.

This is the query:

SELECT 'errors', count (*) FROM obmobc_logclient WHERE loglevel = 'Error';

It takes 8 seconds on average and 1 minute maximum.

High volume of data in obmobc_logclient and run the query above.
Create Partial Index:

on obmobc_logclient (loglevel) where loglevel = 'ERROR'

No tags attached.
blocks defect 0039213 closed ranjith_qualiantech_com Slow query in logical munin monitoring obmobc_logclient 
Issue History
2018-10-05 08:19ranjith_qualiantech_comTypedefect => backport
2018-10-05 08:19ranjith_qualiantech_comTarget Version => RR18Q4
2018-10-05 08:48hgbotCheckin
2018-10-05 08:48hgbotNote Added: 0107168
2018-10-05 08:48hgbotStatusscheduled => resolved
2018-10-05 08:48hgbotResolutionopen => fixed
2018-10-05 08:48hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ac60ad1039af1091dd8e05610300b6b9e74121d6 [^] => http://code.openbravo.com/retail/backports/3.0RR18Q4/org.openbravo.mobile.core/rev/10949b2008f57f3bbbd456760ecdbf7226905dc7 [^]
2018-10-05 10:03marvintmStatusresolved => closed
2018-10-05 10:03marvintmFixed in Version => RR18Q4

Notes
(0107168)
hgbot   
2018-10-05 08:48   
Repository: retail/backports/3.0RR18Q4/org.openbravo.mobile.core
Changeset: 10949b2008f57f3bbbd456760ecdbf7226905dc7
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Oct 05 12:18:40 2018 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR18Q4/org.openbravo.mobile.core/rev/10949b2008f57f3bbbd456760ecdbf7226905dc7 [^]

Fixed issue 39407 : Added Partial Index to Logclient table for loglevel as Error

* Partial index must be case sensitive, So LOGLEVEL should be 'Error'

---
M src-db/database/model/tables/OBMOBC_LOGCLIENT.xml
---