Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    1

    Unanswered: select statement taking ages

    hi
    im running this simple select query from data studio

    select * from ORDERSLIST with ur

    (i was actually testing a stored procedure which is taking 90-100 seconds now, where as it was just taking 4-5 seconds a few days back)
    i found out that this select query now is taking 40-50 seconds in my DB..

    cound some 1 help on this?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    How many rows in the table?
    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
    Nov 2005
    Location
    IL
    Posts
    557
    Did you introduce any changes to your environment or db?
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  4. #4
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963
    Try to change your query from

    select * from ORDERSLIST with ur
    to

    select * from ORDERSLIST
    optimize for N rows
    fetch first N rows only
    with ur
    Lenny K.

Posting Permissions

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