diff --git a/Builds/VisualStudio2013/RippleD.vcxproj b/Builds/VisualStudio2013/RippleD.vcxproj
index ba6cd7f7c..f69aaadb4 100644
--- a/Builds/VisualStudio2013/RippleD.vcxproj
+++ b/Builds/VisualStudio2013/RippleD.vcxproj
@@ -4496,6 +4496,8 @@
+
+
diff --git a/Builds/VisualStudio2013/RippleD.vcxproj.filters b/Builds/VisualStudio2013/RippleD.vcxproj.filters
index d21c7f728..c9052fc3f 100644
--- a/Builds/VisualStudio2013/RippleD.vcxproj.filters
+++ b/Builds/VisualStudio2013/RippleD.vcxproj.filters
@@ -5274,6 +5274,9 @@
soci\src\core
+
+ soci\src\core
+
sqlite
diff --git a/src/ripple/app/data/tests/SociDB.test.cpp b/src/ripple/app/data/tests/SociDB.test.cpp
index c3f9da828..af8c29fbc 100644
--- a/src/ripple/app/data/tests/SociDB.test.cpp
+++ b/src/ripple/app/data/tests/SociDB.test.cpp
@@ -354,22 +354,6 @@ public:
soci::into (validationsLH);
expect (ledgersLS.size () == numRows &&
validationsLH.size () == numRows);
- s << "DELETE FROM Validations WHERE LedgerHash IN "
- "(SELECT Ledgers.LedgerHash FROM Validations JOIN Ledgers ON "
- "Validations.LedgerHash=Ledgers.LedgerHash WHERE "
- "Ledgers.LedgerSeq < :num);",
- soci::use (numRows / 2);
- validationsLH.resize (numRows * 2);
- s << "SELECT LedgerHash FROM Validations;",
- soci::into (validationsLH);
- expect (validationsLH.size () == numRows / 2);
- for (auto i = ledgerHashes.begin () + numRows / 2;
- i != ledgerHashes.end ();
- ++i)
- {
- expect (find (validationsLH.begin (), validationsLH.end (), *i)
- != validationsLH.end ());
- }
}
using namespace boost::filesystem;
// Remove the database
diff --git a/src/ripple/app/misc/SHAMapStoreImp.cpp b/src/ripple/app/misc/SHAMapStoreImp.cpp
index 837aa47e0..4ed922e28 100644
--- a/src/ripple/app/misc/SHAMapStoreImp.cpp
+++ b/src/ripple/app/misc/SHAMapStoreImp.cpp
@@ -570,12 +570,18 @@ SHAMapStoreImp::clearPrior (LedgerIndex lastRotated)
// TODO This won't remove validations for ledgers that do not get
// validated. That will likely require inserting LedgerSeq into
- // the validations table
+ // the validations table.
+ //
+ // This query has poor performance with large data sets.
+ // The schema needs to be redesigned to avoid the JOIN, or an
+ // RDBMS that supports concurrency should be used.
+ /*
clearSql (*ledgerDb_, lastRotated,
"SELECT MIN(LedgerSeq) FROM Ledgers;",
"DELETE FROM Validations WHERE LedgerHash IN "
"(SELECT Ledgers.LedgerHash FROM Validations JOIN Ledgers ON "
"Validations.LedgerHash=Ledgers.LedgerHash WHERE Ledgers.LedgerSeq < %u);");
+ */
if (health())
return;