Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views that return the top N%
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00121656
Message ID:
00121658
Views:
12
Richard,

First off, top 10% is not desinged to fetch records progressively. It's for queries where you want to see something like the top 10% of the sales force or things like that. What you want is the view's FetchSize setting. This is set in the number of records to fetch at once (not a percent). It will allow you to display a grid before all the records have been fetched. It may help with your speed problems. Part of the problem may be in the sheer number of controls on your forms. An easy way to check to see what the impact of the views is is to open the views from the command window and see how long they take. A complex view may take a long time to open even with the NODATA clause. This is because when you do this the back end still runs the query, it just doesn't return any records to VFP. If you have complex views this could be part of the problem.

>I have a couple of questions about views.
>---
>1. I have seen where I can set up a view to return the top 10% of the matches. And if I'm not mistaken, this is done to speed up the return... Is that right?
>---
>2. After I've gotten my 1st 10% back and refreshed my display...
>How do I get the next 10%, and the 10% after that, etc. ?
>---
>Part of what I'm trying to do is to speed up the loading of some of my forms. I have a couple that take about 10 - 20 seconds to load... that's better than my original design, but still a lot longer than the 1-3 seconds I'd like.
>
>The forms have 6- 10 views each. Each view is setup as NODATAONLOAD.
>
>The one form has a Command Button and a PageFrame (The PageFrame has 6 pages. Pages 1-5 have about 25 textboxes each, along with a couple edit regions and comboboxes. The last page has a textbox and a grid. The grid has 15 fields - 2 of which are combo boxes) This Form takes 10-20 seconds to become ready.
>
>Another form has a combo box, two textboxes, and a readonly grid that I use to display the data of 1 of 5 views. (When the user selects a view to use the Grid's RecordSource is updated.) This Form takes about 10 seconds to become ready.
>
>What can I do about this?
>-------------------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform