Search code examples
sqlms-accessquery-performancelinked-tables

Measuring MS Access SQL query duration


I'm trying to compare MS Access SQL queries for local table vs linked table (it is linked to an Oracle and to a SQL Server database).

I can get query duration when running the SQL command directly on Oracle or SQL Server, but when running the SQL in MS Access, I don't know how to capture the query duration.

Is there a way to get the query duration when running a SQL command inside MS Access?

Thanks. :-)


Solution

  • Yes, it is.

    1. Record in a variable the actual time.
    2. Create a recordset with data source pointing to your query/view/table
    3. Open the recordset (eventually you may check the recordcount)
    4. Record in another variable the actual time
    5. DateDiff between 1. amd 4.