wecharyu opened a new pull request, #5700:
URL: https://github.com/apache/hive/pull/5700

   ### What changes were proposed in this pull request?
   Add unique index for `TXNS(TXN_STATE, TXN_ID)`.
   
   ### Why are the changes needed?
   `metastore.task.threads.remote` service would run periodically, it would 
query for TXNS table like:
   
https://github.com/apache/hive/blob/2d528556b69c1ec011e83f69d2a2fdcfb78b356e/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/service/AcidOpenTxnsCounterService.java#L49-L53
   
   The `coundOpenTxns()` could not hit index, add this index could improve the 
performance.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### Is the change a dependency upgrade?
   No.
   
   ### How was this patch tested?
   Comparing the backend db cpu load after update.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to