Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 Tags
Subject: RE: SQL SELECT
Thread ID: 154493 Message ID: 154570 # Views: 1 # Ratings: 1
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Monday, December 17, 2007 11:56:56 PM         
   


> >
> > The reason is that the 'cursor' is actually being returned as a filtered view and so there is no physical file being created. This is a speed optimization that VFP performs automatically when the query is fully optimizable, and you do not specify either a NOFILTER or READWRITE clause for the query. Instead of creating the cursor, it builds a temporary result set based on the indexes, but does not commit it to file.
> >
> > Use either the NOFILTER or READWRITE clauses and you will be able to select from the resulting cursor - but it will not be as fast as the filtered view. As always, there is a trade-off between performance and flexibility.
> >
> > Regards
> > Andy Kramek
> > Microsoft MVP (Visual FoxPro)
> > Tightline Computers Inc, Akron Ohio, USA
>
> I get it. Thanks Andy. Is it best to use NOFILTER or READWRITE or even both together? What's the difference?

NOFILTER forces the creation of a physical cursor file, but the resulting cursor is still read-only. This is a little faster than using READWRITE which also creates the physical cursor but the resulting cursor is updatable.

So if you only need to create this for display - use NOFILTER but if you want to be able to update columns in the cursor directly then use the READWRITE option.

Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA

ENTIRE THREAD

SQL SELECT Posted by Russell Hill @ 12/17/2007 9:58:28 AM
RE: SQL SELECT Posted by surinder singh @ 12/17/2007 10:09:34 AM
RE: SQL SELECT Posted by Russell Hill @ 12/17/2007 12:53:57 PM
RE: SQL SELECT Posted by Bernard Bout @ 12/17/2007 11:02:39 AM
RE: SQL SELECT Posted by Russell Hill @ 12/17/2007 12:55:08 PM
RE: SQL SELECT Posted by Andy Kramek @ 12/17/2007 12:41:35 PM
RE: SQL SELECT Posted by Russell Hill @ 12/17/2007 12:53:05 PM
RE: SQL SELECT Posted by Andy Kramek @ 12/17/2007 11:56:56 PM
RE: SQL SELECT Posted by Bernard Bout @ 12/18/2007 2:31:05 AM
RE: SQL SELECT Posted by Russell Hill @ 12/18/2007 8:03:05 AM