Problems with infinite number of query statements being called from charts causing DB failures #33342
Replies: 1 comment
-
I found some similar threads that might be relevant to your situation:
Regarding your questions: Q1: Superset can handle long-running queries using an asynchronous backend configured with Celery. This setup includes Superset workers, a Celery broker (such as Redis or RabbitMQ), and a results backend. You can also set a timeout for queries using the SQLLAB_TIMEOUT = 1800 This setting helps manage query execution and prevent database failures due to prolonged query execution [3][4]. Q2: For dashboards with large data tables, it is recommended to optimize database performance by adding appropriate indexes. This ensures that queries execute quickly and efficiently. Additionally, consider using views or pre-aggregated tables to reduce the need for complex joins and transformations at query time [5][6]. Q3: Unfortunately, I couldn't find specific information on changes or improvements in Superset versions 4 and 5 regarding query handling and performance optimization. It might be worth checking the release notes or documentation for these versions for any updates related to your issue. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
I'm currently using Superset 1.9 version, refining the 10GB size table into a view table, connecting the view table to the Superset and using it for the dashboard.
When the dashboard is displayed, each chart is displayed by blowing a query statement to display the chart on the connected view table.
Q1. If a chart uses a column without an index to call a query statement for a long time, it doesn't take a timeout and the query statement continues to build up on the pid, causing a failure in the DB. Is there a way to solve this problem?
Q2. For dashboards that use large data tables, should I use the index considering all the charts in the dashboard as well as the view table in the DB?
Q3. Do these things only happen in version 1.9? I would like to know if the current version 4 and the upcoming version 5 have solved this problem.
Beta Was this translation helpful? Give feedback.
All reactions