Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter is REALLY Slow!
Message
From
15/05/2007 18:08:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01225715
Message ID:
01225815
Views:
15
>I set a FILTER on a table having over 400,000 records. What I am doing is filtering out records older than January 1st of 2006. The cDATE field is indexed, but it is a character field, not a Date data type field. So, I take the value of the first 4 characters and use VAL on it and only view records having a year value of 2006 or greater.
>
>What is really slow is when navigating to GO TOP and GO BOTTOM; is there any way to speed this up for now? I will push some records out to a historical file later, but for now, I need all the records here during the transition.
>
>Here's the code I used:
>
>SELECT CERTS
>SET FILTER TO VAL(LEFT(CERTS.cDate,4)) >= 2006
>
>
>Is there any other way to speed this up?

Cecil,
If you have an index there then what about:

set key to range "2006","9999"

or if you would die hard use filter:

set filter to cDate >= '2006'

PS: Instead of go top/bottom use locate (for bottom set your tag to desc.). Better do not move pointer with set filter:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform