[QODBC-ALL] How to setup QODBC Optimizer and where are the Optimizer options
Posted by Juliet (QODBC Support) on 21 February 2010 07:12 AM
|
|
Where are the Optimizer optionsLocate QODBC OptimizerLocate the QODBC Driver for the QuickBooks program group on your desktop. Click on the QODBC Setup Screen icon to launch the setup program supplied with QODBC. The following general setup screen will become available. Click on the Optimizer tab page.
QODBC Optimizer SetupInstructions With QODBC Version 10.0, a new data importing technology has been added to QODBC, resulting in faster initial data reads and subsequent queries than previous editions of the driver. Initial data optimization has been benchmarked at up to a 30% reduction in load time. The first time you access a given QuickBooks table, QODBC, by default, optimizes access to that data, so the next time you need data from that table, it will be much faster. The read-only desktop edition of QODBC has again been chosen to be included as a feature in the QuickBooks Enterprise Edition 2010 product on the main file menu under Utilities. F you need a read-only edition of QODBC and have this version of QuickBooks, no purchase is required! You are ready to go. We have also now been chosen to be included in QuickBooks Enterprise editions in the UK, Canada, and Australia., QODBC Optimizer SetupMy recommended settings for using QODBC are shown here; read below for an explanation of all available options. Use Optimizer brings some data to a local cache to increase query retrieval performance. Check to activate the Optimizer. Optimizer Database Folder: specifies where the local data store will be saved on disk. The default location %AppData%\QODBC Driver for QuickBooks\Optimizer is under your Windows login account name under your Documents and Settings folder. The data will be stored in a file in this folder with a name similar to the company file name with a .opt extension. If you store that data somewhere other than the default, click the browse button and select the destination folder. With huge company files, we suggest running synchronization after hours. Keep my optimized data up to date when you choose the optimizer to synchronize itself with your Company data. Depending on how static your data need is and the file size, you can opt for various time frames of synchronization. The farther down the list you go, the less synchronization will occur, and your queries will run much faster but will be using less current data than the company files themselves. The start of every query is the default setting using the most current data. Use this default setting if your query requires the latest up-to-the-minute data and speed is not the primary focus. Please remember that the QODBC Optimizer is local to your computer only, so when other users change things in QuickBooks, how does QODBC know? The optimizer will default update new and changed entries in a table from QuickBooks first and then execute the query against the locally optimized table. This is faster than reading everything out of QuickBooks every time, especially the more data you have. The start of every new connection (with "Load Updated Data" first) is used if you don't need to update the optimized data while you are, for example, running queries or importing or exporting data. The optimized information is updated upon a new connection and left updated until the next new connection occurs again. The start of every new connection (with "Reload All Data" first) is used if you need to rebuild optimized data from scratch before running important queries (like Sales Commission) or importing or exporting data. The optimized data is rebuilt upon a new connection and left updated until the next new connection occurs again. The end of yesterday is used for a better balance between speed and data updating and would be the option that works best for most users. It only has to synchronize each table once per day, and the data will be current at the end of the previous day. The end-of-last-month option is a significant speed boost for running last month's or last year's queries. It does not need to synchronize again to get the data. The last time I pressed one of the load data buttons: This option allows you to control the synchronized timing. Synchronizing only occurs when you manually run it by pressing the Load Updated Data in the QODBC setup screen. For balances and stock quantities: the option Nulls - will return NULLs for all fields that cannot be kept in sync, Dirty Reads - means return the most current value that was loaded into the optimizer cache, and Real-Time uses the slower method to get the data directly out of QuickBooks making sure you get the most current value for the requested fields. (Real Time is the previous method used). Optimize data after an Insert or Update causes QODBC to do Load Updated Data after an insert or update is executed on a table. Useful for programmers who want to test that their data has successfully been written to QuickBooks. The multi-Table Sync option is unchecked by default for all non-USA enterprise users. If checked, the QODBC optimizer will use other tables to re-sync tables; however, this will slow down performance. When off, all Multi-Table Sync fields become Real-Time fields. Note: This feature is ignored and set to unchecked if the version is QBOE or SDK is less than v3 (used by QuickBooks 2004 USA and all QuickBooks versions outside the USA). Prior to SDK v3, the other multi-sync tables did not exist, so using real data for those fields is safer. Load Updated Data: This button is used to Synchronize your optimized data with your company file. This will only load the data that has changed since the last automatic or manual synchronization. Reload All Data: This button is used to rebuild the optimized data from scratch completely. It is useful when starting with a new company if you do not want to synchronize the tables as you first encounter them and ensure that your data is 100% current. See Also: How to switch OFF or RESET the QODBC optimizer. Removing/deleting optimizer file.To delete the optimizer file. Please close/disconnect all the applications connected to QODBC. Start "QODBC Setup Screen" & Switch to the Optimizer tab.
Click "Reset Optimizer File(s)"
Click "Yes" to delete all the Optimizer files.
Please note: All the Optimizer files under the Optimizer Database folder will be removed if you wish to delete a single company file's optimizer. The optimizer file can be found at "%appdata%\QODBC Driver for QuickBooks\Optimizer." For Example: C:\Users\Raj\AppData\Roaming\QODBC Driver for QuickBooks\Optimizer
Use Command Line to run QODBC Optimizer.You can also schedule full or update optimization overnight using QODBCFUL.EXE or QODBCUPD.EXE. Both set the error level variable if errors are detected, and error messages are written into the QODBCLOG.TXT log file. Passing a DSN on the command line to these programs will choose the QuickBooks company file you wish to use.
Note: QODBC "Auto Login" unattended mode needs to be set up for this work; see: How do I set up QODBC to auto-login into QuickBooks and start it if it's not running? How to Use Optimizer in QueryTo temporarily bypass your optimizer settings and extract the latest information, you can add the unoptimized tag after the table name like this to your queries: select * from InvoiceLine unoptimized where TxnDate >= {d'2006-03-06'} Or you also can fully resync your optimized specified table (InvoiceLine as an example here) by running: sp_optimizefullsync InvoiceLine And then update it manually at any point in time by doing the following: sp_optimizeupdatesync InvoiceLine Or you also can fully resync ALL the QODBC tables by running: sp_optimizefullsync All and then manually update ALL the QODBC tables at any point in time by doing the: - sp_optimizeupdatesync All An Unofficial List of Columns/Fields affected by Null/Dirty Reads/Real TimeThe following is an unofficial list of columns/fields affected by Null/Dirty Reads/Real Time as of March 27, 2007: List Tables Account - Balance , TotalBalance Customer - Balance , TotalBalance , CreditCardInfoCreditCardNumber , CreditCardInfoExpirationMonth , CreditCardInfoExpirationYear , CreditCardInfoNameOnCard , CreditCardInfoCreditCardAddress , CreditCardInfoCreditCardPostalCode ItemInventory - QuantityOnHand , TotalValue , AverageCost , QuantityOnOrder , QuantityOnSalesOrder ItemInventoryAssembly - QuantityOnHand , TotalValue , AverageCost , QuantityOnOrder , QuantityOnSalesOrder ItemInventoryAssemblyLine - QuantityOnHand , TotalValue , AverageCost , QuantityOnOrder , QuantityOnSalesOrder Vendor - Balance Transaction Tables Bill - AmountDue , IsPaid , OpenAmount BillExpenseLine - AmountDue , IsPaid , OpenAmount BillItemLine - AmountDue , IsPaid , OpenAmount CreditMemo - CreditRemaining CreditMemoLine - CreditRemaining Invoice - AppliedAmount , BalanceRemaining , IsPaid InvoiceLine - AppliedAmount , BalanceRemaining , IsPaid PurchaseOrder - IsFullyReceived , PurchaseOrderLineReceivedQuantity , PurchaseOrderLineIsFullyReceived PurchaseOrderLine - IsFullyReceived , PurchaseOrderLineReceivedQuantity , PurchaseOrderLineIsFullyReceived Performance of QueryNote: Most users tend to use queries like: SELECT * from Customer which will run slowly as QODBC has to display the correct, current balance for each customer, while this will run much faster: SELECT "Name","LastName","FirstName","BillAddressAddr1", "BillAddressAddr2","BillAddressCity", "BillAddressState","BillAddressPostalcode" Using Tags in Query to Setup Optimizer However, you can also override your QODBC Optimizer configuration screen settings to suit what you are doing by using the following tags: VERIFIED | VERIFY - Forces Full Resync with QuickBooks on the optimized table before Query starts. This command is equivalent to using sp_optimizefullsync. NOSYNC - Pass-through query to the optimized table directly for maximum speed. Please Note: QODBC will not bring new/updated records from QuickBooks to the optimizer when using these commands. Data will be fetched directly from the optimizer without synchronizing with QuickBooks. The data received could be historical and depend on when the optimizer was updated for the table. Use this command for non-critical operations or reports only. Examples: select * from InvoiceLine UNOPTIMIZED For example, to read new (recent) InvoiceLines directly out of QuickBooks, use: select * from InvoiceLine UNOPTIMIZED WHERE Txndate> {d '2006-04-01'} Or you can resync your optimized InvoiceLine table by first doing the following: sp_optimizefullsync InvoiceLine Then read directly out of the optimized table by doing the following: select * from InvoiceLine NOSYNC WHERE Txndate> {d '2006-04-01'} This is very fast. Another good example of using NOSYNC would be to get, for example, all historical invoice lines before 2003: SELECT * from InvoiceLine NOSYNC WHERE Txndate< {d '2004-01-01'} As invoices before 2004 never change, you can read them directly from the QODBC Optimizer. You need to use unoptimized for critical operations like Sales Commissions etc. Optimizer Setup in MS SQL Server Linked ServerNote: QODBC build number 324 or lower - "sp_optimizefullsync Customer" "sp_optimizeupdatesync Customer" or doesn't return any rows and cannot be run directly through a SQL Server-linked server. A workaround would be for an Update Sync: SELECT * FROM OPENQUERY(QRemote, 'SELECT TxnID FROM Customer OPTIMIZE WHERE TxnID = "x"') Full Sync: SELECT * FROM OPENQUERY(QRemote, 'SELECT TxnID FROM Customer VERIFY WHERE TxnID = "x"')
QODBC build number 325 onwards, you can now use sp_optimizefullsync and sp_optimizeupdatesync commands directly through a SQL Server linked server.
Update Sync: SELECT * FROM OPENQUERY(QRemote, 'SP_OPTIMIZEUPDATESYNC Customer') Full Sync: SELECT * FROM OPENQUERY(QRemote, 'SP_OPTIMIZEFULLSYNC Customer')
Typical Questions About OptimizerQ: Is there any way to reduce the size of the optimizer file? Perhaps optimizing fewer tables? A: Not Really. You can delete the.OPT file, then NOT run the "Reload All Data." QODBC will optimize only the tables that are referenced.
Q: Would turning on or off the multi-table sync make a difference? Yes, it would slow it down but would the data still be synced in real-time? A: Multi-table sync applies to the computed QuickBooks fields, such as QtyOnHand, AccountBalance, IsPaid, IsReceived, and similar fields. Turning Multi-Table Sync on will touch more tables, loading more table data into the.OPT
Q: Anything I can do on the server or network? A: As far as putting the. QBW file updates. Is the OPT file there? Anything else, not really. The only issue I have seen there is a McAfee problem with a general issue.
Q: Is it common for an optimized file to become corrupt twice a month? What would cause this issue? A: I have not heard anyone complain about that happening that frequently, so no. Does access shut down or crash during use? That would be the biggest issue I can think of.
Q: Is there a way to automatically reload the file each night when employees leave? A: In the QODBC Driver For QuickBooks folder is a file called QODBCUPD.exe. Running that program does a "Reload All Data." That can be scheduled, but it has to run as the logged-in user. | |
|
Optimizer file is user-specific & it cannot be shared you cannot copy or move optimizer files from one location to another. There is no way to make it shareable.
So please assign user directory path "%AppData%\QODBC Driver for QuickBooks\Optimizer" which will create Optimizer file user specific.
You need to build optimizer file path for each user separately.
If I am running a process that accesses both Invoice and InvoiceLine, do I need to call sp_optimizeupdatesync for EACH table? Or only on one of them because they are related? If only one, does it matter which?
You need to optimize parent table only. There is no need to optimize child table separately.
For Example:
When you optimize "Invoice" table, QODBC will automatically optimize the child table "InvoiceLine", i.e Invoice & InvoiceLine will be optimized.
When you optimize "Bill" table, QODBC will automatically optimize the child tables "BillItemLine' & "BillExpenseLine", i.e Bill, BillItemLine & BillExpenseLine will be optimized.
You will get updated data on executing the query.
There is no need to rebuild Optimizer file daily.
You may need to rebuild Optimizer file if Optimizer file got corrupted.
You can refer below mentioned link for verifying that Optimizer file corrupted or not:
http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2636/44/troubleshooting---how-to-verify-if-optimizer-file-corrupted-or-not
If Optimizer file is corrupted, then You need to reset your QODBC optimizer file using sp_optimizefullsync ALL command.
If you are still the facing issue, Please raise a support ticket to the QODBC Technical Support department from below mentioned link & provide requested information:
http://support.flexquarters.com/esupport/index.php?/Tickets/Submit
We may need the following information, Please attach below listed files when replying to the ticket.
1) Screenshot of QODBC Setup Screen -- > About
2) Screenshot of the issue you’re facing.
Share Entire Log Files as an attachment in text format from
3) QODBC Setup Screen -- > Messages -- > Review QODBC Messages
4) QODBC Setup Screen -- > Messages -- > Review SDK Messages
Refer: How to take screenshot: www.qodbc.com/links/screenshot.htm
If you are using MS Access, you will have to remove the linked tables and re-add the linked tables to refresh the Optimizer file path changes.