M
Maury Markowitz
We have a fund accounting package built on Pervasive SQL (formerly Btrieve).
We also keep additional information in our own system, based on SQL Server.
Every night we run a process to copy data from Pervasive to SQL Server, and
during the day we also run many queries against the Pervasive system. We do
this with various queries and code in Access, running against linked tables
to both servers.
About 1/2 of the queries against Pervasive are much, _much_, MUCH, slower
than expected. I'm trying to figure out why. Queries that run in seconds
(literally) on SQL Server can take minutes against Pervasive, yet something
that looks idential will complete in seconds. I know it's something I'm doing
(or Access really), but I don't understand what. So some questions...
1) When using a linked table, do queries against it get sent to the server?
IE, if I link to "tblLotsOfStuff" and then "select * from tblLotsOfStuff
where something = aValue", does that SQL get passed along to the remote
server? Does it "depend"? If so, on what does it depend?
2) We have found that some tables run faster if Access uses a Pass-through
query. That is, if we simply send a query to Pervasive that joins two tables
it might take a minute, but if we replace one of those linked tables with a
query that does "select * from thatTable", then it runs in seconds. Can
anyone suggest a reason for this? It would seem that this is forcing the
query to run locally on my machine, over the network.
3) If I join tables from two servers, as we do, what exactly happens? Does
Access query both and then join, or does it pull both tables across the
network and then do it internally?
If there's a good document on this, I'd love to see it. Nothing I've found
on google so far has really gone into any detail at all on how Access does
its stuff.
Maury
We also keep additional information in our own system, based on SQL Server.
Every night we run a process to copy data from Pervasive to SQL Server, and
during the day we also run many queries against the Pervasive system. We do
this with various queries and code in Access, running against linked tables
to both servers.
About 1/2 of the queries against Pervasive are much, _much_, MUCH, slower
than expected. I'm trying to figure out why. Queries that run in seconds
(literally) on SQL Server can take minutes against Pervasive, yet something
that looks idential will complete in seconds. I know it's something I'm doing
(or Access really), but I don't understand what. So some questions...
1) When using a linked table, do queries against it get sent to the server?
IE, if I link to "tblLotsOfStuff" and then "select * from tblLotsOfStuff
where something = aValue", does that SQL get passed along to the remote
server? Does it "depend"? If so, on what does it depend?
2) We have found that some tables run faster if Access uses a Pass-through
query. That is, if we simply send a query to Pervasive that joins two tables
it might take a minute, but if we replace one of those linked tables with a
query that does "select * from thatTable", then it runs in seconds. Can
anyone suggest a reason for this? It would seem that this is forcing the
query to run locally on my machine, over the network.
3) If I join tables from two servers, as we do, what exactly happens? Does
Access query both and then join, or does it pull both tables across the
network and then do it internally?
If there's a good document on this, I'd love to see it. Nothing I've found
on google so far has really gone into any detail at all on how Access does
its stuff.
Maury