All Forums Database
ruranker 6 posts Joined 05/09
28 Feb 2013
FastLoad And Query Access

I am using the FastLoad utility to remove and replace data in a table. If the DELETE command is in and part of the FastLoad script, is there any potential that another query could read the table and get no rows in that moment between when all the records are removed and when they are reinserted?
Here is the type of FastLoad script I am running:
DELETE FROM WHBPX;                                                    
BEGIN LOADING  WHBPX                                                  
ERRORFILES WHBPX_ERROR_1,                                             
ERRLIMIT 100;                                                         
       CTHLD_SSN_ID9                                 (CHAR(   09))    
      ,GP_N8                                         (CHAR(   08))    
INSERT INTO WHBPX (                                                   
    ) VALUES (                                                        
END LOADING;                    
or will all this happen in a single unit of work and only be commited when it is complete.

Adeel Chaudhry 773 posts Joined 04/08
02 Mar 2013

No it is not possible.
Whereas, normally table is dropped and created within a FL script.

-- If you are stuck at something .... consider it an opportunity to think anew.

dnoeth 4628 posts Joined 11/04
02 Mar 2013

Of course it's possible, but the probability is low.
The DELETE is a SQL DELETE setting a WRITE lock, which is released after the commit. Then FastLoad submits the BEGIN LOAD to set the FastLoad lock.
A SELECT might run concurrently with the DELETE (using ACCESS lock). Or it's queued (using READ lock) by that DELETE and then it returns zero rows after the commit.


Adeel Chaudhry 773 posts Joined 04/08
03 Mar 2013

Will try it out .... never seen that .... may be probability is very low.

Good info Dieter! :)

-- If you are stuck at something .... consider it an opportunity to think anew.

You must sign in to leave a comment.