int saveBatchStatisticValueSource_IndividualPreparedStatements(final List<SQLStatValSourceDO> batch) {
        final LogExecutionTime logExecutionTime = new LogExecutionTime();

        int savedCount = 0;
        int failedCount = 0;

        try (final Connection connection = getConnection()) {
            try (final PreparedStatement preparedStatement = connection.prepareStatement(SINGLE_INSERT_SQL)) {
                for (final SQLStatValSourceDO item : batch) {
                    setPreparedStatementParams(preparedStatement, item);

                    try {
                        preparedStatement.execute();
                        savedCount++;
                    } catch (final RuntimeException e) {
                        // log the error and carry on with the rest
                        LOGGER.error("Error while tyring to insert a SQL statistic record.  SQL: [{}], " +
                                        "createMs: [{}], name: [{}], typePrimValue: [{}], type: [{}], " +
                                        "value: [{}], count: [{}]",
                                SINGLE_INSERT_SQL,
                                item.getCreateMs(),
                                item.getName(),
                                item.getType().getPrimitiveValue(),
                                item.getType().name(),
                                item.getValueSum(),
                                item.getCount(),
                                e);
                        failedCount++;
                    }
                    preparedStatement.clearParameters();
                }

                if (LOGGER.isDebugEnabled()) {
                    logDurationToDebug("saveBatchStatisticValueSource_IndividualPreparedStatements",
                            batch,
                            logExecutionTime);
                }
            }
        } catch (final SQLException sqlEx) {
            throw new RuntimeException(sqlEx);
        }

        if (failedCount > 0) {
            LOGGER.error("Failed to insert [{}] SQL statistic records out of a batch size of [{}]",
                    failedCount, batch.size());
        }

        return savedCount;
    }
This is a third line fall back for loading the stats and will be very
slow as it is inserting them one by one. Any failures will be logged and
processing will carry on hopefully some records will get through
stroom-statistics/stroom-statistics-impl-sql/src/main/java/stroom/statistics/impl/sql/SQLStatisticValueBatchSaveService.java