# 3 History and trends

#### Overview

History and trends are the two ways of storing collected data in Zabbix.

Whereas history keeps each collected value, trends keep averaged
information on hourly basis and therefore are less resource-hungry.

#### Keeping history

You can set for how many days history will be kept:

-   in the item properties [form](/manual/config/items/item)
-   when mass-updating items

Any older data will be removed by the housekeeper.

The general strong advice is to keep history for the smallest possible
number of days and that way not to overload the database with lots of
historical values.

Instead of keeping a long history, you can keep longer data of trends.
For example, you could keep history for 14 days and trends for 5 years.

You can get a good idea of how much space is required by history versus
trends data by referring to the [database sizing
page](/manual/installation/requirements#database_size).

While keeping shorter history, you will still be able to review older
data in graphs, as graphs will use trends values for displaying older
data.

::: noteclassic
If history is set to '0', Zabbix will only be able to
calculate triggers that check the last value. Historical values would
not be stored in the database at all, except for the last value for the
item itself.
:::

#### Keeping trends

Trends is a built-in historical data reduction mechanism where for every
hour minimum, maximum and average values are stored, as well as the
total number of values in that hour.

You can set for how many days trends will be kept:

-   in the item properties [form](/manual/config/items/item)
-   when mass-updating items

Trends usually can be kept for much longer than history. Any older data
will be removed by the housekeeper.

::: noteclassic
If trends are set to '0', Zabbix server does not calculate
or store trends at all.
:::
