From: Itamar M. L. J. L. <ita...@gm...> - 2015-06-28 01:24:50
|
Hi! Very slow! This code below demonstrates the problem! ---------------8<--------------- Function main LOCAL aStru := {{"DATA","c",50,0}} setmode(25,80) cls request DBFCDX,LETO rddsetdefault("LETO") dbsetdriver("LETO") dbcreate("//localhost:2812/test.dbf",aStru,"LETO") DbUseArea(.t.,"LETO",'//localhost:2812/test.dbf','pd',.T.,.F.) @ 05,10 say "Append records: " + time() For n := 1 to 8000 pd->(DbAppend()) NEXT @ 06,10 say "Final Append records: " + time() pd->(DbGoTop()) if(!flock()) alert("Fail...") return nil endif @ 09,10 say "Initial replace with transaction: " + time() leto_BeginTransaction() do while pd->(!eof()) replace pd->DATA with "X" pd->(DbSkip()) @ 10,10 say "Process..." + str(recno()) enddo leto_CommitTransaction() @ 11,10 say "Final replace with transaction: " + time() close all return nil ------------------------>8----------------------- I use for compile: hbmk2 leto_trans.prg \devl\letodb\rddleto.hbc LetoDB Changelog,v 1.350.2.239 2015/06/11 Best regards, Itamar M. Lins Jr. |