<commit_before>package uk.gov.indexer;

import java.sql.ResultSet;
import java.sql.SQLException;

class SourcePostgresDB extends PostgresDB {

    private final String tableName;

    public SourcePostgresDB(String register, String connectionString) throws SQLException {
        super(register, connectionString);
        this.tableName = "entries";
    }

    public ResultSet read(int currentWaterMark) throws SQLException {
        return connection.prepareStatement("SELECT ENTRY FROM " + tableName + " WHERE ID > " + currentWaterMark).executeQuery();
    }

}<commit_msg>fetching entries in batch so that we don't wait endlessly for register with large data set.<commit_after>package uk.gov.indexer;

import java.sql.ResultSet;
import java.sql.SQLException;

class SourcePostgresDB extends PostgresDB {

    private final String tableName;

    public SourcePostgresDB(String register, String connectionString) throws SQLException {
        super(register, connectionString);
        this.tableName = "entries";
    }

    public ResultSet read(int currentWaterMark) throws SQLException {
        return connection.prepareStatement("SELECT ENTRY FROM " + tableName + " WHERE ID > " + currentWaterMark + " ORDER BY ID LIMIT 5000" ).executeQuery();
    }

}
{'fraction_non_alphanumeric': 0.08009516256938938, 'fraction_numerical': 0.0031720856463124504, 'mean_word_length': 4.109311740890688, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3827848', 'n_tokens_mistral': 335, 'n_tokens_neox': 322, 'n_words': 99}