Query updates

This commit is contained in:
James Agnew 2023-04-24 17:15:52 -04:00
parent fdbc0fd0c6
commit 4013c08650
3 changed files with 6 additions and 5 deletions

View File

@ -225,6 +225,8 @@ public class JpaBulkExportProcessor implements IBulkExportProcessor<JpaPid> {
pidCount++;
pids.add(resultIterator.next());
}
ourLog.info("Query for bulk export job[{}] chunk[{}] completed with {} pids", theJobId, theChunkId, pids.size());
}
return pids;
}

View File

@ -141,9 +141,6 @@ public class SearchQueryBuilder {
mySchema = mySpec.addDefaultSchema();
mySelect = new SelectQuery();
// FIXME: make configurable
mySelect.setIsDistinct(true);
myBindVariableSubstitutionBase = theBindVariableSubstitutionBase;
myBindVariableValues = theBindVariableValues;
}

View File

@ -118,9 +118,11 @@ public class SearchQueryExecutor implements ISearchQueryExecutor {
hibernateQuery.setParameter(i, args[i - 1]);
}
ourLog.trace("About to execute SQL: {}", sql);
// FIXME: reduce to trace
ourLog.info("About to execute SQL: {}", sql);
hibernateQuery.setFetchSize(100000);
// FIXME: update in ja_20230422_postgres_optimization
hibernateQuery.setFetchSize(500000);
hibernateQuery.setCacheable(false);
hibernateQuery.setCacheMode(CacheMode.IGNORE);
hibernateQuery.setReadOnly(true);