# Time chart database size and samples

**URL:** <https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198>\
**Category:** Ignition\
**Created:** [November 7, 2022, 7:27pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198 "2022-11-07T19:27:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [November 7, 2022, 7:27pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/1 "2022-11-07T19:27:40Z")

</div>

Hi,  
I have managed to configure a time chart with a tag. I have a tag that I have set the tag to sample every 30min, and the chart to display 48 points. My database seem to add size very fast, and write to the database very often. I'm completely new to this, how do I tell the database or history tag to only save 48 samples of my tag for example? Is it somewhere in the gateway?

 ![Time chart](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/9/b9601d884369190700dcb054b5da9d784db683f6.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 7, 2022, 8:51pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/2 "2022-11-07T20:51:29Z")

</div>

You have the deadband set to 0.01. That means it will try to track changes of 0.01. What should it be set to? How much deviation do you really need to track?

See [Configuring Tag History - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Configuring+Tag+History#ConfiguringTagHistory-DeadbandandAnalogCompression) for details on how this works.

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [November 7, 2022, 8:53pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/3 "2022-11-07T20:53:14Z")

</div>

It's just for displaying a trend of the temperature of my warmwater at home. I just wan't to record one sample every 30min. And then display 48 of them (a day)

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [November 7, 2022, 9:01pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/4 "2022-11-07T21:01:08Z")

</div>

I set the deadband mode to off and historical deadband 15. Will see if it changes anything

---

<div class="post-metadata">

**Author:** ![bpreston](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bpreston](https://forum.inductiveautomation.com/u/bpreston)\
**Post date:** [November 7, 2022, 9:15pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/5 "2022-11-07T21:15:43Z")

</div>

Out of curiosity, are you looking at the actual database size to say its growing fast/writing very often or? Is there anything else writing to your historian that could be causing the writes your seeing? Have you pulled the data into a table using the "AsStored" query mode to see the raw entries?

I'm assuming since you mentioned this is for at home that this is using Maker Edition, if so, this should be in that section of the forum.

But since you want it every 30 minutes, I would wonder if a transaction group would be better. Especially if you think you may have other values that you want to get at the same rate. Then you can set a schedule so the values are logged at the interval you want, and you can even have it do it at the bottom and middle of the hour if you wanted. Setting your sample rate and the max rate in your tag the way you did, I would expect to log twice an hour but it won't be on a fixed schedule so depending on how you trend it, you may see more or less values than your expecting.

[Types of Groups - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)](https://docs.inductiveautomation.com/display/DOC81/Types+of+Groups)

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [November 8, 2022, 9:34pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/6 "2022-11-08T21:34:44Z")

</div>

I'm looking at the size. 40MB per day, I don't think I have anything else that does the writings, and also on the gateway under status\>connection\>databases it says 1query/s.

I'm sorry I thought it was a general question since it's working the same as perspective?

Thanks, I'll look into that!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 9, 2022, 9:20pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/8 "2022-11-09T21:20:32Z")

</div>

> [@Tim\_Hansson](#):
>
> I set the deadband mode to off and historical deadband 15.

If you're measuring domestic hot water temperature then you want a deadband of 1° (F or C) or thereabouts. 15° would be rather coarse.

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [November 10, 2022, 7:03pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/9 "2022-11-10T19:03:46Z")

</div>

But I just want to log it each 30min, not based on temp

---

<div class="post-metadata">

**Author:** ![Tim\_Hansson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_hansson/32/39365_2.png) [@Tim\_Hansson](https://forum.inductiveautomation.com/u/Tim_Hansson)\
**Post date:** [November 11, 2022, 6:39pm UTC](https://forum.inductiveautomation.com/t/time-chart-database-size-and-samples/66198/10 "2022-11-11T18:39:02Z")

</div>

Ok, so now I have gotten a little bit further. I have managed to make the tag log to the database every 30min. But when I try to add the historical tag to my chart it doesn't show? Shouldn't it show?

 ![Historical](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/4/145701760abe61c9aceea779f4951046245df028.png)
