[
https://issues.apache.org/jira/browse/HIVE-28828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HIVE-28828:
----------------------------------
Labels: pull-request-available (was: )
> Add index for TXNS table
> ------------------------
>
> Key: HIVE-28828
> URL: https://issues.apache.org/jira/browse/HIVE-28828
> Project: Hive
> Issue Type: Improvement
> Reporter: Wechar
> Assignee: Wechar
> Priority: Major
> Labels: pull-request-available
> Attachments: screenshot-1.png
>
>
> {{TXNS}} table has some common query like:
> {code:sql}
> select count(*) from TXNS where txn_state = 'o';
> select min(txn_id) from TXNS where txn_state='o';
> {code}
> It could not hit any index, and may cause heavy load for backend db, we can
> add an index for it:
> {code:sql}
> CREATE UNIQUE INDEX TXN_STATE_IDX ON TXNS (TXN_STATE, TXN_ID);
> {code}
> And after add the index, our db cpu usage decrease a lot.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)