I have noticed a strange behaviour while using SELECT command. I have a table called SPHIST, which has about 200,000 records. I use a command like this
SELECT * from SPHIST where VIN = "1234" INTO CURSOR ABC
The query should select one record (as there is only one record in SPHIST for the matching VIN). It does create a cursor ABC with one record. I see one record when I browse the table. However, FoxPro links the ABC cursor to SPHIST and applies a filter (VIN = "1234"). The status bar shows
ABC (database!SPHIST) Record: 161518/214052
In most cases, it does not affect the speed. However, if I use a commands like this:
USE SomeTable
APPEND FROM DBF('ABC')
It starts appending the entire SPHist table instead of a single record.
This behaviour (of applying a Filter instead of creating a new cursor) does not happen always.
Has anyone faced something similar? Any workaround?
Thanks.
- Ravi