Skip to Content

No more memory [S1000] after large SQL statement

Folks,

for quite a while we've successfully been running SAP MaxDB with our proprietary / legacy document management system, and for the most parts, this is / has been a rather pleasant experience after getting it optimized a bit. Right now, however, we again ran into a painful yet reoccuring issue. As things continuously grow, we sometimes end up with monster SQL statements just alike this one:

SELECT DISTINCT A_.id, A_.infotext, A_.media, A_.storagetype, A_.family, A_.cached, A_.systemstate, A_.userstate, A_.searchable, A_.randompart, A_.lockcount, A_.creatorid, A_.creationtime, A_.pages, A_.nrreferences, A_.nrlayers, A_.versioncurrent, A_.location, A_.cflocation, A_.baselocation
    FROM DocInfo A_, APlan A_ACQ_
   WHERE ((A_.searchable=1) AND (A_.family=9020) AND (A_.userstate IN(9, 0, 13)) AND (A_.id IN(20269469, 19795951, 17327451, 17327453, 17327452, 17327460, 18090362, 18090314, 17232430, 17853619, 17853621, 17853622, 17324890, 17853623, 17853624, 17853625, 17853634, 17853658, 17285159, 17853662, 17285171, 17853663, 17285170, 17853673, 17285191, 17853684, 17853688, 17853691, 16670416, 16783016, 16891377, 17678469, 18126752, 16783018, 16891374, 17678470, 18126751, 16783023, 16891373, 17678471, 18126750, 16783021, 16891376, 17678464, 18126749, 16783017, 16891378, 16946379, 16958007, 17678462, 18126748, 16783020, 16891375, (... thousands of other IDs...), 20597625, 20597626, 20597627, 20598405, 20598409, 20598414, 20598416, 20598427, 20598432, 20598436, 20598438, 20598442, 20605501, 20605502, 20606251, 20606252, 20606253, 20606254, 20606255, 20606256, 20606257, 20606258, 20606261, 20606262, 20606265, 20607158, 20607160, 20713225, 20713227, 20713255, 20713259, 20724683, 20724684, 20724685, 20724686)) AND (((A_ACQ_.Maxix='max') AND (A_ACQ_.Projekt IN('AAWK', (... hundreds of other project identifiers...) 'square41')) AND (A_ACQ_.Projekt='Bar')) AND ((A_ACQ_.Dokart='-L') OR (A_ACQ_.Dokart='-P') OR (A_ACQ_.Dokart='-D') OR (A_ACQ_.Dokart='-C') OR (A_ACQ_.Dokart='-S'))))
     AND A_.id = A_ACQ_.docid
  ORDER BY A_.id

... which, in our MaxDB configuration, usually end up in error messages just like that:

[Thu Aug 18 11:08:53 2011] DbException: [SAP AG][LIBSQLOD SO][MaxDB] General error;-915 POS(1) No more memory [S1000]

Right now, we tried tracking down this issue just to find the recommentations to deal with this don't really apply to or work for us. So to ask: Is there any smart thing we can do to get these queries through? How and which memory to increase in order to not make this happen again? Is there anything we can do about it, at all? Unfortunately, the O/R "mapper" to create these statements is part of the proprietary system, thus we have no real way to change this behaviour anytime soon. 😔

TIA and all the best,

Kristian

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 23, 2011 at 11:16 AM

    What database version are you running?

    Markus

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.