Cost of creating a new index for a new field in a large tabl

Posted by pedromarcerodriguez on 11-Mar-2015 10:30

Hi,

 Quick question, I was just wondering and I couldn't find the information, would it be costly in time to add a new indexed field to a large table (let's assume in range of several millions records)?

 That would be for a non enterprise version of the database.

 Thanks, 

All Replies

Posted by George Potemkin on 11-Mar-2015 14:29

You can add new index as inactive and run idxactivate later. A few millions records is not a large table. If a downtime is exceptable then you can use idxbuild instead of idxactivate. But adding an active index (offline or online) is a bad idea.

Regrads,

George

Posted by pedrorodriguez on 11-Mar-2015 17:26

Thanks for your answer, I was thinking of creating the index inactive and enable it later, by idxactive or idxbuild, but it is more out of curiosity, if it is a new field, hence with all records with same value, should it be a quick process to activate the index or would it be a long(ish) process?

Regards,

Posted by George Potemkin on 12-Mar-2015 06:55

If you add an active index or use the idxactive then Progress will use an algorithm where each index key will be inserted into an existent index tree. With non-unique values in the indexed fields the tree will be compact but the process will still create one bi note per each key insertion. The whole process will not be much faster.

This thread is closed