cancel
Showing results for 
Search instead for 
Did you mean: 

-1103 POS(1) Too complicated SQL statement [S1000]?

former_member192710
Participant
0 Kudos

Folks;

again ran into my most favorite "too complicated SQL statement" error. In this special case however, the statement is not really complex but "just" large:


SELECT DISTINCT A_.ITEM
  FROM DOCUMENTS A_
  WHERE (A_.id IN(36705154, 36705153, 36705152, 36703976, 36703975, ...

[...]

approximately 5000 more ids go here

[...],

30645309))

Trying to track this down, I found a few traces of similar issues and suggestions to set particular environment variables in the MaxDB instance both here and on external mailing lists, some of them rather old. However, as far as I can tell, we already tried all these things (including EnableVariableInput and MAX_PACKET_SIZE) before.

Any other ideas? MaxDB is 7.8.02.28 on RedHat. This seems to happen both with a native Linux application connecting via UnixODBC and with a Java application connecting via the 7.8 JDBC driver.

TIA and all the best,

Kristian

MySQL Lists: maxdb: AW: com.sap.dbtech.jdbc.exceptions.DatabaseException: [-1103]: Too complicated S...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Kristian,

depending on the database version you are using you have to increase the following parameters:

MaxDB <=  7.6.04 ->  _WORKSTACK_SIZE to max. 32768 Bytes
MaxDB >= 7.605  -> _WORKSTACK_SIZE = to max. 262136 Bytes

MaxDB <= 7.7.04.23 ->  InterpreterWorkStackSize = 32768 Bytes

MaxDB >= 7.7.04.24 and 7.8 and 7.9 -> InterpreterWorkStackSize = 262136 Bytes

This should solve the problem.

Regards, Christiane

former_member192710
Participant
0 Kudos

Hi Christiane;

and first off, again thank you very very much for your help on that - greatly appreciated.

So I set the parameters in our database instance according to your recommendations and at least in the JDBC access, the query that used to cause these problems by now works flawlessly. I'll mark this as resolved and see how things will move on.

Thanks again, have a great week!

Best regards,

Kristian

Answers (0)