private void handleRecordsBatch(Map<String, Map<String, Object>> primaryKeysHashMap)
            throws SQLException, ConfigurationException, ScriptException, InterruptedException
    {
        for (Pair<String, Map<String, Object>> pair : nameValuesBuffer)
        {
            Map<String, Object> nameValues = pair.getValue();

            Map<String, Object> parsedResultSet = primaryKeysHashMap.get(pair.getKey());

            if (parsedResultSet != null)
            {
                if (!config.isForceUpdate())
                {
                    boolean dataChanged = false;

                    for (String targetTableColumnName : getOrderedTableColumnNames())
                    {
                        Object oldValue = parsedResultSet.get(targetTableColumnName);
                        Object newValue = transform(targetTableColumnName, nameValues);

                        if (Import.isVerboseEnabled())
                        {
                            printNameValue(targetTableColumnName, newValue);
                        }

                        if (ObjectUtils.notEqual(oldValue, newValue))
                        {
                            dataChanged = true;
                            break;
                        }
                    }

                    if (!dataChanged)
                    {
                        // No need to update the data, because there's no changes
                        return;
                    }
                }

                performUpdate(nameValues);
            }
            else
            {
                // Note: If INSERT batch will be flushed during this run,
                // we may need to re-select remaining records from nameValuesBuffer.
                // To avoid that we temporary disable batch executions
                performInsert(nameValues);
            }
        }
    }