You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Riju Trivedi (Jira)" <ji...@apache.org> on 2025/02/26 00:31:00 UTC
[jira] [Created] (HIVE-28787) Improve/optimize Delete failed txns Sql
Riju Trivedi created HIVE-28787:
-----------------------------------
Summary: Improve/optimize Delete failed txns Sql
Key: HIVE-28787
URL: https://issues.apache.org/jira/browse/HIVE-28787
Project: Hive
Issue Type: Improvement
Reporter: Riju Trivedi
The current cleanEmptyAbortedTxn() query
{code:java}
DELETE FROM "TXNS" WHERE "TXN_ID" NOT IN (SELECT "TC_TXNID" FROM "TXN_COMPONENTS") AND "TXN_STATE" = 'a';{code}
is inefficient especially in PostgreSQL, leading to very high execution times when entries get piled up.
Can we re-write this query using LEFT JOIN or WHERE EXISTS for better performance?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)