Data Platform
- Managed ClickHouse® - Production-ready with Tinybird's DX
- Ingest - Plug in your data, ship in minutes
- Query - Sub-second SQL APIs for your data
- Kafka Connector - Real-time analytics over your Kafka topics
Developer Experience
- AI-focused DevEx - Built for agents and developers
- Schema iteration - Safe migrations with zero downtime
- Branches - Zero-copy envs with prod data
- Workspace - Monitor, explore, and operate your data infrastructure
Enterprise
- BI & Tool Connections - Connect your BI tools and ORMs
- High availability - Fault-tolerance and auto failovers
- Security and compliance - Certified SOC 2 Type II for enterprise
7 tips to make your dashboards faster
Want to speed up your data visualizations? Here are seven tried and true tips to improve dashboard performance.
What makes a dashboard slow?
The core causes of slow dashboards can be boiled down to seven common themes:
- Poorly constructed SQL queries
- Using the wrong database
- Failing to pre-filter and pre-aggregate data views
- Failing to cache query results
- Slow network performance
- Using scheduled ETLs instead of event-driven architecture
- Using batch processing instead of real-time processing
Fortunately, many of these are relatively easy to fix.
How to improve dashboard performance
Here are seven ways you can make your dashboards faster:
- Optimize your SQL queries
- Move raw data to a real-time database
- Create pre-filtered and pre-aggregated views
- Cache query responses
- Host your data closer to your users
- Use event-driven architectures
- Utilize real-time processing engines
Tip #1: Optimize your SQL queries
Bad queries are the top cause of slow dashboards. Simply optimizing reads to process less data can increase dashboard performance by orders of magnitude.
Unoptimized SQL queries are common, but fortunately, they are relatively easy to fix. Here are five generalized rules:
- Filter first - Can massively reduce the amount of data your queries must read.
- Join second - Performing joins before filtering adds unnecessary load.
- Aggregate last - Save aggregating for last after necessary pre-processing.
- Pre-filter your joins - Use subqueries to minimize the memory required to perform a join.
- Only select the columns you actually need - Be specific about your columns to minimize processed data.
Example of SQL Query Optimization
BAD SQL QUERY
WITH (
SELECT
products.product_name,
products.product_manufacturer,
toStartOfDay(events.timestamp) AS day,
sum(events.sales_price) AS total_revenue
FROM products
INNER JOIN events on events.product_id = products.id
) AS product_totals
SELECT
product_name,
total_revenue
FROM product_totals
WHERE day >= now() - INTERVAL 7 day
AND product_name like '%shoes%'
GOOD SQL QUERY
SELECT
products.product_name,
sum(events.sales_price) AS total_revenue
FROM events
INNER JOIN
(
SELECT product_name, id
FROM products
WHERE product_name like '%shoes%'
) AS shoes ON shoes.id = events.product_id
WHERE events.timestamp >= now() - INTERVAL 7 day
Tip #2: Move raw data to a real-time database
Fast dashboards require data storage technologies that are optimized for analytical queries and real-time data ingestion.
If you can't use a cache and you need a fast underlying data layer, copy or move your data to a real-time database like ClickHouse® or a real-time data platform like Tinybird.
Tip #3: Create pre-filtered and pre-aggregated views
Consider creating dedicated tables or views to support your dashboards that only contain the data your dashboard needs. This will limit the amount of data your dashboard requests must read.
Tip #4: Cache query responses
Utilize a cache to store query responses in memory, which will speed up your dashboard if your source data set changes infrequently.
Tip #5: Host data closer to your users
Reduce network latency by hosting your data near your users.
Tip #6: Use event-driven architectural principles
This can improve the freshness of your data, allowing for more responsive dashboards.
Tip #7: Utilize real-time processing engines
The more you process and transform your data in real time, the less work your dashboard will need to do at query time.
Get started making your dashboards faster
By following these seven tips, improve the performance of your dashboards, reduce query latency, and enhance data freshness.