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

Analyzer: Warn about missing indexes on queries #35026

Open
alrz opened this issue Oct 31, 2024 · 0 comments
Open

Analyzer: Warn about missing indexes on queries #35026

alrz opened this issue Oct 31, 2024 · 0 comments

Comments

@alrz
Copy link
Member

alrz commented Oct 31, 2024

Background and motivation

SQL tooling supports this sort of warnings but on efcore's generated SQL there's no visibility into the query patterns and existing indexes.

Proposal

Warn if properties used in conditions are not indexed.

var result = q.Where(e => e.SomeProperty == value); // warn 'missing index on SomeProperty'
var result = q.GroupBy(e => e.SomeProperty); // warn 'missing index on SomeProperty'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant