Hi,
On 2010.05.10 12:20, rafa wrote:
Well, times; 1 thread = 29 minutes THE WINNER! 4 threads = 93 minutes WoW! 7 threads = 68 minutes 5 Threads = 64 minutes
It seems disk io is the bottle neck. You can try to use memio driver to create index in memory, and later write it back to disk.
aadd( aThreads, hb_threadStart( @crea(), cAlias,cExpr, cFileNtx, cFor, nPos, nPosLinea ) ) ... proc crea( cAlias, cExpr, cFileNtx, cFor, nPos, nPosLinea ) Local nContador := 1 hb_dbRequest( cAlias, , , .T.) // Restaura el alias if empty( cfor ) INDEX ON&(cExpr) TO&(cFileNtx) ; ... endif hb_dbDetach( cAlias ) // Libera el alias return
These crea() threads do not help to do any valuable job. Function aCreateIndexe() starts a separate crea() thread for each index tag, but indexes are not created in parallel, because only one thread has attached area.
Regards, Mindaugas _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour