If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Stored Proc Performance analysis vs using User temp tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-13-09, 17:15
NEE NEE is offline
Registered User
 
Join Date: May 2009
Posts: 16
Stored Proc Performance analysis vs using User temp tables

I want to confirm the best way to maintain performance, I have a SQL cursor which is called in using Java connection, The results are displayed on front end page by page, say if the query returned 100 records, each on front end displays 25 records. Now there is a feature given where in the results can be sorted for one particular page like say teh fields on page are custId, Place, Points, Date etc. Now the page can be sorted on each field.


I have to take a call where teh best performance will be write a stored procedure on DB2 send teh result sets to teh application as an open session porcedure, the result set at application server should be stored in temporary tables and the sorting should be done in the local cache at teh app server side.

The other way is to write the scroll insensitive DB2 cursor directly in java code and save the results in local cache.

Please see this query needs to be frequently run and on tables which gets updated very frequently and are large tables. at a time there are many diff users having sdiff session using the query on same table since it is read only query.

So my decision was to use the Java code withDB2 scroll insensitive cursor, please suggest , if there wud be any other feature of DB2 I can use for better query performance and database management

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On