# ORA-01555: snapshot too old: rollback segment number  with name "_SYSSMU11_1234567890$" too small

- **ID:** `database/read-committed-snapshot-too-old`
- **Domain:** database
- **Category:** runtime_error
- **Error Code:** `ORA-01555`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Oracle rollback segment contains needed read-consistent data that has been overwritten due to long-running query or insufficient undo retention.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Oracle 19c | active | — | — |
| Oracle 21c | active | — | — |
| Oracle 23ai | active | — | — |

## Workarounds

1. **Increase the undo tablespace size: ALTER TABLESPACE undo ADD DATAFILE '/u01/oradata/undo02.dbf' SIZE 10G;** (85% success)
   ```
   Increase the undo tablespace size: ALTER TABLESPACE undo ADD DATAFILE '/u01/oradata/undo02.dbf' SIZE 10G;
   ```
2. **Optimize the query to fetch data in smaller batches or use COMMIT more frequently: BEGIN FOR rec IN (SELECT * FROM huge_table WHERE ...) LOOP ... END LOOP; END;** (75% success)
   ```
   Optimize the query to fetch data in smaller batches or use COMMIT more frequently: BEGIN FOR rec IN (SELECT * FROM huge_table WHERE ...) LOOP ... END LOOP; END;
   ```
3. **Set undo_retention guarantee: ALTER TABLESPACE undo RETENTION GUARANTEE;** (90% success)
   ```
   Set undo_retention guarantee: ALTER TABLESPACE undo RETENTION GUARANTEE;
   ```

## Dead Ends

- **Increase UNDO_RETENTION to a very high value like 86400 seconds** — Undo retention is only a target, not a guarantee; Oracle may still overwrite undo if tablespace is full or if undo tablespace is undersized. (70% fail)
- **Set undo_management='MANUAL' to use manual rollback segments** — Manual rollback segments are deprecated and can lead to worse ORA-01555 errors due to fixed segment sizes and no auto-tuning. (90% fail)
