views:

72

answers:

3

I'm using an MS Access 2003 front end to access the data on a network drive owned by a Visual Foxpro 9 application via odbc, and it seems to be unbelievably slow - there's about 1400 records in one particular table, and it takes a good minute to load up on the Access interface, although when using a basic DBF viewer, or the application that the tables belong to, it's instantaneous. When querying the data, it's quicker than opening the whole table view, but still much slower than I'd expect; the machine it's accessing is on the same network, and it's currently slower to access through the application than a web-hosted SQLServer with easily 10 times that number of records on it.

Any suggestions as to things that I can try with the VFP ODBC link to speed it up that aren't obvious would be appreciated.

<>

Thanks Dave, At present, I'm just playing with a query trying to get it working within Access' query tab...

Query as it stands is taking about 4 minutes to run.. It returns a crosstab containing 10 rows of information, based on input criteria of approximately 230 records - I've tried it without the joins and fields from the Group table, but the speed difference is negligible.

Just to put some perspective on it:

Allsales contains about 50 fields and 15,000 records Stock contains about 100 fields and 500 records Groups contains 3 fields and 8 records.

SELECT allsales.type, allsales.branch, allsales.terminal, allsales.date, Sum(allsales.totalprice) AS SumOftotalprice, Sum(allsales.discamount) AS SumOfdiscamount, Sum(allsales.tender1) AS SumOftender1, Sum(allsales.tender2) AS SumOftender2, Sum(allsales.tender3) AS SumOftender3, Sum(allsales.tender4) AS SumOftender4, Sum(allsales.tender5) AS SumOftender5, Sum(allsales.tender6) AS SumOftender6, Sum(allsales.tender7) AS SumOftender7, Sum(allsales.tender8) AS SumOftender8, Sum(allsales.tender9) AS SumOftender9, Sum(allsales.tender10) AS SumOftender10, Sum(allsales.tender11) AS SumOftender11, Sum(allsales.tender12) AS SumOftender12, Sum(allsales.loypoints) AS SumOfloypoints, Count(allsales.type) AS Fuzz, groups.desc
FROM (stock RIGHT JOIN allsales ON stock.plu = allsales.plu) LEFT JOIN groups ON stock.cgroupid = groups.id
GROUP BY allsales.type, allsales.branch, allsales.terminal, allsales.date, groups.desc, allsales.reportdate
HAVING (((allsales.reportdate)=#3/1/2010#));
+1  A: 

You might want to check out this link, lots of very good tips on working with ODBC data sources

http://support.microsoft.com/kb/286222

Kevin Ross
Thanks Kevin - Nice little best practice document to bookmark :) Unfortunately, everything's pretty much streamlined already, and I can't see any reason why it shouldn't be working... I'm going to try looking at oledb linking instead I think..
Paul Green
+4  A: 

Turn off logging in ODBC driver configuration.

dario
Sped it up nicely, but not enough as yet....
Paul Green
Restarted after doing this, and the database is greased lightning now... well.. relativley speaking :p - Thanks.
Paul Green
Good catch, @dario! I never would have thought that it was turned on and was preparing to suggest something about index usage.
David-W-Fenton
+1 I didn't know logging would have such a dramatic effect. Very good to know.
DaveB
A: 

You could try the FoxPro OLEDB driver to see if it makes any difference. Sounds like there may be some issues with the Access application and how if processes the data once it is retrieved from FoxPro. I have made lots of ASP/ASP.NET pages that use FoxPro as the data store and not had a problem such as you describe. Are you sure it is the VFP ODBC data transfer that is running slower? Perhaps posting the data access code could yield a clue?

DaveB
Make sure any queries from the Access side are Rushmore-optimised also.
Alan B
@Alan B: the way to do that is to turn on the SHOWPLAN switch (you can search the MS Knowledge Base for that term to get instructions), but of course having it turned on also slows down Jet. But it does help you figure out how Jet is optimizing queries you send it (though it doesn't give you any information on subqueries, unfortunately -- they are optimized by Jet, but SHOWPLAN doesn't show how).
David-W-Fenton