Index Rebuild Behavior After Large DML

Hi Exasol,

I’m a bit unclear on how index rebuilds work. I thought there was some kind of threshold where, if a lot of data gets changed in a table, the indexes would be rebuilt automatically. Is that actually how it works? I saw a case where someone inserted billions of records, and I expected the insert to finish first and then for the indexes to be rebuilt—but it looked like the indexes were being updated during the insert instead. Is that normal? Or does index rebuilding only happen with updates?

Thank you!

Hi,

Automatic index rebuilds occur upon DELETE (over 25% rows marked as deleted triggers the rebuild, you can see DELETE_PERCENTAGE in exa_dba_tables) and upon UPDATE (over 15% rows affected by an update triggers the rebuild).

INSERT doesn’t trigger index rebuild.

Best regards