Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids and Filters
Message
From
02/10/2015 13:18:49
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01625342
Message ID:
01625394
Views:
52
>>>I have a problem with a grid on a form. I set a filter on a file to exclude "closed" reservations from the
>>>display. I then allow entry of a unit number, find the first record for the unit number and refresh the display
>>>of the grid.
>>>
>>>When it initially pulls up the grid and enter a unit. It comes up quickly. But, every time I call the grid form up
>>>after this, it displays the info, you enter the unit, and it takes a very long time to go to that record and redisplay.
>>>
>>>I can exit the program, re=enter and the first time is very fast. Subsequent times are very slow. I am doing this on
>>>a 3 computer pier to pier network. Its always fast on the one acting as the "server".
>>>
>>>I removed the filter and it ran fast in all instances. Can setting a filter on a file (15000 records and I only 300 meet the
>>>filter requirements) make it take, literally, minutes to pull up the data?
>>>
>>>Any help would be greatly appreciated.
>>>
>>>Brad
>>
>>you have 2 ways:
>>1) add an index and use SET KEY
>>2) build an cursor with the filtered rows only
>
>So, you don't think that Optimize in the grid will help?
>
grid's Optimize property it's as the FOR clause rushmore optimization.
It's better that nothing, but if the active index it's not on the .AND.
filter condition, the optimization is very small.

>If I need to show rows where Expires > datetime(), can I use SET KEY?

SET KEY RANGE DATETIME(),{^9999-12-31}

SET KEY require that index of Expires is the active one.
in this case, SET FILTER is well optimized
because the filtered rows are contiguous.
The regeneration of the grid go in crisis,
when the filter creates holes very long order
active
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform