Skip to main content

Celonis Product Documentation

Inner partition did not fit in memory

Problem

Transformation query failing with the “Inner partition did not fit in memory” message.

Root cause

It is likely that table statistics are missing from one or more tables involved in a query.

Table statistics are analytical summaries of tables that assist the query optimizer in making better decisions. Table statistics significantly improve query performance, often reducing the query execution time by over 50%.

When to add statistics?

For tables extracted from source systems using Celonis extractors – i.e., “Raw” tables such as VBAP, VBAK, EKKO, EKPO – table statistics are automatically gathered for each table after the extraction.For additional tables created during the transformation phase – e.g. the temporary join table TMP_CDHDR_CDPOS, or data model tables you create – it’s necessary to create statistics explicitly.Also, if there is a significant change in existing tables with INSERTs, DELETEs, or UPDATES, it is necessary to refresh statistics.

Solution

Add Statistics to resolve the issue. After each CREATE TABLE statement that creates and populates a table or after there is a change in the content of a table, Statistics can be created or refreshed using the following statement:

SELECT ANALYZE_STATISTICS ('TABLE_NAME');
Table_statistics.png

The database will then gather table statistics when the transformation or query is executed.

For more information, see the Academy course on Transformation best practices.