tinybirdco / web-analytics-starter-kit

Tinybird Web Analytics Starter Kit
https://tinybird.co/starter-kits/web-analytics
MIT License
350 stars 36 forks source link

Fix data source partition key #82

Closed pjosh closed 6 months ago

pjosh commented 6 months ago

Description

We need to replace the partition key with toYear(timestamp) to avoid this error: ClickHouse error, Code: 252. DB::Exception: Too many partitions for single INSERT block (more than 12). The limit is controlled by 'max_partitions_per_insert_block' setting. Large number of partitions is a common misconception. It will lead to severe negative performance impact, including slow server startup, slow INSERT queries and slow SELECT queries. Recommended total number of partitions for a table is under 1000..10000. Please note, that partitioning is not intended to speed up SELECT queries (ORDER BY key is sufficient to make range queries fast). Partitions are intended for data manipulation (DROP PARTITION, etc). (TOO_MANY_PARTS) (version 23.8.2.7 (official build))\n

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
analytics-dashboard ✅ Ready (Inspect) Visit Preview Apr 22, 2024 4:08pm