Skip to content

Commit

Permalink
perf: Avoid ordering in count query (#25451) (#25452)
Browse files Browse the repository at this point in the history
Order doesn't matter for count. This PR now actually makes #25348 effective

(cherry picked from commit dbe55d4)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Mar 14, 2024
1 parent 371fa09 commit 07aadd3
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 07aadd3

Please sign in to comment.