Informix Error -350
-350 Index already exists on the column (or on the set of columns).
This CREATE INDEX statement cannot be executed because an index on the same column or combination of columns already exists. For a given collation order, at most two indexes can exist on any combination of columns, one ascending and one descending.
To display the indexes on a particular table, join sysindices and systables. Supply table-name in the following statement:
SELECT * FROM sysindices, systables WHERE sysindices.tabid = systables.tabid AND systables.tabname = 'table-name'
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-350 is distinct from -316's name collision: this fires when the column combination being
indexed already has an index, even under a brand-new index name. The server allows at most two
indexes per column combination per collation sequence — one ascending, one descending — so a
third attempt on the same columns and direction is rejected regardless of naming.
- A
CREATE INDEXon a column (or column combination) that already has an index in the same sort direction — the most common cause. - A third index attempted on the same columns after both the ascending and descending variants already exist.
- Multiple indexes created incrementally over time by different developers/scripts, unaware an equivalent index already existed under a different name.
- A migration or setup script re-run that tries to add an index whose columns are already covered, even though the specific index name used is new.
Solutions / Resolution
- Query existing indexes on the table first, per the official guidance, before creating a
new one:
SELECT i.idxname, i.part1, i.part2, i.part3 FROM sysindexes i, systables t WHERE i.tabid = t.tabid AND t.tabname = 'orders'; - If an equivalent index already exists, reuse it rather than creating a duplicate — there's no benefit to two indexes on the identical column combination and direction.
- If a different sort direction (ascending vs. descending) is genuinely needed and doesn't already exist, create that specific variant instead.
- For repeatable setup scripts, check for column-combination coverage, not just index name,
before attempting
CREATE INDEX.
Examples
Checking for existing coverage before creating an index
SELECT i.idxname, i.part1 FROM sysindexes i, systables t
WHERE i.tabid = t.tabid AND t.tabname = 'orders' AND i.part1 = (
SELECT colno FROM syscolumns
WHERE tabid = t.tabid AND colname = 'customer_id'
);
-- if this returns a row, an index on customer_id already exists
Creating the missing sort-direction variant instead
-- Ascending index already exists; descending doesn't:
CREATE INDEX idx_orders_customer_desc ON orders(customer_id DESC);
Diagnostic Checks
- Query
sysindexes/systablesfor the table to list existing indexes and their column combinations and sort directions. - Compare the intended new index's columns and direction against what's already covered before assuming a name collision is the only possible conflict.
Related Errors / Related Topics
- -316 — "Index index-name already exists in database." The naming-collision counterpart — this error instead concerns duplicate coverage of the same columns, regardless of the new index's name.
Check existing index coverage on the target columns, not just names — a duplicate name isn't the
only way to hit an "already exists" condition on CREATE INDEX.