Fix 'NetworkOPs::countAccountTxs' taking way too long.

This commit is contained in:
JoelKatz
2013-08-16 17:39:49 -07:00
parent 9bc96bc558
commit ff127d2b25

View File

@@ -1217,7 +1217,8 @@ NetworkOPs::transactionsSQL (std::string selection, const RippleAddress& account
std::string sql = std::string sql =
boost::str (boost::format ("SELECT %s FROM " boost::str (boost::format ("SELECT %s FROM "
"AccountTransactions INNER JOIN Transactions ON Transactions.TransID = AccountTransactions.TransID " "AccountTransactions INDEXED BY AcctTxIndex INNER JOIN Transactions "
"ON Transactions.TransID = AccountTransactions.TransID "
"WHERE Account = '%s' %s %s " "WHERE Account = '%s' %s %s "
"ORDER BY AccountTransactions.LedgerSeq %s, AccountTransactions.TxnSeq %s, AccountTransactions.TransID %s " "ORDER BY AccountTransactions.LedgerSeq %s, AccountTransactions.TxnSeq %s, AccountTransactions.TransID %s "
"LIMIT %u, %u;") "LIMIT %u, %u;")