Informix Error -2959
-2959 Two tables may join with a maximum of limit column pairs,
including all components of composite columns.A limit exists on the number of columns that are involved in a join. This limit includes both the join columns that are named in an ATTRIBUTES statement and those that are named in a COMPOSITES statement for the same table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2959 fires when the number of columns involved in a join between two tables exceeds the form
compiler's limit — per the official guidance, this limit counts both the join columns named in
an ATTRIBUTES statement and those named in a COMPOSITES statement for the same table.
- Too many join columns between two tables, counting both
ATTRIBUTESandCOMPOSITESentries, per the official guidance — the direct, only cause.
Solutions / Resolution
- Reduce the number of columns used to join the two tables, per the official guidance,
accounting for both
ATTRIBUTESandCOMPOSITESjoin columns together.
Examples
Too many composite join columns
COMPOSITES
ship_key = (region, zone, route, stop, sequence, carrier, dock, bay);
-- -2959: 8 components pushes this join past the compiler's column-pair limit
Corrected
Reduce the composite key to fewer, more selective columns, or denormalize a combined key column into the table instead of joining on many components.
Diagnostic Checks
- Count all join columns between the two tables, combining both
ATTRIBUTESandCOMPOSITESentries, and reduce the count if it exceeds the compiler's limit.
Related Errors / Related Topics
- -2858 — "The table table-1 is joined to the table table-2, but its joined columns do not belong to a composite key." A related join-structure error, about the joining columns lacking a composite unique index, rather than exceeding the column-count limit.
A join between two tables uses too many columns (across ATTRIBUTES and COMPOSITES
together) — reduce the column count.