Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse faster than grid.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am converting an application from FP 2.5 to VFP 6.0. The application was using a filtered table with a browse. I have tried to retain the filtered table and use a grid instead. However, the performance became painfully slow. Does anybody know what causes this, why would a browse be faster than a grid? I even used the NAME option to basically make the browse work just like a grid, it was still faster. I only have to filtered fields, and both are indexed. I don't know what could be causing it to be so slow with a grid. Any ideas would be most appreciated. Thanks.

sk
 
Hi,
To work around this, you must use LOCAL VIEW (i guess you use fox native database) instead of FILTERED TABLE

To be able to create view, you must have one database opened

Read the scenario:
- one database name DTSL
- one table Flights with 50.000 records. This is the flight schedule of 2 years. Averagely, i have 70 flights depatured a day. The table FLIGHTS has one field named DATE

Now, I just want to look at the flight schedule for current date.

So, I create a view of flights like this:
OPEN DATABASE DTSL
CREATE SQL VIEW VFlight;
AS SELECT * FROM FLIGHTS;
WHERE DATE=DATE()


Note: you have to create view VFlight once

Now, it is time to create a FORM with a GRID based on view VFlight instead of opening FLIGHTS, SET FILT

I have tried this and it is MUCH MUCH FASTER

Hope this helps

Jimmy

(If anything is not clear, pls let me know)





mailto:nhan_tiags@yahoo.com
 
Thanks for your response. I was trying to avoid using views for this phase of the conversion - simply because I will have to change more code. I just don't see why a browse of a table with a filter set would be faster than a grid, it must be doing something to optimize it's performance that a grid isn't doing. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top