pan3793 commented on code in PR #5204:
URL: https://github.com/apache/hive/pull/5204#discussion_r2054512975


##########
metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java:
##########
@@ -1964,4 +1964,13 @@ public List<SQLPrimaryKey> getPrimaryKeys(String 
db_name, String tbl_name) throw
     }
     return ret;
   }
+
+  long updateTableParam(Table table, String key, String expectedValue, String 
newValue) {
+    String queryText = String.format("UPDATE \"TABLE_PARAMS\" SET 
\"PARAM_VALUE\" = ? " +
+            "WHERE \"PARAM_KEY\" = ? AND \"PARAM_VALUE\" = ? AND \"TBL_ID\" IN 
" +

Review Comment:
   Just for reference, we hit performance issues in our production environment 
on executing this SQL. Changing the `IN` to `=` would solve this issue, at 
least for MySQL 5.7
   
   <img width="1204" alt="image" 
src="https://github.com/user-attachments/assets/642c8be4-18ec-457f-82fa-7aeaf93f421d";
 />
   <img width="1205" alt="image" 
src="https://github.com/user-attachments/assets/5c296295-1fdb-40aa-81d7-030ec2d148e6";
 />
   



-- 
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: gitbox-unsubscr...@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to