perf: Avoid ordering in count query (#25451)
Order doesn't matter for count. This PR now actually makes https://github.com/frappe/frappe/pull/25348 effective
This commit is contained in:
parent
8e3175f3e8
commit
dbe55d4ace
1 changed files with 1 additions and 0 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue