# Amazon Neptune Online Index Rebuild: Reclaim Storage Without Downtime!

Hi everyone, it's Shii-chan!

Today I found a really nice Amazon Neptune update. It tackles that annoying situation where you delete data but your storage usage doesn't go down. Let's take a look together!

## What was announced?

According to AWS What's New, Amazon Neptune Database now supports **online index rebuild**.

It defragments indexes and reclaims unused storage space, and the best part is that **you don't have to take the database offline**.

## The story so far

In Neptune, repeated inserts, updates, and deletes leave gaps of unused space inside data pages.

Here is what that could cause:

- The `VolumeBytesUsed` metric stays artificially high even after data is deleted
- Fragmentation increases I/O costs
- Teams running Gremlin, openCypher, or SPARQL workloads at scale can see degraded query performance

## What changes

During a rebuild, **both read and write queries keep running**. That applies to the writer instance and to read replicas.

So you no longer need to schedule downtime for cleanup after a large deletion or for periodic maintenance. The announcement also mentions storage limit management and performance tuning for heavily fragmented databases.

## Dive Deep

Here is what we can pull from the announcement.

You can choose what to rebuild:

- All indexes
- Only quad indexes
- Only dictionary indexes

You can also tune the impact on your workload:

- Concurrency setting
- Write buffer size setting

These two let you balance rebuild speed against workload impact. Built-in storage safety mechanisms also protect against storage exhaustion during the operation.

Availability:

- Amazon Neptune engine release 1.5.0.0 and later
- Provisioned writer instances
- All regions where Amazon Neptune Database is supported

For configuration steps, API references, and tuning guidance, see the Amazon Neptune documentation page on storage index rebuild.

## Wrap-up

- Neptune Database gains online index rebuild
- Defragmenting indexes reclaims unused storage and addresses an elevated `VolumeBytesUsed`
- Read and write queries continue on the writer and read replicas during the rebuild
- You can pick which indexes to rebuild and tune concurrency and write buffer size
- Available from engine 1.5.0.0 on provisioned writer instances in all supported regions

If you run Neptune and storage never seemed to shrink after big deletions, this one is for you!
