Table of external system is getting locked using custom database replication

Hi, I am using database replication to import data as a batch process from one of the external system into mendix. After finishing the process ( at 11:00), the table of external system is getting locked by mendix user for one hour( till 12:00). Could anyone suggest me where I am wrong.
1 answers

The database replication module querybuilder can be improved by adding


to the queries.

Edit 1: As Erics says this has disadvantages. An alternative is to make views in the replicated database which return only data that is recently changed. Take a reasonable timeframe to avoid missing update, like 2 weeks if you replicate daily. Use this views instead of the original tables as you use now. This only works when is it NOT a full replication including deleting of data in the Mendix database.