When doing the following merge (tempchoices is a temporary table created with DECLARE GLOBAL TEMPORARY TABLE tempchoices LIKE CHOICES NOT LOGGED IN importtemp ON COMMIT PRESERVE ROWS) all my diskspace gets used and I receive the "The file system is full" error.
MERGE into CHOICES ar
USING (SELECT * from session.tempchoices ) ac
ON ar.CHOICE_NAME = ac.CHOICE_NAME AND ar.CHOICE_LIST_NAME =
'account' AND ar.LOCALE = 'de_CH'
WHEN MATCHED and ar.DISPLAY_NAME != ac.DISPLAY_NAME THEN
UPDATE SET DISPLAY_NAME = ac.DISPLAY_NAME, DEPENDENT_VALUE =
ac.DEPENDENT_VALUE
WHEN NOT MATCHED THEN
INSERT (CHOICE_LIST_NAME, CHOICE_NAME, DISPLAY_NAME, VALUE, LOCALE,
SORT_ORDER, DEPENDENT_VALUE)
VALUES (ac.CHOICE_LIST_NAME, ac.CHOICE_NAME, ac.DISPLAY_NAME, ac.VALUE,
ac.LOCALE, ac.SORT_ORDER, ac.DEPENDENT_VALUE)
How can I avoid this error?
Resizing the disk is not an option.
What I have tried is setting the DB2_OPT_MAX_TEMP_SIZE option but with no observable result.
Both tables contain about 600'000 entries.
DB2 Version is 10.5 and I observe this both on Linux and Windows servers.