Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Posts
    27

    Unanswered: error while running query

    hi all
    when i am running a query against a database i am getting the following error

    SQL0437W performance of this complex query may be sub-optimal.reason code:"3". SQLSTATE=01602
    0 row(S) affected.

    i am running this on db2V8.7 on solaris.

    this a big query with lot of predicates and joining around 9 tables.

    i have tried running runstats on tables invoved in the query but still the problem is not fixed.
    ibm explains this reason code as optimizer cost underflow. what exactly this means and how to solve this problem.
    actually this query was running fine earlier.

    Thanks.......

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    It is a warning message. Do you have a problem with the answer set or the query execution time?
    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
    Jan 2003
    Posts
    1,605
    Quote Originally Posted by rajaryan4545
    hi all
    SQL0437W performance of this complex query may be sub-optimal.reason code:"3". SQLSTATE=01602
    0 row(S) affected.
    Hi,
    if there are performance problems this means two thinks:
    1. SQL is badly written -> rewrite SQL.
    2. SQL is really too complex -> make it more simple.

    Can you post the SQL and table definitions including primary and foreign keys?
    Hope this helps,
    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
  •