wso2 / api-manager

All issues, tasks, improvements and new features of WSO2 API Manager
Apache License 2.0
34 stars 8 forks source link

[MGW-ANALYTICS-3.1.0] High resource utilization for processing AM_USAGE_UPLOADED_FILES existence validation query for each file processing call #2989

Open imedyaosandi opened 4 months ago

imedyaosandi commented 4 months ago

Description

For each set of file processing we are checking the existence of the AM_USAGE_UPLOADED_FILES table[1] using the below validation query.

SELECT 1 FROM AM_USAGE_UPLOADED_FILES

Seems the validation query try to process all data in the table before returning the result for the validation query.

[1] https://github.com/wso2/analytics-apim/blob/master/components/org.wso2.sp.extension.siddhi.io.mgwfile/src/main/java/org/wso2/extension/siddhi/io/mgwfile/dao/MGWFileSourceDAO.java#L110

Steps to Reproduce

n/a

Affected Component

Analytics

Version

3.1.0

Environment Details (with versions)

No response

Relevant Log Output

No response

Related Issues

No response

Suggested Labels

No response

BLasan commented 4 months ago

Issue will be closed once the PR is merged @RakhithaRR