This error is occurring because we are running out of disk space for overflow files. On a workstation this query runs for 2 hrs and gives the same error with core files that have 0 bytes. A few seconds before the error we have 634 * 2GB = 1268 GB of overflow files lsof +L1 | grep SCR | wc -l 634 df shows that we are almost out of disk space df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg01-lvol1 1.9T 1.8T 1.6G 100% /opt/home the query has 2 big overflowing operators. We are about 50% through the first one, node 42 in the stats report below. (17 Billion rows out of an expected 40 billion). The core file can be avoided if we use the cqd OVERFLOW_MODE 'DISK'. By default we use memory mapped IO for overflow. When overflow runs out of disk space it generates a core file with memcpy or something similar in the trace as shown here. I think that is unavoidable. One could say that the compiler could generate a better plan for this query and possibly evaluate the UDFs before the big join. That would be a wishlist item. I would like to close this bug report or change it to a wishlist against the UDF plan quality. Thanks. get statistics for qid MXID11000020789212294050944156777000000000206U3333300_892_X2 default ; .. Qid MXID11000020789212294050944156777000000000206U3333300_892_X2 Compile Start Time 2015/03/25 13:43:15.160008 Compile End Time 2015/03/25 13:43:16.931895 Compile Elapsed Time 0:00:01.771887 Execute Start Time 2015/03/25 13:43:16.969590 Execute End Time -1 Execute Elapsed Time 1:59:46.852797 State OPEN Rows Affected -1 SQL Error Code 0 Stats Error Code 0 Query Type SQL_SELECT_NON_UNIQUE Sub Query Type SQL_STMT_NA Estimated Accessed Rows 0 Estimated Used Rows 0 Parent Qid NONE Parent Query System NONE Child Qid NONE Number of SQL Processes 40 Number of Cpus 2 Transaction Id -1 Source String select nation, o_year, cast(sum(amount) as numeric(18,2)) as sum_profit from ( select n_name as nation, extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount from part, supplier, lineitem, par SQL Source Length 562 Rows Returned 0 First Row Returned Time -1 Last Error before AQR 0 Number of AQR retries 0 Delay before AQR 0 No. of times reclaimed 0 Cancel Time -1 Last Suspend Time -1 Stats Collection Type OPERATOR_STATS LC RC Id PaId ExId Frag TDB Name DOP Dispatches Oper CPU Time Est. Records Used Act. Records Used Details 57 . 58 . 31 0 EX_ROOT 1 1 52 0 0 963 56 . 57 58 30 0 EX_SORT 0 1 4 175 0 0|0|0 55 . 56 57 29 0 EX_SPLIT_TOP 1 1 14 175 0 54 . 55 56 29 0 EX_SEND_TOP 5 15 893 175 0 53 . 54 55 29 2 EX_SEND_BOTTOM 5 5 0 175 0 52 . 53 54 29 2 EX_SPLIT_BOTTOM 5 5 0 175 0 1757 51 . 52 53 28 2 EX_HASH_GRBY 5 5 0 35 0 0|0|0 50 . 51 52 27 2 EX_SPLIT_TOP 5 5 0 175 0 49 . 50 51 27 2 EX_SEND_TOP 25 75 1,757 175 0 48 . 49 50 27 3 EX_SEND_BOTTOM 25 45 624 175 0 47 . 48 49 27 3 EX_SPLIT_BOTTOM 5 123 7,330 175 0 35574412318 46 . 47 48 26 3 EX_SORT_GRBY 5 5 0 175 0 43 45 46 47 25 3 EX_ONLJ 5 5 0 3.000000E+018 0 44 . 45 46 24 3 EX_PROBE_CACHE 5 0 0 3.000000E+018 0 . . 44 45 23 3 EX_UDR 5 4 4 1 0 42 . 43 46 22 3 EX_SORT 5 4,159,407 21,566,835,619 4.000000E+010 0 0|2537619|624 41 5 42 43 21 3 EX_HASHJ 5 4,160,351 13,930,403,476 4.000000E+010 17,032,443,619 0|0|0 38 40 41 42 20 3 EX_ONLJ 5 2,273,262 6,860,334 1,600,000 805,329 39 . 40 41 19 3 EX_PROBE_CACHE 5 1,502,173 12,703,456 1,600,000 810,184 . . 39 40 18 3 EX_UDR 5 3,737,068 21,160,144 1 780,981 37 10 38 41 17 3 EX_HASHJ 5 1,314,056 9,330,496 1,600,000 814,276 0|0|0 36 15 37 38 16 3 EX_HASHJ 5 1,114,606 8,028,985 1,600,000 818,236 0|0|0 35 20 36 37 15 3 EX_HASHJ 5 901,071 8,479,592 1,600,000 821,020 0|0|0 34 . 35 36 14 3 EX_SPLIT_TOP 5 682,474 3,384,273 1,600,000 823,064 33 . 34 35 14 3 EX_SEND_TOP 25 2,574,427 4,405,344 1,600,000 823,317 32 . 33 34 14 8 EX_SEND_BOTTOM 25 18,426 868,196 1,600,000 834,603 31 . 32 33 14 8 EX_SPLIT_BOTTOM 5 3,708 513,891 1,600,000 834,730 6062316 30 25 31 32 13 8 EX_HASHJ 5 16,161 2,657,667 1,600,000 835,753 0|0|0 29 . 30 31 12 8 EX_SPLIT_TOP 5 3,757 291,569 12,167,508 836,775 28 . 29 30 12 8 EX_SEND_TOP 20 87,572 434,924 12,167,508 837,156 27 . 28 29 12 10 EX_SEND_BOTTOM 20 9,449 3,154,124 12,167,508 853,977 26 . 27 28 12 10 EX_SPLIT_BOTTOM 4 1,935 556,319 12,167,508 854,485 10764348 . . 26 27 11 10 EX_TRAF_KEY_SELECT 4 1,675 7,053,905 12,167,508 858,577 TRAFODION.G_TPCH2X.LINEITEM|870000|133938636 24 . 25 31 10 8 EX_SPLIT_TOP 5 12,467 547,370 1,600,000 1,600,000 23 . 24 25 10 8 EX_SEND_TOP 20 12,817 748,699 1,600,000 1,600,000 22 . 23 24 10 9 EX_SEND_BOTTOM 20 15,893 856,724 1,600,000 1,600,000 21 . 22 23 10 9 EX_SPLIT_BOTTOM 4 11,277 1,013,911 1,600,000 1,600,000 9672394 . . 21 22 9 9 EX_TRAF_KEY_SELECT 8 21,650 15,603,518 1,600,000 1,600,000 TRAFODION.G_TPCH2X.PARTSUPP|1600000|108800000 19 . 20 36 8 3 EX_SPLIT_TOP 5 24,614 1,168,158 3,000,000 3,000,000 18 . 19 20 8 3 EX_SEND_TOP 20 25,331 1,408,746 3,000,000 3,000,000 17 . 18 19 8 7 EX_SEND_BOTTOM 20 29,725 1,282,148 3,000,000 3,000,000 16 . 17 18 8 7 EX_SPLIT_BOTTOM 4 21,141 1,477,031 3,000,000 3,000,000 13610647 . . 16 17 7 7 EX_TRAF_KEY_SELECT 8 40,920 21,702,936 3,000,000 3,000,000 TRAFODION.G_TPCH2X.ORDERS|3000000|144000000 14 . 15 37 6 3 EX_SPLIT_TOP 5 989 42,079 20,000 100,000 13 . 14 15 6 3 EX_SEND_TOP 20 1,363 73,308 20,000 100,000 12 . 13 14 6 6 EX_SEND_BOTTOM 20 2,617 61,465 20,000 100,000 11 . 12 13 6 6 EX_SPLIT_BOTTOM 4 365 28,953 20,000 100,000 157943 . . 11 12 5 6 EX_TRAF_KEY_SELECT 8 508 135,050 20,000 20,000 TRAFODION.G_TPCH2X.SUPPLIER|20000|960000 9 . 10 38 4 3 EX_SPLIT_TOP 5 51 160 25 125 8 . 9 10 4 3 EX_SEND_TOP 20 84 1,338 25 125 7 . 8 9 4 5 EX_SEND_BOTTOM 20 4,176 0 25 125 6 . 7 8 4 5 EX_SPLIT_BOTTOM 4 20 0 25 125 0 . . 6 7 3 5 EX_TRAF_KEY_SELECT 8 24 0 25 25 TRAFODION.G_TPCH2X.NATION|25|1725 4 . 5 42 2 3 EX_SPLIT_TOP 5 968 44,109 25,000 105,750 3 . 4 5 2 3 EX_SEND_TOP 20 1,486 74,743 25,000 105,750 2 . 3 4 2 4 EX_SEND_BOTTOM 20 2,407 75,055 25,000 105,750 1 . 2 3 2 4 EX_SPLIT_BOTTOM 4 387 31,475 25,000 105,750 1339347 . . 1 2 1 4 EX_TRAF_KEY_SELECT 8 554 2,465,634 25,000 21,150 TRAFODION.G_TPCH2X.PART|400000|30845208 --- SQL operation complete. >>