Skip to content
Snippets Groups Projects
Commit 54fa0ea9 authored by kruthar's avatar kruthar
Browse files

[jdbc] added ORDER BY clause to scan query

This will ensure record ordering my the primary key.
parent cffe84ac
No related branches found
No related tags found
No related merge requests found
......@@ -305,6 +305,8 @@ public class JdbcDBClient extends DB implements JdbcDBClientConstants {
select.append(" WHERE ");
select.append(PRIMARY_KEY);
select.append(" >= ?");
select.append(" ORDER BY ");
select.append(PRIMARY_KEY);
select.append(" LIMIT ?;");
PreparedStatement scanStatement = getShardConnectionByKey(key).prepareStatement(select.toString());
if (this.jdbcFetchSize != null) scanStatement.setFetchSize(this.jdbcFetchSize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment