Question

How I can table which is index order in informix ? This means when I insert new element it first order and then insert this element. In oracle I can do something like this:

ORGANIZATION INDEX

is there some equivalent in informix ?

Was it helpful?

Solution

No, there is no similar resource at Informix.

The option you have is reorder the physical rows based on one index from time to time by setting it to cluster with the alter index statement. (Setting an index to NOT CLUSTER is always very quick.)

But there some limitations in using it. The main limitation, in my opinion is:

  • cannot be done online; this means, you need exclusive access during the operation.
    If the table is big, could take a while.

Quote the source: IBM® Informix® 12.10 Index-type options

CLUSTER option usage

You cannot specify the CLUSTER option and the ONLINE keyword in the same statement. In addition, some secondary-access methods (such as R-tree) do not support clustering. Before you specify CLUSTER for your index, be sure that the index uses an access method that supports clustering. The CREATE CLUSTER INDEX statement fails if a CLUSTER index already exists on the same table.

CREATE CLUSTER INDEX c_clust_ix ON customer (zipcode);

This statement creates an index on the customer table and physically orders the rows according to their postal code values, in (by default) ascending order.

If the CLUSTER option is specified and fragments exist on the data, values are clustered only within each fragment, and not globally across the entire table. If the CREATE CLUSTER INDEX statement also includes the COMPRESSED keyword as a storage option, the database server issues error -26950. To create a cluster index that supports compression requires two steps:

Use the CREATE CLUSTER INDEX statement to define a cluster index with no index compression. Call the SQL administration API task( ) or admin( ) function with the 'index compress' argument to compress the existing cluster index.

You cannot use the CLUSTER option on a forest of trees index.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top