Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox dropdown for 400k records search
Message
From
21/09/2006 02:39:46
 
 
To
21/09/2006 00:49:09
Yh Yau
Ingenuity Microsystems Sdn Bhd
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01154761
Message ID:
01155825
Views:
28
IF you "set deleted off", "select count(*) from tstokmast" will take zero time, because VFP understands that this info can be read by the reccount() functions. However, if you have "set deleted on" and no index on deleted(), this will time a looong time. Since you use VFP9, I suggest that you create a binary index on deleted, "index on deleted() tag deleted binary".

Personally I always set deleted off, and I never delete records. In stead I have a logical field which I call "reusable", with a binary index on this field. In stead of deleting, I "replace resusable with .t.". When I need to append records, I first check if I have availabe "reusable" records, and use them before I append new records.

>Set deleted is on
>no index on deleted()
>cpdbf() and cpcurrent() are both 1252.
>already indexed on prodcode field.
>What would be the normal query time for 415k records to run :-
>select count(*) from tstokmast.
>I've got 25 seconds.
>Yau
Previous
Reply
Map
View

Click here to load this message in the networking platform