# Sqlt\_data table size

**URL:** <https://forum.inductiveautomation.com/t/sqlt-data-table-size/58335>\
**Category:** Ignition\
**Created:** [April 11, 2022, 11:37pm UTC](https://forum.inductiveautomation.com/t/sqlt-data-table-size/58335 "2022-04-11T23:37:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay\_Baker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jay_baker/32/35448_2.png) [@Jay\_Baker](https://forum.inductiveautomation.com/u/Jay_Baker)\
**Post date:** [April 11, 2022, 11:37pm UTC](https://forum.inductiveautomation.com/t/sqlt-data-table-size/58335/1 "2022-04-11T23:37:30Z")

</div>

I’m new to ignition, but it seems like the sqlt\_data table structure is very inefficient…space for an int, a float, a string, and a date value in every single row, even if you’re only wanting to store (for instance) a float.

[https://docs.inductiveautomation.com/pages/viewpage.action?pageId=4065915](https://docs.inductiveautomation.com/pages/viewpage.action?pageId=4065915)

Am I missing something here? Is there a way to store the different data types in different tables to save on space?

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [April 11, 2022, 11:38pm UTC](https://forum.inductiveautomation.com/t/sqlt-data-table-size/58335/2 "2022-04-11T23:38:28Z")

</div>

You are free to write data to a table(s) of your own design.

---

<div class="post-metadata">

**Author:** ![Jay\_Baker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jay_baker/32/35448_2.png) [@Jay\_Baker](https://forum.inductiveautomation.com/u/Jay_Baker)\
**Post date:** [April 11, 2022, 11:40pm UTC](https://forum.inductiveautomation.com/t/sqlt-data-table-size/58335/3 "2022-04-11T23:40:36Z")

</div>

How? I understand I can write data to a differnt table in the general course of writing code, but can I do that when I just want to turn on the built-in “History Enabled” feature?

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [April 11, 2022, 11:43pm UTC](https://forum.inductiveautomation.com/t/sqlt-data-table-size/58335/4 "2022-04-11T23:43:09Z")

</div>

Well im not an expert on db storage efficiency, but if you don’t like how the historian does things, why not do it yourself?  
[https://docs.inductiveautomation.com/display/DOC81/system.db](https://docs.inductiveautomation.com/display/DOC81/system.db)

For example, i do this for power meter logging. I only care about one value and only need it every 15 min so i created a gateway scheduled script that runs every 15 min and writes the data using `system.db.runPrepUpdate`

---

<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:** [April 11, 2022, 11:48pm UTC](https://forum.inductiveautomation.com/t/sqlt-data-table-size/58335/5 "2022-04-11T23:48:33Z")

</div>

Nulls are stored very efficiently (effectively zero space) in all modern databases. Don’t worry about the unused columns.

If you store very much data based on time instead of change, you should use custom wide tables instead of the Tag Historian. (Transaction Groups in the SQL Bridge module if you want drag-n-drop convenience.)

Search this forum for tall versus wide for more discussions.
