metabase / metabase/metabase

Improve querying UX when dealing with long-running, slow queries

Open
#10,690 4 comments 7 reactions 0 assignees View on GitHub
Priority:P2 Querying/GUI Querying/Native Type:New Feature
Dominant language
Clojure
Stars
49.3k
Forks
6.8k
Avg merge
1d 13h
Merged PRs (30d)
653

Description

Many of our customers and users often have to write and run queries that can take upwards of 5–10 minutes to complete. There are two inherent problems in these situations:

1. I can't really do anything else in Metabase until the query finishes, unless I open another browser tab.
2. If I accidentally navigate away before the query finishes, I'll have to start waiting all over again.

There are some really simple solutions, e.g.:
- Just use browser tabs if you want to run multiple slow queries. Maybe we could add a Favicon badge to indicate when a query is done running, the way that GitHub indicates when tests have passed on a PR.
- Add a blocking "are you sure you want to navigate away" modal when a query is running; maybe only show it after a query has been running for > 30 seconds or if we know the avg. execution time is > 1 minute.

More involved possible solutions, which could complicate things quite a bit:
- In the native query editor, add the ability to have multiple tabs for multiple queries.
- If you navigate away from the editor, and then come back, your tabs could be preserved, allowing you to start one or more queries, then go off and do something else in MB, and then come back.
- Could also add in-app toast notifications to let folks know when their queries are done. (And/or repurpose the Activity Feed?)

Contributor guide

Open the contributing guide

Research direction

Start with the native query editor and trace how long-running queries behave when users navigate away or open another tab. Compare the proposed favicon, navigation-warning, preserved-tab, and toast-notification approaches before selecting a focused scope. Done should include a defined multi-query or completion-notification experience, but the issue does not identify files or tests.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.