Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query speed with sybase and isql

Status
Not open for further replies.

AMRobinson

Programmer
May 4, 2000
1
US
I find that doing a simple query against a table with 114,000 records requires 9 seconds to return the results, but the same query via isql is at least ten times quicker!<br><br>select * from txn<br>where propid = getcusid<br>order by invoicenumber, txndate<br><br>this is my query, and it works just fine, it just takes too long. Eliminating the &quot;order by&quot; clause does not speed things up noticeably.
 
Hi Robinson,<br>Can you be a little more clear on your problem.&nbsp;&nbsp;From my understanding, the SQL when fired from inside a Stored Procedure / Front End takes 9 seconds to execute and from isql, it starts giving me results much quicker.&nbsp;&nbsp;Is this correct ?<br><br>If this is the problem then the answer is yes, it takes time for the cursor to be built, rows to be fetched into the cursor and the control to return back to the Stored Procedure, whereas from isql, it is only a matter of displaying the results on the screen. So it immediately starts showing up.&nbsp;&nbsp;<br><br>Please let me know whether I am able to answer your question.
 
I appreciate your help, but I have already resolved the issue. The problem turned out to be additional code in the calling routine. Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top