Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Child Collection LINQ Query Optimization Phase Next #2829

Open
jeremydmiller opened this issue Nov 29, 2023 · 0 comments
Open

Child Collection LINQ Query Optimization Phase Next #2829

jeremydmiller opened this issue Nov 29, 2023 · 0 comments
Labels

Comments

@jeremydmiller
Copy link
Member

There is probably some extra cases where Marten is querying against child collections somehow, someway that force Marten to use CTEs. I think I'd like to propose putting some extra logging in temporarily that calls out CTE queries and the corresponding LINQ query that caused it.

Offhand from poking around, I think we're got opportunities to opt into JSONPath filters to eliminate CTE usage with:

  • The filter for string.IsEmptyOrNull() could be a JSONPath check (@oskardudycz just did that, but it popped up as a CTE query)
  • string.StartsWith/Contains/EndsWith()? Contains is possible through JSONPath. Not sure about the others, but JSONPath docs are absurdly fragmented
  • Intersection queries. See any_filter_honors_tenancy()

I think these are low priorities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant