sourabhaggrawal opened a new pull request #420:
URL: https://github.com/apache/pulsar-manager/pull/420


   
   
   Fixes #419
   
   *(or if this PR is one task of a github issue, please add `Master Issue: 
#<xyz>` to link to the master issue.)*
   
   Master Issue: #<xyz>
   
   ### Motivation
   
   Tenants tab in Pulsar Manager is slow and takes forever to load sometime.
   
   ### Modifications
   We are using Postgres for data storage and noticed that while loading 
tenants page it is stuck at one query and takes forever to load. Tenants page 
request load data from topics_stats table and load only one topic status with 
latest timestamp. The query used here 
https://github.com/sourabhaggrawal/pulsar-manager/blob/5343f09f381729ef6798ddf1bffccd55aaff04b8/src/main/java/com/manager/pulsar/mapper/TopicsStatsMapper.java#L37
 fetch only single record by ordering on the timestamp column everytime, with 
too many records this query takes too much time .
   
   Added the index to get result faster from the query.
   ### Verifying this change
   - [ ] Make sure that the change passes the `./gradlew build` checks.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to