diff --git a/superset/sql_lab.py b/superset/sql_lab.py index a2732d17c5031..4db788b14a65f 100644 --- a/superset/sql_lab.py +++ b/superset/sql_lab.py @@ -186,10 +186,14 @@ def handle_error(msg): logging.info('Handling cursor') db_engine_spec.handle_cursor(cursor, query, session) logging.info('Fetching data: {}'.format(query.to_dict())) - data = db_engine_spec.fetch_data(cursor, query.limit) stats_logger.timing( 'sqllab.query.time_executing_query', now_as_float() - query_start_time) + fetching_start_time = now_as_float() + data = db_engine_spec.fetch_data(cursor, query.limit) + stats_logger.timing( + 'sqllab.query.time_fetching_results', + now_as_float() - fetching_start_time) except SoftTimeLimitExceeded as e: logging.exception(e) if conn is not None: