Follow-up from "Add milestone_title filter to Epics Finder"
The following discussion from !36193 (merged) should be addressed:
@egrieff @jprovaznik Since the recursive namespace lookup is repeated, it seems reasonable to think the database would optimize it out, but if you look it appears three times in the plan: https://explain.depesz.com/s/R6fx PG doesn't optimize across the boundaries of a CTE (treating each as a black box) so it appears in this query it doesn't recognize they're the same. The query still only takes about 30ms with data cached, so I think it's fine for now. Perhaps we could create a follow-up to look at this later?