You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2025/08/01 21:20:45 UTC

[PR] fix(sqllab): show actual execution duration in Query History [superset]

rusackas opened a new pull request, #34511:
URL: https://github.com/apache/superset/pull/34511

   ### SUMMARY
   This PR fixes the duration display in SQL Lab's Query History tab to show only the actual query execution time rather than the total time including queue/scheduling delays.
   
   The issue was that the duration calculation used `end_time - start_time`, which includes the time a query spends in various states (pending, scheduled, etc.) before actually executing. This fix updates the calculation to use `start_running_time` when available, which represents when the query actually began executing.
   
   **Changes:**
   - Added `start_running_time` to the API response in `QueryRestApi.list_columns`
   - Updated TypeScript interfaces to include the new field
   - Modified the duration calculation in QueryHistoryList to prefer `start_running_time` over `start_time`
   
   Fixes #30894
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   **Before:** Duration shows total time including queue/wait time
   **After:** Duration shows only actual execution time
   
   ### TESTING INSTRUCTIONS
   1. Go to SQL Lab
   2. Run several queries of varying complexity
   3. Navigate to the "Query History" tab
   4. Verify that the Duration column shows reasonable execution times (e.g., simple SELECT queries should show durations under a second)
   5. For queries that were queued or scheduled, verify the duration reflects only the actual execution time
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: #30894
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.ai/code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sqllab): show actual execution duration in Query History [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #34511:
URL: https://github.com/apache/superset/pull/34511#issuecomment-3145803762

   Opened a PR https://github.com/apache/superset/pull/34511


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sqllab): show actual execution duration in Query History [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe merged PR #34511:
URL: https://github.com/apache/superset/pull/34511


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org