[
https://issues.apache.org/jira/browse/HIVE-21487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16798224#comment-16798224
]
Todd Lipcon commented on HIVE-21487:
------------------------------------
Seems that this cluster is in some state where all compactions are failing (I
think due to some other testing going on with a strange setup). The query is
likely coming from CompactionTxnHandler.checkFailedCompactions.
It's possible this isn't a hot enough code path to be worth a really large
index, but perhaps it's worth one at least on ethe database/table level.
> COMPLETED_COMPACTIONS table missing appropriate indexes
> -------------------------------------------------------
>
> Key: HIVE-21487
> URL: https://issues.apache.org/jira/browse/HIVE-21487
> Project: Hive
> Issue Type: Bug
> Affects Versions: 3.1.1
> Reporter: Todd Lipcon
> Priority: Major
>
> Looking at a MySQL install where HMS is pointed on Hive 3.1, I see a constant
> stream of queries of the form:
> {code}
> select CC_STATE from COMPLETED_COMPACTIONS where CC_DATABASE =
> 'tpcds_orc_exact_1000' and CC_TABLE = 'catalog_returns' and CC_PARTITION =
> 'cr_returned_date_sk=2452851' and CC_STATE != 'a' order by CC_ID desc;
> {code}
> but the COMPLETED_COMPACTIONS table has no index. In this case it's resulting
> in a full table scan over 115k rows, which takes around 100ms.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)