Optimizing a VFP Linked Server Query


Author
Message
William Fields
William Fields
StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)StrataFrame User (252 reputation)
Group: StrataFrame Users
Posts: 80, Visits: 239
Hello,

This is not a SF question, but I'm hoping someone may have run into the same issue...

I have a VFP linked server in SQL2008 (the databases/tables are all on the same workstation)and am trying to optimize a query that filters on a datetime field. The VFP table has an index on this field, but I'm not certain how to speed up my query.

For example:

SELECT *
FROM MyVFPLinkedServer...MyTable
WHERE
MyDateTimeField >= '03/01/2011 00:00:00' AND
MyDateTimeField <= '03/31/2011 23:59:59'

This returns 75 rows and takes 30 seconds to execute.

Filtering on an integer field in the same table is very fast, so I guess I'm just not formatting the WHERE clause properly to take advantage of the DATETIME field index.


Can anyone suggest how I can speed up the linked server query with DATETIME values?

Thanks.
Edited 13 Years Ago by William Fields
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
William Fields - 13 Years Ago
Greg McGuffey - 13 Years Ago
William Fields - 13 Years Ago
Greg McGuffey - 13 Years Ago
Ger Cannoll - 13 Years Ago
William Fields - 13 Years Ago
                         Hi William. I ahve a problem clicking on your link. When I click,...
Ger Cannoll - 13 Years Ago
                             Tried it again now...and the image comes up ok. I see in the diagram...
Ger Cannoll - 13 Years Ago
                                 Yes,the idea is to have the StrataFrame app access the VFP data via...
William Fields - 13 Years Ago
Michel Levy - 13 Years Ago
William Fields - 13 Years Ago
Michel Levy - 13 Years Ago
William Fields - 13 Years Ago
                         In a query in SSMS, you'll find the button for statistics near the...
Michel Levy - 13 Years Ago
                             Attached are the Statistics. Thanks. Bill
William Fields - 13 Years Ago
                                 Hi, I wanted to understand whyyou had such bad results with your VFP...
Michel Levy - 13 Years Ago
                                     Hello Michel, I've reviewedthe results. Thanks for taking the time to...
William Fields - 13 Years Ago
                                         Hi William, about the integers: The difference of length in memory...
Michel Levy - 13 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search