How to Configure House Keeping in iDempiere

The House Keeping window in iDempiere lets administrators schedule the deletion of temporary and process-generated records, such as inventory valuation runs, selection sets, and report buffers. In retail operations with high transaction volume across POS, inventory, and reporting processes, these temp tables grow quickly and slow down the database. House Keeping keeps the system lean by removing stale records on a defined SQL condition, directly improving report performance and query response time.

Process Flow

TenthPlanet iDempiere HouseKeeping 1

Business Rules

  • Active House Keeping records are eligible for manual or scheduled execution.
  • The SQL WHERE clause determines exactly which records are deleted from the target table.
  • Save In Historic retains a copy of deleted rows before removal for audit purposes.
  • Export XML Backup writes an XML copy of records prior to deletion.
  • Last Run and Last Deleted fields log the outcome of the most recent execution.
  • Inactive House Keeping records are skipped during batch or scheduled runs.

Prerequisites

  • System Administrator role access to the System Admin menu.
  • Target table already exists in the Table window (Application Dictionary).
  • SQL WHERE clause tested and validated against the target table.
  • Backup or archival process confirmed if records must be retained before deletion.

Navigation

Home → System Admin → General Rules → House Keeping

Configuration Steps

Step 1: Identify the Record and Search Key

Enter a unique Search Key and a descriptive Name explaining what the job deletes, for example “Delete T_InventoryValue records preserving last week”.

FieldSample ValueDescription
Search KeyT_InventoryValueUnique code identifying this House Keeping job
NameDelete T_InventoryValue records preserving last weekDescribes the cleanup purpose

Step 2: Select the Target Table

Select the table from the dropdown, for example T_InventoryValue_T_InventoryValue, matching the process or report table generating the temp data.

FieldSample ValueDescription
TableT_InventoryValue_T_InventoryValueTarget table cleaned by this job

Step 3: Define the SQL WHERE Clause

Enter a WHERE condition referencing a date or key field, for example filtering by AD_PInstance created date older than seven days.

FieldSample ValueDescription
Sql WHEREAD_PInstance_ID IN (SELECT AD_PInstance_ID FROM AD_PInstance WHERE Created <= SYSDATE – 7)Deletes only records older than 7 days

Note: Always test the WHERE clause as a SELECT statement first to confirm the expected row count before saving the House Keeping record.

Step 4: Set Retention Options

Enable Save In Historic to retain rows internally, or Export XML Backup to generate an external XML file before deletion. Leave both unchecked for routine temp-data cleanup.

FieldSample ValueDescription
Save In HistoricUncheckedKeeps a historic copy of deleted rows when enabled
Export XML BackupUncheckedExports deleted rows to XML before removal when enabled

Step 5: Run House Keeping and Review Results

Click the House Keeping button, then check Last Run and Last Deleted to confirm execution date, time, and the number of rows removed.

FieldSample ValueDescription
Last Run07/27/2026 11:26:30 AMTimestamp of the most recent execution
Last Deleted0Number of rows removed in the last run
ActiveCheckedDetermines if the record runs during scheduled execution

Common Issues and Resolutions

IssueCauseResolution
Deletion removes more rows than expectedSQL WHERE clause too broad or missing a filter conditionTest the WHERE clause as a SELECT first and add a date or ID filter
Last Deleted always shows 0WHERE clause does not match any current records or wrong table selectedVerify the Table field and confirm the WHERE condition against live data
Important records deleted with no recovery optionSave In Historic and Export XML Backup left uncheckedEnable Save In Historic or Export XML Backup before running sensitive cleanups
House Keeping record does not run on scheduleActive checkbox unchecked on the recordCheck the Active box and confirm the job is included in the scheduler
Job runs slowly on large tablesWHERE clause scans the full table without an indexed filterUse indexed columns such as Created or AD_PInstance_ID in the WHERE clause
Export XML Backup file cannot be locatedExport path not accessible to the application serverConfirm the server export directory and file permissions
Wrong table cleaned by mistakeIncorrect Table selected during configurationRe-check the Table dropdown value before saving the record

Next Steps

  • Configure the Scheduler window to automate recurring House Keeping runs.
  • Review the Archive Viewer for tables retained under Save In Historic.
  • Check System Rules and server logs to confirm cleanup jobs completed successfully.