reduced total amount of sentences, removed time constraint, deleting more now, added as experiment to run response threads with a 2 thread pool
This commit is contained in:
@@ -89,15 +89,14 @@ public class DataMapper {
|
||||
ResultSet l_rsSearch = null;
|
||||
String CountSQL = "select count(*) from Sentences";
|
||||
String l_sSQL = "delete from Sentences\n" +
|
||||
" where DATE(last_used) < DATE_SUB(CURDATE(), INTERVAL 10 DAY)\n" +
|
||||
" order by last_used asc limit 2";
|
||||
" order by last_used asc limit 5";
|
||||
try {
|
||||
l_cCon = DBCPDataSource.getConnection();
|
||||
l_pStatement = l_cCon.prepareStatement(CountSQL);
|
||||
ResultSet resultSet = l_pStatement.executeQuery();
|
||||
if (resultSet.next()) {
|
||||
int count = resultSet.getInt(1);
|
||||
if (count > 8500) {
|
||||
if (count > 7000) {
|
||||
l_pStatement = l_cCon.prepareStatement(l_sSQL);
|
||||
l_pStatement.execute();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user