简体   繁体   中英

Microsoft Access Make-Table Performance with Pass-Through Query

Question for you Access guru's out there:

I have an Oracle pass-through query which returns a result set in about 2 seconds in the Access program. However, when I try to use that pass-through query inside a make-table query, it drags for about 7 minutes. (The file currently resides on my desktop and all tables are local (not linked)).

In an effort to improve performance, I created delete/append queries and ran it with VBA. Then I tried DAO db.Execute with explicit string SQL queries, referencing the pass-through query (INSERT/SELECT). All methods are extremely SLOW! I would love to get it close to the actual run time of the pass-through (again, 2 seconds).

Any insight?

Likely, there is no actual, large performance difference between make-table and pass-through query. The query actually takes minutes to run while you can view some results in seconds. Scrolling down the query window may show query still being rendered.

Because pass-through queries interface with an ODBC driver/OLEDB provider to parse SQL statements between client (ie, MS Access) and database (ie, Oracle) across a network, several environment or software reasons can be the factor.

  1. Network traffic between client machine and server. Avoid WAN for hard-wired LAN connections. Never use internet folders or run Access on flash drives or drives of limited disk space.
  2. ODBC driver/OLEDB provider that may be outmoded. Try finding the most recent version compatible for your Oracle version and MS Office version. And try running on 64-bit architectures.
  3. Complex or large Oracle data types that cannot map to JET/ACE data types such as high precision number types or large binary object types. See this Oracle doc .
  4. Bloated Access app that should be compacted and even decompiled .
  5. Database without split architecture where application object (queries, forms, reports, macros, modules) are divorced from tables.

Is the make table to access local? I mean a dog and say a bus are two VERY different things here.

Is that make table local to oracle, or are you taking about the PT query being used as a make table to a LOCAL table in Access? As such, your comparison is a mount Everest of a difference here.

I suspect that a plane jane linked table to Oracle vs that of PT query likely would perform the same if the target table is "local". That's because you pulling the whole table down the network pipe to a local table.

If the PT query is a make table 100% to another table on the Oracle server? Then a PT query should perform just as fast as if you typed that command in the Oracle console - there should be no difference.

You don't mention the row count (EDIT - i see you note only 16,000 rows - that is rather small). So the issue then is the network connection. is this a LAN (local area network), or are you using say a VPN and the internet which will be about 100 times slower. I mean, a connection that is 100x slower then a typical LAN is going to be 100 times slower - no surprise here.

So, details as to the type of connection being used, and the row count would shed significant light here. But if a VPN and connection over the internet is involved here, then such connections are about 50 times slower then your super cheap-o office local area network. You can read this article of mine that explains this speed issue: http://www.kallal.ca//Wan/Wans.html

I don't see why 16,000 rows would take so long - that will take well under a second of time on the cheapest office network. Using any other client to pull that data should not run or work any faster then a PT query. I mean, ado.net, ODBC, or oleDB don't cause the server to say, hum, gee - lets send the data slower. All of these clients should pull data at the same rate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM