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
|
|
BillExpenseLine Query taking a very long time |
Author |
Message |
|
Posted : 2007-03-14 08:51:24 |
Hi, I'm trying to query for all vendor expenses for a particular job. Here is my SQL:
select * from BillExpenseLine where ExpenseLineCustomerRefListID = '800007DA-1171051930'
It comes back but in a very very long time. I know if I have the TxnID it runs quite quickly but in my case I don't have that information. Is there an alternate way to try to get this to run faster? Maybe hinting to QODBC to create a custom index on this column? I've tried the optimizing sp with no luck.
Thanks, Paul |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-03-14 10:33:29 |
Yes, providing the QODBC optimizer is running, do:
select * from BillExpenseLine NOSYNC where ExpenseLineCustomerRefListID = '800007DA-1171051930'
The real problem is that ExpenseLineCustomerRefListID or ExpenseLineCustomerRefFullName are not jump-ins (which act as indexes):-
Likewise, ItemLineCustomerRefListID or ItemLineCustomerRefFullName are also not jump-ins:-
But, for jobs we need them to be. I've requested they be added as "optimized jump-ins". |
|
|
|
|
Posted : 2007-03-14 10:47:42 |
wow, excellent response! That did the trick... |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-09-25 09:48:38 |
The Jumpin list shows actual jumpins provided by the QuickBooks qbXML SDK and queries run better when using CALLDIRECT or NOSYNC. The reason for this is that all Jumpins also have optimizer indexes created. There is a optimized hardcoded index on CustomerRefListID seen in the trace log as (FQSPECIAL6):
index BillExpenseLine_FQSPECIAL BillExpenseLine 284 CREATE INDEX "BillExpenseLine_FQSPECIAL4" ON "BillExpenseLine" ("ExpenseLineTxnLineID") index BillExpenseLine_FQSPECIAL BillExpenseLine 288 CREATE INDEX "BillExpenseLine_FQSPECIAL5" ON "BillExpenseLine" ("ExpenseLineAccountRefListID") index BillExpenseLine_FQSPECIAL BillExpenseLine 292 CREATE INDEX "BillExpenseLine_FQSPECIAL6" ON "BillExpenseLine" ("ExpenseLineCustomerRefListID")
QODBC v8.00.00.234 now has ItemLineCustomerRefListID or ItemLineCustomerRefFullName optimized indexes:
|
|
|
|
|