DWHPro spool/skew lab — 24 October 2026
Teradata Database 20.00.28.81, BTEQ 20.00.00.11, BTET, four AMPs.
Dedicated otherwise-idle test user, PERM=0, SPOOL=16000000 bytes (4,000,000 per AMP), no profile override.
A DBA must provision an isolated account with access to DBC.DBCInfoV and DBC.DiskSpaceV. Authenticate privately before running benchmark.sql. No credentials are included.
The script creates only session-local volatile tables. It deliberately reproduces error 2646 three times. Do not run on a production session. The failed insert must report 2646 or the script exits with code 9. Expected failures can leave BTEQ's final return code at 8; examine all results, not just the process code.
Source: 10,000 synthetic rows, integer ids 0..9999, hot_key=1, CHAR(200) payload. No customer data.
Changing target PI from hot_key to id changes both row distribution and the execution plan; this does not isolate just one optimizer effect.
All three skew inserts failed; all three balanced inserts completed with 10,000 rows. The corrected request's BTEQ elapsed times were 1, 1 and 1 seconds (whole-second reporting). Failed requests also reported 1 second each in this confirmation run. Do not calculate a performance speedup from these values.
EXPLAIN estimated a 2,210,000-byte redistribution spool for the skew path, not a measured peak. The balanced path used a direct all-AMP merge without that redistribution/sort step.
After the first balanced insert, observed CurrentSpool by Vproc was 1294336,2342912,2351104,2351104 bytes. These are account snapshots including source/target volatile tables and measurement overhead, not request peak spool or a prediction for another workload. Failed-query spool is released; its post-failure value is not the peak.
Files: benchmark.sql and result.txt (chronological BTEQ output). Test account was dropped afterward. Reruns can vary with release, allocator state, AMP topology, row representation and space/skew settings.
