× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Prepared statements are nice.  However, I "think" they are all thrown into 
the CQE and not the enhanced SQE.  Also, there is some stuff that gets 
stored in the program after you actually run it that helps performance on 
the next execution of the sql statement.  You can see that with PRTSQLINF. 
 An example is:
DECLARE C1 CURSOR FOR SELECT CAST ( SUBSTRING ( BIGTEXT , 1 , 10 ) AS DATE 
) AS 
    THEDATE FROM BLASTME  
  SQL4021  Access plan last saved on 02/20/07 at 16:23:57.  
  SQL4020  Estimated query run time is 0 seconds.  
  SQL402D  Query attributes overridden from query options file QAQQINI in 
library QUSRSYS.
  SQL4010  Table scan access for table 1.  
UPDATE AAAKEY SET COMP = 1 WHERE LOC = 'a'  
  SQL4021  Access plan last saved on 02/20/07 at 16:23:56.  
  SQL4020  Estimated query run time is 0 seconds.  
  SQL402D  Query attributes overridden from query options file QAQQINI in 
library QUSRSYS.
  SQL4008  Index AAAKEY used for table 1.  
  SQL4026  Index only access used on table number 1.  
  SQL4011  Index scan-key row positioning used on table 1.  
  SQL4006  All indexes considered for table 1.  
GET DIAGNOSTICS : H = ROW_COUNT  
OPEN C1  
5722SS1 V5R4M0 060210     Print SQL information          Program 
ROB/AAASQL 
WHENEVER SQLERROR CONTINUE  
FETCH C1 INTO : H  
                               * * * * *  E N D  O F  L I S T I N G  * * * 
* * 

However, I don't think prepared statements get any of this benefit.


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.