Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039213Retail ModulesWeb POSpublic2018-09-03 09:022018-10-05 10:03
ALopetegui 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
RR17Q2 
RR19Q1 
marvintm
No
0039213: 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.
depends on backport 0039407RR18Q4 closed ranjith_qualiantech_com Slow query in logical munin monitoring obmobc_logclient 
patch issue 39213 source mobilecore.patch (1,141) 2018-09-10 07:46
https://issues.openbravo.com/file_download.php?file_id=12117&type=bug
Issue History
2018-09-03 09:02ALopeteguiNew Issue
2018-09-03 09:02ALopeteguiAssigned To => Retail
2018-09-03 09:02ALopeteguiTriggers an Emergency Pack => No
2018-09-03 09:40jorge-garciaResolution time => 1537135200
2018-09-04 13:45ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2018-09-04 13:45ranjith_qualiantech_comStatusnew => scheduled
2018-09-10 07:46ranjith_qualiantech_comFile Added: issue 39213 source mobilecore.patch
2018-09-13 15:34hgbotCheckin
2018-09-13 15:34hgbotNote Added: 0106749
2018-09-13 15:34hgbotStatusscheduled => resolved
2018-09-13 15:34hgbotResolutionopen => fixed
2018-09-13 15:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ac60ad1039af1091dd8e05610300b6b9e74121d6 [^]
2018-09-14 11:05marvintmReview Assigned To => marvintm
2018-09-14 11:05marvintmStatusresolved => closed
2018-09-14 11:05marvintmFixed in Version => RR18Q4
2018-10-02 10:36ALopeteguiNote Added: 0107112
2018-10-02 10:53ALopeteguiNote Added: 0107113
2018-10-02 10:53ALopeteguiStatusclosed => new
2018-10-02 10:53ALopeteguiResolutionfixed => open
2018-10-02 10:53ALopeteguiFixed in VersionRR18Q4 =>
2018-10-05 08:19ranjith_qualiantech_comStatusnew => scheduled
2018-10-05 08:20hgbotCheckin
2018-10-05 08:20hgbotNote Added: 0107167
2018-10-05 08:20hgbotStatusscheduled => resolved
2018-10-05 08:20hgbotResolutionopen => fixed
2018-10-05 08:20hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ac60ad1039af1091dd8e05610300b6b9e74121d6 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/21fe2659eb368a55008018f7b21f3ff9c99e83ee [^]
2018-10-05 10:03marvintmStatusresolved => closed
2018-10-05 10:03marvintmFixed in Version => RR19Q1

Notes
(0106749)
hgbot   
2018-09-13 15:34   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ac60ad1039af1091dd8e05610300b6b9e74121d6
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Sep 13 19:04:00 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ac60ad1039af1091dd8e05610300b6b9e74121d6 [^]

Fixed issue 39213 : Added Partial Index to Logclient table for loglevel as error

---
M src-db/database/model/tables/OBMOBC_LOGCLIENT.xml
---
(0107112)
ALopetegui   
2018-10-02 10:35   
The where clause must be 'Error' instead of 'ERROR' because loglevel column has 'Error' values in OBMOBC_LOGCLIENT table.
(0107113)
ALopetegui   
2018-10-02 10:53   
The where clause must be 'Error' instead of 'ERROR' because loglevel column has 'Error' values in OBMOBC_LOGCLIENT table.
(0107167)
hgbot   
2018-10-05 08:20   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 21fe2659eb368a55008018f7b21f3ff9c99e83ee
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Oct 05 11:49:51 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/21fe2659eb368a55008018f7b21f3ff9c99e83ee [^]

Fixed issue 39213 : 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
---