S
S
shushpanio2016-06-23 10:46:38
SQL
shushpanio, 2016-06-23 10:46:38

Query optimization in Acces?

Everyone shakes.
There is the following task:
There is a table with archive data tbl1
it has a bunch of fields, one of them is date_1
There is a table tbl2
Contains the same fields but with new and future data.
It is necessary to transfer data from table tbl2 to table tbl1, provided that the date in tbl2 is less than the current one and greater than the date of the last record in tbl1
Currently, the calculation is in progress with the search condition max(date_1) in tbl1, but I want to find a more optimized solution
Conditions:
Calculate max( date_1) in tbl1 is resource intensive. the table has more than 10,000,000 records, and the query needs to be run once every 15 minutes
Use of auxiliary tables is possible
Everything must be contained in 1 query.
Help optimize the query.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question