Commit ad355a16 authored by Andrew Grigorev's avatar Andrew Grigorev

Notice a get_count_query necessity in the docstring

This wont let me to revert #45a27235
parent 74d19e9b
...@@ -608,6 +608,11 @@ class ModelView(BaseModelView): ...@@ -608,6 +608,11 @@ class ModelView(BaseModelView):
def get_count_query(self): def get_count_query(self):
""" """
Return a the count query for the model type Return a the count query for the model type
A query(self.model).count() approach produces an excessive
subquery, so query(func.count('*')) should be used instead.
See #45a2723 commit message for details.
""" """
return self.session.query(func.count('*')).select_from(self.model) return self.session.query(func.count('*')).select_from(self.model)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment