use of com.orientechnologies.orient.core.iterator.OIdentifiableIterator in project orientdb by orientechnologies.
the class OCommandExecutorSQLSelect method serialIterator.
private boolean serialIterator(Iterator<? extends OIdentifiable> iTarget) {
int queryScanThresholdWarning = OGlobalConfiguration.QUERY_SCAN_THRESHOLD_TIP.getValueAsInteger();
boolean tipActivated = queryScanThresholdWarning > 0 && iTarget instanceof OIdentifiableIterator && compiledFilter != null;
// BROWSE, UNMARSHALL AND FILTER ALL THE RECORDS ON CURRENT THREAD
for (int browsed = 0; iTarget.hasNext(); browsed++) {
final OIdentifiable next = iTarget.next();
if (!executeSearchRecord(next, context, false))
return false;
if (tipActivated && browsed > queryScanThresholdWarning) {
reportTip(String.format("Query '%s' fetched more than %d records: to speed up the execution, create an index or change the query to use an existent index", parserText, queryScanThresholdWarning));
tipActivated = false;
}
}
return true;
}
Aggregations