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 > End_sql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-23-06, 22:07
Stupe Stupe is offline
Registered User
 
Join Date: Feb 2004
Posts: 21
End_sql

Hi gurus

Under my Business Objects documentation, there's a function that allows the usage of END_SQL (whatever that means), and its description:
Code:
For IBM DB2 databases, you can use the following:
END_SQL=FOR SELECT ONLY
The server will read blocks of data much faster.
I tried out the function, and what happened was this:
Code:
SELECT DISTINCT
  RTRIM(LU_STOCK.STOCK_ID)
FROM
  LU_STOCK
END_SQL=FOR SELECT ONLY
Ran it in a query tool, but that query doesn't work. Searched in Google, but couldn't find anything on this. How does this work?
Reply With Quote
  #2 (permalink)  
Old 04-23-06, 23:33
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Try this:

SELECT DISTINCT
RTRIM(LU_STOCK.STOCK_ID)
FROM
LU_STOCK
FOR READ ONLY
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 04-24-06, 02:20
Stupe Stupe is offline
Registered User
 
Join Date: Feb 2004
Posts: 21
Marcus_A, much appreciated
Reply With Quote
  #4 (permalink)  
Old 04-25-06, 06:47
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
but I don't bealive that FOR READ ONLY:
"The server will read blocks of data much faster."
Hope this helps,
Grofaty
Reply With Quote
  #5 (permalink)  
Old 04-25-06, 07:09
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Grofaty, I think FOR READ ONLY, the request becomes UNAMBIGUOUS and therefore data from the server is transferred to the client in BLOCKs rather than one row at a time, as in case of Updatable result sets ..

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #6 (permalink)  
Old 04-25-06, 08:31
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
sathyaram_s,
I have tested several SQLs but no one had performance benefit from specifying FOR READ ONLY.
Grofaty
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