forked from Qortal/qortal
Improve HSQLDB query for finding latest AT state data
This commit is contained in:
parent
d4ac87f91d
commit
ab1de1aafa
@ -268,7 +268,8 @@ public class HSQLDBATRepository implements ATRepository {
|
||||
+ "FROM ATStates "
|
||||
+ "WHERE AT_address = ? "
|
||||
+ "ORDER BY height DESC "
|
||||
+ "LIMIT 1";
|
||||
+ "LIMIT 1 "
|
||||
+ "USING INDEX";
|
||||
|
||||
try (ResultSet resultSet = this.repository.checkedExecute(sql, atAddress)) {
|
||||
if (resultSet == null)
|
||||
@ -299,7 +300,8 @@ public class HSQLDBATRepository implements ATRepository {
|
||||
+ "FROM ATStates "
|
||||
+ "WHERE ATStates.AT_address = ATs.AT_address "
|
||||
+ "ORDER BY height DESC "
|
||||
+ "LIMIT 1"
|
||||
+ "LIMIT 1 "
|
||||
+ "USING INDEX"
|
||||
+ ") AS FinalATStates "
|
||||
+ "WHERE code_hash = ? ");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user