perf: drop unused indexes (backport #18118) (#18124)
* perf: drop many unused indexes
- reference owner - only used for activity page which is unusable
*anyway*
- same for timeline and link doctypes
perf: drop unused index from Commment
Can't find a single query that uses this index
perf: drop pointless "Is home folder" index
just why? It's checkbox index with 1 entry which has unique name already
Most pointless index I've seen no far.
perf: Drop "attached to doctype" separate index
There is already a composite index for this.
perf: drop indexes from web page view log
BOTH are totally unused in any of the queries related to this doctype.
Only "website analytics" report uses this which doesn't even show this
data lmao.
perf: drop unused index from EPS log
We never filter by doctype or type. pointless indexing.
perf: fix up notification log indexes
- drop unused index
- add "for user" index
(cherry picked from commit 3a5a45d8af)
* perf: drop all old `parent` indexes
- re-add parent index on custom_docperm
(cherry picked from commit 7453e8e3a1)
Co-authored-by: Ankush Menat <ankush@frappe.io>