private static void loadExecutionPlansForSQLStatements(List<DeltaSQLStatementSnapshot> sqlStatementsToLoad) {

        Connection connection = null;
        try {
            connection = ConnectionPoolUtils.getConnectionFromPool();
            PreparedStatement sqlExecutionPlansStatement = connection
                    .prepareStatement(SELECT_EXECUTION_PLANS_FOR_100_STATEMENTS);
            sqlExecutionPlansStatement.setFetchSize(1000);

            int indexPlaceholder = 1;
            for (DeltaSQLStatementSnapshot currentStatement : sqlStatementsToLoad) {
                sqlExecutionPlansStatement.setString(indexPlaceholder,
                        currentStatement.getSqlStatement().getSqlId());
                indexPlaceholder++;

                if (indexPlaceholder > NUMBER_BIND_VARIABLES_SELECT_EXECUTION_PLAN) {
                    // all place holders are filled - so fetch the execution
                    // plans from the DB
                    getExecutionPlansFromDB(sqlStatementsToLoad,
                            sqlExecutionPlansStatement);

                    indexPlaceholder = 1;
                }
            }

            if (indexPlaceholder > 1) {
                // there are some statements left...
                // fill the empty bind variables with invalid addresses
                for (int index = indexPlaceholder; index <= NUMBER_BIND_VARIABLES_SELECT_EXECUTION_PLAN; index++) {
                    sqlExecutionPlansStatement.setString(index, "");
                }
                getExecutionPlansFromDB(sqlStatementsToLoad,
                        sqlExecutionPlansStatement);
            }
        } catch (SQLException e) {
            JOptionPane.showMessageDialog(null, e);
        } finally {
            ConnectionPoolUtils.returnConnectionToPool(connection);
        }
    }