Results 1 to 6 of 6

Thread: End_sql

  1. #1
    Join Date
    Feb 2004
    Posts
    21

    Unanswered: 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?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    Join Date
    Feb 2004
    Posts
    21
    Marcus_A, much appreciated

  4. #4
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    but I don't bealive that FOR READ ONLY:
    "The server will read blocks of data much faster."
    Hope this helps,
    Grofaty

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  6. #6
    Join Date
    Jan 2003
    Posts
    1,605
    sathyaram_s,
    I have tested several SQLs but no one had performance benefit from specifying FOR READ ONLY.
    Grofaty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •