Mogball commented on a change in pull request #4655: [druid] Updating refresh
logic
URL:
https://github.com/apache/incubator-superset/pull/4655#discussion_r176221329
##########
File path: superset/connectors/druid/models.py
##########
@@ -361,21 +361,18 @@ def get_metrics(self):
)
return metrics
- def generate_metrics(self):
- """Generate metrics based on the column metadata"""
- metrics = self.get_metrics()
- dbmetrics = (
- db.session.query(DruidMetric)
Review comment:
Running a loop to issue a query for each metric/column means that many
queries have to be made, as opposed to just one to grab them all at once. If
you've got tons of metrics and such, this adds up and can be reasonably slow
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services