swaroopak commented on a change in pull request #474: PHOENIX-5224 Change
'Statement' to 'PreparedStatement' for better performance
URL: https://github.com/apache/phoenix/pull/474#discussion_r272709431
##########
File path:
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexRebuildIncrementDisableCountIT.java
##########
@@ -168,10 +169,14 @@ private static void mutateRandomly(Connection conn,
String tableName, int maxOrg
try {
Statement stmt = conn.createStatement();
+ String sqlStr = "UPSERT INTO " + tableName + " VALUES(?, ?, ?,
?)";
+ PreparedStatement stmt = conn.prepareStatement(sqlStr);
for (int i = 0; i < 10000; i++) {
- stmt.executeUpdate(
- "UPSERT INTO " + tableName + " VALUES('" +
getRandomOrgId(maxOrgId) + "'," + i
- + "," + (i + 1) + "," + (i + 2) + ")");
+ stmt.setString(1, getRandomOrgId(maxOrgId);
Review comment:
missing closing parenthesis.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services