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 > error while running query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-07, 23:57
rajaryan4545 rajaryan4545 is offline
Registered User
 
Join Date: Nov 2007
Posts: 27
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.......
Reply With Quote
  #2 (permalink)  
Old 12-19-07, 00:54
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 12-19-07, 02:58
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
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
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