From ff127d2b25f61b9499e1129d91a2534b32b72f4c Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 16 Aug 2013 17:39:49 -0700 Subject: [PATCH] Fix 'NetworkOPs::countAccountTxs' taking way too long. --- modules/ripple_app/misc/NetworkOPs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ripple_app/misc/NetworkOPs.cpp b/modules/ripple_app/misc/NetworkOPs.cpp index ef0134798e..d8c9c28d27 100644 --- a/modules/ripple_app/misc/NetworkOPs.cpp +++ b/modules/ripple_app/misc/NetworkOPs.cpp @@ -1217,7 +1217,8 @@ NetworkOPs::transactionsSQL (std::string selection, const RippleAddress& account std::string sql = 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 " "ORDER BY AccountTransactions.LedgerSeq %s, AccountTransactions.TxnSeq %s, AccountTransactions.TransID %s " "LIMIT %u, %u;")