wso2 - Problem commad merge API_REQ_USER_BROW_SUMMARY

87 Views Asked by At

I'm using Wso2 Analytic, but when I was checking my database I found the following command executing by many time.

I'm use Oracle database version 11.2.0.4.

WSO2 API Manager Analytics Version: 2.1.0

Command:

 MERGE INTO API_REQ_USER_BROW_SUMMARY dest USING( SELECT :1 api, :2
version, :3 apiPublisher, :4 tenantDomain, :5 total_request_count, :6 
year, :7 month, :8 day, :9 requestTime, :10 os, :11 browser FROM dual) 
src ON(dest.api=src.api AND dest.version=src.version AND 
dest.apiPublisher=src.apiPublisher AND dest.year=src.year AND 
dest.month=src.month AND dest.day=src.day AND dest.os=src.os AND 
dest.browser=src.browser AND dest.tenantDomain=src.tenantDomain)WHEN NOT 
MATCHED THEN INSERT(api, version, apiPublisher, tenantDomain, 
total_request_count, year, month, day, requestTime, os, browser) 
VALUES(src.api, src.version, src.apiPublisher, src.tenantDomain, 
src.total_request_count, src.year, src.month, src.day, src.requestTime, 
src.os, src.browser) WHEN MATCHED THEN UPDATE SET 
dest.total_request_count=src.total_request_count, 
dest.requestTime=src.requestTime
1

There are 1 best solutions below

3
On

This is the expected behavior. DAS works with DB through a Data Access Layer(DAL). DAL uses merge queries to perform data inserts. When events does not come in batches this query can run on the DB per each event which will lead to above behavior.