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 : Speed in SelectSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Speed in Select 
 Author   Message 
  Vlad 
  
 Group: Members 
 Posts: 32 
 Joined: 2007-09-25 
 Profile
 Posted : 2007-09-25 23:57:42

I have a strange behaviour of my Select statement.

I'm using this code to populate Grid control with data from Customer table:

strSQL = "SELECT .... FROM Customer WHERE  (ParentRefListID Is NULL)"

cndODBCTempSelect = New OdbcCommand

cndODBCTempSelect.CommandText = strSQL

cndODBCTempSelect.CommandType = CommandType.Text

cndODBCTempSelect.Connection = objQBConn

drODBCTemp = cndODBCTempSelect.ExecuteReader

dsTemp.Load(drODBCTemp, LoadOption.PreserveChanges, dsTemp.Tables(0))

ugQBCustomer.DataSource = dsTemp.Tables(0)

ugQBCustomer.DataBind()

When I include all fields one by one in my strSQL then I get result pretty fast (4-5 seconds for 2000 records). In order to get only needed values and make it faster I exclude part of fields from Select statement. In this case I get result in 2-3 minutes. Why is that? In SQL Server, Access and all other databases I know, the less data you request the faster you get it. It's not working that way with QuickBooks and QODBC.

I'm using VB 2005

Thank you

Vlad

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-09-26 08:53:50

You haven't exactly shown what was slow, but using QODBC v8.00.00.234 I ran:

SELECT * FROM Customer WHERE ParentRefListID Is NULL

and

SELECT {fn Curtime()}, ListID, Name, FullName, IsActive FROM Customer WHERE ParentRefListID Is NULL

Query Result 54 rows
Start:  15:49:47
Finish: 15:49:47

and there where no difference I could see in the speed in returning the 54 rows.

 

  Top 
  Vlad 
  
 Group: Members 
 Posts: 32 
 Joined: 2007-09-25 
 Profile
 Posted : 2007-09-27 10:57:12

This is the sample which takes too much time. I just excluded some fields:

strODBCSelect = "SELECT ListID, FullName, IsActive, " & _

"CompanyName, " & _

"BillAddressAddr1, BillAddressAddr2, BillAddressAddr3, " & _

"BillAddressAddr4, BillAddressAddr5, BillAddressCity, BillAddressState, " & _

"BillAddressPostalCode, BillAddressCountry, BillAddressNote, BillAddressBlockAddr1, " & _

"BillAddressBlockAddr2, BillAddressBlockAddr3, BillAddressBlockAddr4, " & _

"BillAddressBlockAddr5, ShipAddressAddr1, ShipAddressAddr2, ShipAddressAddr3, " & _

"ShipAddressAddr4, ShipAddressAddr5, ShipAddressCity, ShipAddressState, " & _

"ShipAddressPostalCode, ShipAddressCountry, ShipAddressNote, ShipAddressBlockAddr1, " & _

"ShipAddressBlockAddr2, ShipAddressBlockAddr3, ShipAddressBlockAddr4, " & _

"ShipAddressBlockAddr5, Phone, AltPhone, Fax, Email, Contact, AltContact, " & _

"CustomerTypeRefFullName " & _

"FROM Customer WHERE (ParentRefListID Is NULL)"

 

 

 

 

 

 

 

 

 

 

 

 

I noticed one thing - if I remove fields from the end of the list, first the most last, then again the most last etc then there is no degradation in speed. If I remove any fild(s) from any other part of the list (beginning, middle part) then it slows down dramatically.

I'm using Version 7.10.00.231

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-09-27 11:54:21
Please download and install QODBC v8.00.00.234 (or higher) over the top of your current installed version. See: How can I get the latest version of QODBC? , as the QODBC optimizer has been enhanced. 

  Top 
  Vlad 
  
 Group: Members 
 Posts: 32 
 Joined: 2007-09-25 
 Profile
 Posted : 2007-09-27 21:56:40

Is it free? Or if not then how do I go back to my registered version?

Thank you

Vlad

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-09-27 23:08:29
QODBC v8 is designed to work 2006, 2007 or 2008 QODBC CD Keys. You only need to purchase a new QODBC CD Key if you change the version of QuickBooks you are using to a newer version. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to