Skip to content

Commit

Permalink
perf: Avoid ordering in count query
Browse files Browse the repository at this point in the history
Order doesn't matter for count. This PR now actually makes frappe#25348 effective
  • Loading branch information
ankush committed Mar 14, 2024
1 parent 8e3175f commit 7f3bcac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frappe/desk/reportview.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def get_count() -> int:
distinct = "distinct " if args.distinct else ""
args.limit = cint(args.limit)
fieldname = f"{distinct}`tab{args.doctype}`.name"
args.order_by = None

if args.limit:
args.fields = [fieldname]
Expand Down

0 comments on commit 7f3bcac

Please sign in to comment.