[QODBC-ALL] How Optimizer Works
Posted by Jack - QODBC Support on 26 July 2017 09:55 AM
How Optimizer Works
I am using QODBC access QuickBooks Data. I am using Optimizer & I want to know about How Optimizer Works.
The Optimizer brings some data to a local cache to increase retrieval performance for queries. Below is the default setting of QODBC Optimizer.
Here is how Optimizer works with default configuration.
1. You execute any query for example: "Select * from Invoice"
2. QODBC will check the Optimizer table for Invoice.
3. As it is the first time you are accessing the table, QODBC will get all the data of that table & its child tables (e.g. for the Invoice table it is Invoice, InvoiceLine & InvoiceLinkedTxn). E.g. There are 50000 records.
4. QODBC will add the data and the timestamp to the optimizer file.
5. QODBC will then read records from optimizer and return it to calling application.
6. Next time when you execute "Select * from Invoice"
7. QODBC will check the Optimizer table for Invoice.
8. As there are data and last timestamp, QODBC will get all the data added/modified/deleted after the last sync timestamp from QuickBooks.
9. As QODBC is querying limited data, the data transfer is faster. e.g. there are 40 records modified and 10 added, 10 deleted instead of reading 50000 records, only 60 records will be processed.
10. QODBC will add the delta changes to Optimizer.
11. QODBC will then read records from optimizer and return it to calling application.