Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Extremely slow ODBC Select querySearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v8 Forum

 New Topic 
 
 Post Reply 
[1]  
 Extremely slow ODBC Select query 
 Author   Message 
  David 
  
 Group: Members 
 Posts: 2 
 Joined: 2008-07-25 
 Profile
 Posted : 2008-07-25 03:42:46

Can someone please tell me if this is normal times.

Quickbooks enterprise 10 user

QBW file is 885 MB on a mapped network drive. Using the VB Demo

if I setup to not optimize this simple select statement

SELECT SalesReceipt.RefNumber, SalesReceipt.ShipAddressAddr1, SalesReceipt.ShipAddressAddr3, SalesReceipt.ShipAddressAddr2, SalesReceipt.ShipAddressAddr4, SalesReceipt.ShipAddressAddr5, SalesReceipt.ShipAddressCity, SalesReceipt.ShipAddressState, SalesReceipt.ShipAddressPostalCode
FROM SalesReceipt  WHERE SalesReceipt.RefNumber='32736'

Takes 10 - 13 seconds to return the record.

I ran SP_OPTIMIZEFULLSYNC SalesReceipt

tuned on the show optimize panel it ran for over 45 minutes and it never moved from 0 and the opt file size never changed.

this is after runing a data verify and replacing the OPT file with a new one.

I am trying to pull data for shipping but this obviously is taking too long.

i have the latest version of QODBC also.

Is this normal? or am I going about it the wrong way?

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-25 07:52:33
Change your optimization settings to use the The start of every new connection (with "Load Updated Data" first) option and confirm that the Multi-Table Sync option has been disabled. If not, uncheck the Multi-Table Sync option as this is often defaulted on (checked) with QuickBooks Enterprise and the QODBC Enterprise Desktop Edition.

Once this has been done, reset the opt file as per How do I switch OFF or RESET the QODBC optimizer? Re-run the query and the QODBC optimizer will automatically build a SQLite Server mirror image of the Sales Receipt table. But you will need to let it finish doing the operation which may take a like time depending on the number of Sales Receipts you have.

For the complete details of all the QODBC optimizer settings, see: How do I setup the QODBC Optimizer? Where are the Optimizer options? 

 

  Top 
  David 
  
 Group: Members 
 Posts: 2 
 Joined: 2008-07-25 
 Profile
 Posted : 2008-07-25 22:12:18

I did this, the table has 107,000 records in it, would it be normal for it to run more than an hour and not have processed the first record?

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-07-26 06:25:46

The first query will have to optimze the 107,000 records. Once that's done it will be faster. Then historical data can be retrieved directly from the optimized table like this:

SELECT SalesReceipt.RefNumber, SalesReceipt.ShipAddressAddr1, SalesReceipt.ShipAddressAddr3, SalesReceipt.ShipAddressAddr2, SalesReceipt.ShipAddressAddr4, SalesReceipt.ShipAddressAddr5, SalesReceipt.ShipAddressCity, SalesReceipt.ShipAddressState, SalesReceipt.ShipAddressPostalCode
FROM SalesReceipt  NOSYNC WHERE SalesReceipt.RefNumber='32736'

If it's a new Sales Receipt you can still call QuickBooks directly and bypass update optimization by doing:

SELECT SalesReceipt.RefNumber, SalesReceipt.ShipAddressAddr1, SalesReceipt.ShipAddressAddr3, SalesReceipt.ShipAddressAddr2, SalesReceipt.ShipAddressAddr4, SalesReceipt.ShipAddressAddr5, SalesReceipt.ShipAddressCity, SalesReceipt.ShipAddressState, SalesReceipt.ShipAddressPostalCode
FROM SalesReceipt  CALLDIRECT WHERE SalesReceipt.RefNumber='32736'

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to