Informix Error -638
-638 Cannot cluster TEXT or BYTE columns on non-optical media.
You can create an optical cluster only on TEXT or BYTE columns that are stored on optical media. Check that you have not specified the name of a TEXT or BYTE column that is stored in a storage space.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-638 fires when CREATE OPTICAL CLUSTER names a TEXT/BYTE column that's actually stored in
an ordinary storage space rather than on optical media — per the official guidance, an optical
cluster can only be created on TEXT/BYTE columns that are themselves stored on optical media.
- The named column stored in an ordinary dbspace/blobspace rather than an optical storage space, per the official guidance — the direct, only cause.
- A column-naming mistake, per the official guidance's suggested check — confirming the
statement doesn't accidentally name a
TEXT/BYTEcolumn stored in a regular storage space.
Solutions / Resolution
- Check that the statement doesn't name a
TEXT/BYTEcolumn stored in a storage space, per the official guidance, rather than on optical media. - Confirm which storage space the column actually uses:
combined with reviewing theSELECT colname FROM syscolumns WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'documents');CREATE TABLE's originalIN storage-space-nameclause for that column, to confirm whether it targets optical media or an ordinary storage space. - If optical clustering is genuinely needed for this data, recreate the column so it's stored on optical media, since a column already committed to an ordinary storage space can't simply be optically clustered in place.
Examples
The disallowed attempt
-- content is TEXT, stored in an ordinary blobspace (not optical media)
CREATE OPTICAL CLUSTER doc_cluster ON documents (content) ...;
-- -638: content isn't stored on optical media
Diagnostic Checks
- Review the
CREATE TABLEstatement's storage-space clause for the target column, confirming whether it was defined to live on optical media or an ordinary storage space. - Check with the storage-space's administrator/configuration if it isn't obvious which storage spaces are backed by optical media on this instance.
Related Errors / Related Topics
- -631 — "Cannot create optical cluster on column that is not TEXT or BYTE." A related optical-cluster restriction, on the column's data type rather than which storage medium it's stored on.
- -606 — "Invalid storage-space name for TEXT or BYTE data." A related storage-space error, about an invalid/nonexistent name rather than the right kind of storage space (optical vs. ordinary).
The column is the right type but the wrong storage medium — confirm which storage space it actually lives in before attempting an optical cluster.