Solved

Query on OBBC (Oracle) is slow if use a native (Access) table for selection criteria

Posted on 2011-03-04
2
455 Views
Last Modified: 2012-05-11
Hello,

I have a query based on several ODBC Oracle tables.  When I run it this way and just type criteria into the query grid, it runs fine.  If I make a simple form and have the criteria based on that (each one a single value) it also runs fine.

One of my criteria is date.  If I just enter the single date onto the query grid or use the form, everything runs fine.

If I have a select table with one field ([SelDate]) and index it and only put 1 date record in the table, in runs unbelievable slow ( 3 - 5 min) as opposed to seconds.

I need to be able to use a selction that could have several values so I need to figure out why it is so SLOW in I introduce and native access table to the query def.

Thanks.
0
Comment
Question by:vmccune
2 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
ID: 35040647

 When you join to a local table, JET is going to carry out the query rather then shipping it off to the server to be executed.  You can confirm this by turning on ODBC tracing, but I'm sure that's what you'd see.

  To keep this fast, you'll need to build up a SQL string with all the dates, then execute it.

JimD.
0
 
LVL 8

Assisted Solution

by:Andrew_Webster
Andrew_Webster earned 250 total points
ID: 35040674
Have you created a relationship between the Oracle tables and the local Access table using the relationships window?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now