DEV Community

Cover image for [Apache Superset] Topic #6, Timeout? How to optimize performance in Superset
Duc Nguyen Thanh
Duc Nguyen Thanh

Posted on

1 1

[Apache Superset] Topic #6, Timeout? How to optimize performance in Superset

Hello,
I'm Duc Nguyen (Duke) and I'm back

If you have not read the previous articles, please read it before practicing this one.

Topic #1, What is Apache Superset used for and how to install it on Windows 11
Topic #2, Superset ARCHITECTURE
Topic #3, Visualization data from CSV data file
Topic #4, Integrate 2D/3D maps into Superset
Topic #5, Automated Alerts and Reporting via Slack/Email in Superset

Today I will guide you how to optimize response speed and query in Superset

1.Optimize the database query side

- Use `JOINs` instead of `subqueries` when possible
- Avoid using `SELECT *` and select only necessary columns
- Use `EXPLAIN` to analyze queries
- Avoid using functions on columns in `WHERE` clauses
- Indexing
- Materialized views
Enter fullscreen mode Exit fullscreen mode

2.Optimize the Superset side

- Update to the latest version
- Set up the `GLOBAL_ASYNC_QUERIES` to use async queries
- Set up the `SQLLAB_TIMEOUT` and `SUPERSET_WEBSERVER_TIMEOUT`
- Disable unnecessary features by `FEATURE_FLAGS`
- Set up the `WSGI` instead of the Flask (eg. `Gunicorn`)
- Run `superset db upgrade` to update the metadata database
Enter fullscreen mode Exit fullscreen mode

If you are unclear about anything, please leave a comment and wait for the next topic in the Apache Superset tutorial section.

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (1)

Collapse
 
ngtduc693 profile image
Duc Nguyen Thanh

Let me know if you have any question

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay