# What would be the basic optimization techniques/parameters for a time series table in this example?

**URL:** <https://community.cratedb.com/t/what-would-be-the-basic-optimization-techniques-parameters-for-a-time-series-table-in-this-example/852>\
**Category:** CrateDB\
**Created:** [October 8, 2021, 12:16pm UTC](https://community.cratedb.com/t/what-would-be-the-basic-optimization-techniques-parameters-for-a-time-series-table-in-this-example/852 "2021-10-08T12:16:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![proddata](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/proddata/32/1379_2.png) [@proddata](https://community.cratedb.com/u/proddata)\
**Post date:** [October 14, 2021, 2:59pm UTC](https://community.cratedb.com/t/what-would-be-the-basic-optimization-techniques-parameters-for-a-time-series-table-in-this-example/852/2 "2021-10-14T14:59:29Z")

</div>

- Typically one should aim for a single shard size of about 10-50 GiB
- **Partitions** can be deleted/dropped like a **table**. i.e. if you want to delete old data quickly, you should partition by e.g. month
- typically having less shards is more performant, than having too many

@jayeff wrote a basic guide for time series data

> [@Sharding and partitioning guide for time-series data](https://community.cratedb.com/t/sharding-and-partitioning-guide-for-time-series-data/737):
>
> The goal of this guide is to support you with building a sharding and partitioning strategy for your time series data. Let’s start with your time series data which you want to store in a table in CrateDB. You need to consider how to partition your data, how many shards to configure, and how many replicas to use. Partitioning Typically you want to partition your time series data based on a time axis. You can achieve this in CrateDB by using the [date\_trunc](https://crate.io/docs/crate/reference/en/latest/general/builtins/scalar-functions.html#date-trunc-interval-timezone-timestamp) function on a timestamp. An example t…

also some core information on sharding:

> **[Sharding recommendations](https://cratedb.com/docs/guide/performance/sharding.html)**
>
> Applying sharding can drastically improve the performance on large datasets. This document is a sharding best practice guide for CrateDB. A brief recap: CrateDB tables are split into a configured number of shards. These shards are distributed across...

---

_[View the full topic](https://community.cratedb.com/t/what-would-be-the-basic-optimization-techniques-parameters-for-a-time-series-table-in-this-example/852)._
