So here's my setup. We have a database with several tables that have over 255 fields. So we must use pass-through queries to access some of the data.
Usually no problem.
Here is my pass-through query:
qry001: SELECT db001.table001.field001 from db001.table001
If I execute this, it instantly spits me to datasheet view with all the millions of records ready for viewing.
If I modify it to:
SELECT db001.table001.field001 from db001.table001 WHERE db001.table001.field001 = '123'
It works fine and displays the one record instantly.
Now on to the problem
When I make a new query, using this pass-through query as a data source such as:
SELECT qry001.field001 FROM tblLocal001 LEFT JOIN qry001 ON tblLocal.field001 = qry001.field001;
This query takes forever to run.
And the thing is, tblLocal001 only has one record in it. In production, this table will have thousands so I need to understand why this query is taking so long and fix it if possible.
Thanks for your help
Usually no problem.
Here is my pass-through query:
qry001: SELECT db001.table001.field001 from db001.table001
If I execute this, it instantly spits me to datasheet view with all the millions of records ready for viewing.
If I modify it to:
SELECT db001.table001.field001 from db001.table001 WHERE db001.table001.field001 = '123'
It works fine and displays the one record instantly.
Now on to the problem
When I make a new query, using this pass-through query as a data source such as:
SELECT qry001.field001 FROM tblLocal001 LEFT JOIN qry001 ON tblLocal.field001 = qry001.field001;
This query takes forever to run.
And the thing is, tblLocal001 only has one record in it. In production, this table will have thousands so I need to understand why this query is taking so long and fix it if possible.
Thanks for your help