# ClickHouse® Tips #4: Materializing UNION ALL queries

DevFeed: [ClickHouse® Tips #4: Materializing UNION ALL queries](<https://devfeed.tech/articles/clickhouse-tips-4-materializing-union-all-queries-18447.md>)

Original publisher: [Read original article](<https://www.tinybird.co/blog/clickhouse-tips-4-materializing-union-all-queries-using-simpleaggregatefunction-and-grouparrayarray-function>)

Author: Elena Torró

Published: 2021-03-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tinybird](<https://devfeed.tech/sources/tinybird.md>)

Topics: [clickhouse](<https://devfeed.tech/topics/clickhouse.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [the-data-base](<https://devfeed.tech/tags/the-data-base.md>), [tips](<https://devfeed.tech/tags/tips.md>)

## AI overview

A ClickHouse tutorial on materializing UNION ALL queries in materialized views and optimizing queries with SimpleAggregateFunction.

## Source excerpt

Master UNION ALL in ClickHouse®. Build faster materialized views and optimize queries with SimpleAggregateFunction.