# Custom MySQL Table Settings with Tag Historian

**URL:** <https://forum.inductiveautomation.com/t/custom-mysql-table-settings-with-tag-historian/61422>\
**Category:** Ignition\
**Created:** [June 30, 2022, 11:24pm UTC](https://forum.inductiveautomation.com/t/custom-mysql-table-settings-with-tag-historian/61422 "2022-06-30T23:24:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cameron\_Dagger](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@Cameron\_Dagger](https://forum.inductiveautomation.com/u/Cameron_Dagger)\
**Post date:** [June 30, 2022, 11:24pm UTC](https://forum.inductiveautomation.com/t/custom-mysql-table-settings-with-tag-historian/61422/1 "2022-06-30T23:24:41Z")

</div>

I am using the tag historian module with a local MySQL database to store multiple float values. When the tag historian creates a table to store tag history the column for float values is of type double. I assume this is so any size of float/double can be stored in this column (similarly the int column has the bigint datatype). I would like to make this column type a float to prevent extra decimals being added to my values and reduce storage size; I can do this by altering the table settings directly but I would have to do this for each partition as it is created. Is it possible to modify the default settings of these tables in the tag historian?

---

<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:** [July 1, 2022, 12:09am UTC](https://forum.inductiveautomation.com/t/custom-mysql-table-settings-with-tag-historian/61422/2 "2022-07-01T00:09:38Z")

</div>

I want to say you can’t, but i don’t know that for certain. If it were possible i am thinking it would involve modifying the internal db, which could be dangerous.

Some alternative ideas that might be of interest: You could disable partitioning and then modify the data types, that obviously isn’t a good idea if you are logging a huge amount of data. You could also log the data directly to tables of your own creation with the [system.db](https://docs.inductiveautomation.com/display/DOC81/system.db) functions.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 1, 2022, 3:04pm UTC](https://forum.inductiveautomation.com/t/custom-mysql-table-settings-with-tag-historian/61422/3 "2022-07-01T15:04:59Z")

</div>

You _could_ accomplish this by changing the precision of the [MySQL translator](https://docs.inductiveautomation.com/display/DOC81/JDBC+Drivers+and+Translators)’s `double` column to use a different SQL literal. I would not recommend it, though. For one, it’ll affect all MySQL connections you have (unless you create a duplicate translator entry). For another, it’ll affect all sources of Ignition generated tables that store double data (such as transaction groups). For a third, it’s probably not going to make as much practical difference in storage size as you want, while being a significant loss of precision.

---

<div class="post-metadata">

**Author:** ![Cameron\_Dagger](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@Cameron\_Dagger](https://forum.inductiveautomation.com/u/Cameron_Dagger)\
**Post date:** [July 4, 2022, 8:24pm UTC](https://forum.inductiveautomation.com/t/custom-mysql-table-settings-with-tag-historian/61422/4 "2022-07-04T20:24:49Z")

</div>

OK I suspected something along these lines would be possible. For now this is my only MySQL connection but I will likely be adding more so I will hold off on any changes. Thanks for your help.
