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 : First query to any table takes foreverSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 First query to any table takes forever 
 Author   Message 
  Ken Brey 
  
 Group: Members 
 Posts: 9 
 Joined: 2008-02-09 
 Profile
 Posted : 2008-02-22 11:30:53
On a new installation of OQDBC 8 with QB 2008 using the VB Demo 32 program, the first time that I query any table, it takes several minutes to get any results.  Subsequent queries to the table are very fast.  It tried it with the optimizer on or off with similar results. 

Here is an example of one query which took over 10 minutes:

SELECT * FROM TimeTracking Where TxnDate>={d'2007-11-18'} And TxnDate<={d'2007-11-25'}

Subsequent queries changing the dates ran in seconds.

The worst is if I try to query the Invoice table.  I can't tell how long this one takes because it is still running:
Select * from Invoice

What causes it to take so long the first time and what can be done about it?
 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-02-22 18:18:56

When you run the first query for the day, a number of things have to happen like the actual connection to QuickBooks and a update sync operation. If you want to by-pass waiting for a update sync do:

SELECT * FROM TimeTracking NOSYNC Where TxnDate>={d'2007-11-18'} And TxnDate<={d'2007-11-25'}

Again if you have four years of invoices, never do a Select * from Invoice, do

SELECT * FROM Invoice Where TxnDate>={d'2007-11-18'} And TxnDate<={d'2007-11-25'}

See: How do I setup the QODBC Optimizer? Where are the Optimizer options? for more information.

 

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to