# Are there any performance impact/issues with running “alter table”?

**URL:** <https://forum.yugabyte.com/t/are-there-any-performance-impact-issues-with-running-alter-table/428>\
**Category:** General\
**Created:** [July 2, 2019, 4:07pm UTC](https://forum.yugabyte.com/t/are-there-any-performance-impact-issues-with-running-alter-table/428 "2019-07-02T16:07:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![divingdiana](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@divingdiana](https://forum.yugabyte.com/u/divingdiana)\
**Post date:** [July 2, 2019, 4:07pm UTC](https://forum.yugabyte.com/t/are-there-any-performance-impact-issues-with-running-alter-table/428/1 "2019-07-02T16:07:10Z")

</div>

Say we have an existing YCQL (Cassandra) table with about 1M+ rows that needs to have a TTL. The table was initially created without a TTL.

1. Do you see any performance impact/issues with running “alter table” with default\_time\_to\_live = on an existing table with existing data?

After using such an “alter” operation to set a TTL, does the TTL only affect new data inserted into the table or applies retroactively to existing data? Hoping the latter. Please confirm.

---

<div class="post-metadata">

**Author:** ![kannan](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/kannan/32/18_2.png) [@kannan](https://forum.yugabyte.com/u/kannan)\
**Post date:** [July 9, 2019, 6:27pm UTC](https://forum.yugabyte.com/t/are-there-any-performance-impact-issues-with-running-alter-table/428/2 "2019-07-09T18:27:11Z")

</div>

Hi @divingdiana

The alter table to set the TTL should be an online operation. Furthermore, it is a meta-data only update that is done to all the shards (tablets), and doesn’t require reading or re-writing all the data. So the operation should be pretty quick and is not dependent on the data size.

To your second question: The TTL set via the alter table applies retroactively to older/existing data in the table also, not just to newer data.

regards,  
Kannan
