# What is the storage limit of a table in database

**URL:** <https://forum.inductiveautomation.com/t/what-is-the-storage-limit-of-a-table-in-database/86798>\
**Category:** Ignition\
**Tags:** database\
**Created:** [March 5, 2024, 1:01am UTC](https://forum.inductiveautomation.com/t/what-is-the-storage-limit-of-a-table-in-database/86798 "2024-03-05T01:01:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Huang](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Bill\_Huang](https://forum.inductiveautomation.com/u/Bill_Huang)\
**Post date:** [March 5, 2024, 1:01am UTC](https://forum.inductiveautomation.com/t/what-is-the-storage-limit-of-a-table-in-database/86798/1 "2024-03-05T01:01:22Z")

</div>

Hi everyone, I have created a table in database that dose nothing more than recording the timestamp when a Boolean value goes high. I'd like to record as many rows as possible, but what's gonna happen if the storage memory is full? Would it cause system crash? or just stop updating the table? Shall I create a script to delete or clean the table periodically?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b74c70336e6dcd770722b4b99441bd998cafe9c0.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 5, 2024, 2:18am UTC](https://forum.inductiveautomation.com/t/what-is-the-storage-limit-of-a-table-in-database/86798/2 "2024-03-05T02:18:14Z")

</div>

Most databases don't have specific limits. You just run out of disk space and the whole database stops working. Depending on the brand, queries may or may not still work.

Most brands document how must disk space a bare row takes on disk. IIRC, the above, with a 32-bit integer key, would be ~21 - 24 bytes per bare row in PostgreSQL. Indices (which are effectively necessary for decent behavior) add more.

Just how many events per year do you expect?

---

<div class="post-metadata">

**Author:** ![Lynn\_Martineau](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@Lynn\_Martineau](https://forum.inductiveautomation.com/u/Lynn_Martineau)\
**Post date:** [March 7, 2024, 12:43am UTC](https://forum.inductiveautomation.com/t/what-is-the-storage-limit-of-a-table-in-database/86798/3 "2024-03-07T00:43:40Z")

</div>

I'm glad you're thinking ahead. Most people don't think about storage space until they hit the limits defined by @pturmel

> Most databases don't have specific limits. You just run out of disk space and the whole database stops working. Depending on the brand, queries may or may not still work.

If you can define a practical limit where the data no longer has value/meaning or legal requirement to maintain (e.g. 1 Million rows, 6 months, 7 years, 20 years) then build in the delete now with a configurable variable while you are in development rather than leaving a built-in down-time problem for someone else to figure out sometime in the future.
