|
Prev: Timestamps on data records, Documentation on old versions of DB2
Next: SQL0101N The statement is too long or too complex. SQLSTATE=54001
From: Eric Davidson on 2 Jul 2008 15:49 DB2 9.5 I keep geting the message. SQL0101N The statement is too long or too complex. SQLSTATE=54001 When one of my sql statements takes over 60 seconds to compile the sql statement. Is there any parameter that controls how long DB2 allows a statement to compile for. I have increased the statement heap size and this does not solve the problem. Eric.
From: Serge Rielau on 3 Jul 2008 09:26
Eric Davidson wrote: > DB2 9.5 > > I keep geting the message. > > SQL0101N The statement is too long or too complex. SQLSTATE=54001 Is this an UPDATE/DELETE or INSERT statement? Do you have triggers on the table and/or RI? Does the trigger update other tables which have triggers, which.... (you get the picture). Similar scenarios can happen with SQL Functions calling SQL Functions. Oftentimes I have seen stuff liek this: VALUES CASE WHEN compelxfoo() = 1 THEN 1 WHEN complexfoo() = 2 THEN 2 .....END Teh macro extension of SQL Function and triggers can get you in trouble... So please post (or send me if you feel more comfortable with it) more info (statement text and involved object defs) Cheers Serge -- Serge Rielau DB2 Solutions Development IBM Toronto Lab |