Ehab Samir Aziz wrote:I am extracting certain records from huge DBF (8000 Record) and it is so slow .
You should not use DBGOTOP() after SET FILTER
because this FILTER the database before ALL.
Use generic SEEK to find directly the first available record
and then you can DBSKIP().
With Clipper 5.3b, filters take 2 or 3 seconds before
to see the list, in a database with 8000 records
and on a pc celeron 500 with 64 Mo.
Test my sample below please, i am interested
to know the speed of your procedure.
Regards,
- Code: Select all Expand view RUN
select 4 && indexed with a "char" key
4->(dbgotop())
set filter to alltrim(me_cu_acct)=="2125447"
* 4->(dbgotop())
Sysrefresh()
DBSEEK(SPACE(LEN( First_Field_In_The_Index_Key ) - 1) + "!", .T.)
Sysrefresh()
DO WHILE !(4)->(EOF())
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 1 ), "Value", (4)->ME_CU_name)
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 2 ), "Value", (4)->me_mc_brn)
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 3 ), "Value", (4)->me_mc_type)
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 4 ), "Value", (4)->me_mc_modl)
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 5 ), "Value", (4)->me_mc_serl)
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 6 ), "Value", (4)->open_meter)
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 7 ), "Value", (4)->cls_meter)
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 8 ), "Value", (4)->prints)
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 9 ), "Value", (4)->waste)
nLine:=nLine+1
Sysrefresh()
DBSKIP(1)
Sysrefresh()
ENDDO