Forum: Building VoltDB Applications

Post: Create Index on-the-fly

Create Index on-the-fly
Apr 21, 2011
Hi everybody, do you know if it is possible to create an index on-the-fly? I saw in the documentation that alter an index requires save the data and shutdown the database.
If is not possible, one way to do that would be to create a temporary table - with the new index - and replicate the data? (we are talking about 5 million records or more, possibly sharded among severs).
Someone already did that or did use any other idea?
re: Create index on-the-fly
Apr 25, 2011
VoltDB does not currently support adding or dropping indexes on an existing table during a catalog update. We plan on adding support for additional operations during a catalog update in a future release. For now, your best option is to perform a snapshot using @SnapshotSave, shutdown, startup (with new catalog that contains the additional index), and @SnapshotRestore.