# Multiple variables in one field

**URL:** <https://community.influxdata.com/t/multiple-variables-in-one-field/5047>\
**Category:** Store\
**Tags:** influxdb, time, date\
**Created:** [May 6, 2018, 1:52pm UTC](https://community.influxdata.com/t/multiple-variables-in-one-field/5047 "2018-05-06T13:52:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![szerwi](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/szerwi/32/1312_2.png) [@szerwi](https://community.influxdata.com/u/szerwi)\
**Post date:** [May 6, 2018, 1:52pm UTC](https://community.influxdata.com/t/multiple-variables-in-one-field/5047/1 "2018-05-06T13:52:20Z")

</div>

Hi,

Is it possible to store many variables in one field, so there will be only one timestamp? Or there must be only one variable in one field?  
I’m sending 2 floats per 10 seconds to database and I have 8GB SD card so I calculated that space will end in a 6 months. That’s short time.

---

<div class="post-metadata">

**Author:** ![noahcrowley](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/noahcrowley/32/818_2.png) [@noahcrowley](https://community.influxdata.com/u/noahcrowley)\
**Post date:** [May 6, 2018, 10:11pm UTC](https://community.influxdata.com/t/multiple-variables-in-one-field/5047/2 "2018-05-06T22:11:21Z")

</div>

You can have multiple fields in one measurement; they will all have the same timestamp. The [Sample Data](https://docs.influxdata.com/influxdb/v1.5/concepts/key_concepts/#sample-data) in the InfluxDB [Key Concepts documentation](https://docs.influxdata.com/influxdb/v1.5/concepts/key_concepts/) uses points with two fields and two tags.

Additionally, InfluxDB does smart things to compress the data it stores. I’m not sure if that was taken into account in your calculations.

Generally, time series data is less valuable the older it gets. Many users will “downsample” their data; they will keep the last two weeks of data at 10 second resolution, for example, but for data older than that they might only keep data at a resolution of 1 minute.

Do you need 10s resolution for all of your data, forever? In that case, you should probably buy a bigger SD card 😂

Otherwise, I recommend checking out our documentation on [Downsampling and Data Retention](https://docs.influxdata.com/influxdb/v1.5/guides/downsampling_and_retention/).

---

<div class="post-metadata">

**Author:** ![szerwi](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/szerwi/32/1312_2.png) [@szerwi](https://community.influxdata.com/u/szerwi)\
**Post date:** [May 7, 2018, 7:16pm UTC](https://community.influxdata.com/t/multiple-variables-in-one-field/5047/3 "2018-05-07T19:16:31Z")

</div>

@noahcrowley I can’t open “Downsampling and Data Retention” link. Could you send it one more time?

---

<div class="post-metadata">

**Author:** ![noahcrowley](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/noahcrowley/32/818_2.png) [@noahcrowley](https://community.influxdata.com/u/noahcrowley)\
**Post date:** [May 7, 2018, 7:25pm UTC](https://community.influxdata.com/t/multiple-variables-in-one-field/5047/4 "2018-05-07T19:25:33Z")

</div>

Yes, sorry about that: [Downsampling and data retention | InfluxDB OSS 1.5 Documentation](https://docs.influxdata.com/influxdb/v1.5/guides/downsampling_and_retention/)

---

<div class="post-metadata">

**Author:** ![szerwi](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/szerwi/32/1312_2.png) [@szerwi](https://community.influxdata.com/u/szerwi)\
**Post date:** [May 8, 2018, 9:40pm UTC](https://community.influxdata.com/t/multiple-variables-in-one-field/5047/5 "2018-05-08T21:40:21Z")

</div>

@noahcrowley ok, thank you. Can I store downsampled data in the same measurement and in the same field as new data?

---

<div class="post-metadata">

**Author:** ![noahcrowley](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/noahcrowley/32/818_2.png) [@noahcrowley](https://community.influxdata.com/u/noahcrowley)\
**Post date:** [June 1, 2018, 4:55pm UTC](https://community.influxdata.com/t/multiple-variables-in-one-field/5047/6 "2018-06-01T16:55:26Z")

</div>

You’re going to want to store the downsampled data in a different retention policy (RP) from your default. That way, you can specify a shorter duration for incoming data compared to your downsampled data.

The downsampled data will have the same name and fields as the original data, but in order to access data in any RP other than `default`, you will need to specify the RP in your query, like so:

```auto
SELECT * FROM "mydata"."downsampled_data" LIMIT 5

```

Where `downsampled_data` is the name of the retention policy.
