Skip to content

Commit 4c6f915

Browse files
committed
added sql_no_cache and AS for performance
1 parent e5858cf commit 4c6f915

File tree

1 file changed

+3
-3
lines changed
  • src/main/java/com/geckotechnology/mySqlDataCompare

1 file changed

+3
-3
lines changed

src/main/java/com/geckotechnology/mySqlDataCompare/Table.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,17 @@ public StringBuilder createPKColumnsTuple() {
8686

8787
public StringBuilder createSQLToGetAllRows() {
8888
StringBuilder sb = new StringBuilder();
89-
sb.append("select ");
89+
sb.append("select sql_no_cache ");
9090
sb.append(buildSequence(primaryKey.getColumnsSortedByPrimaryKeyOrdinalPosition(),
9191
"concat(", ")",
9292
"", "", // no need coalesce since it is PK
9393
", '" + COLUMN_SEPARATOR + "', "));
94-
sb.append(" PK ,");
94+
sb.append(" as PK ,");
9595
sb.append(buildSequence(getColumnsSortedByColumnName(),
9696
"md5(concat(", "))",
9797
"coalesce(", ",'" + NULL_VALUE + "')",
9898
", '" + COLUMN_SEPARATOR + "', "));
99-
sb.append(" MD5 from ");
99+
sb.append(" as MD5 from ");
100100
sb.append(getTableName());
101101
sb.append(" order by ");
102102
sb.append(buildSequence(primaryKey.getColumnsSortedByPrimaryKeyOrdinalPosition(),

0 commit comments

Comments
 (0)