Feature request
Summary:
Add support for query-level SQL hints (such as OPTION clauses) that can be appended to generated queries, for example: OPTION (RECOMPILE), OPTION (MAXDOP 1).
Motivation:
Sometimes advanced performance tuning, query control, or SQL Server-specific operations require passing additional hints at the query statement level. At present, EntityFramework-Plus provides table-level hints but does not appear to expose a way to add arbitrary OPTION hints to the end of generated queries at the query level.
Proposal:
- Allow users to specify custom SQL option hints via an
WithQueryHint(...) extension or similar API that will inject the hint at the end of the SQL statement.
- Example usage:
dbContext.Entities.Where(...).WithQueryHint("RECOMPILE").ToList();
Typical use cases:
- Forcing parameterized queries to recompile.
- Limiting degree of parallelism with
MAXDOP N.
- Query-level hints required for advanced SQL Server tuning.
Notes:
- Please let me know if Query Hints are already supported in some form that I may have overlooked.
Feature request
Summary:
Add support for query-level SQL hints (such as OPTION clauses) that can be appended to generated queries, for example:
OPTION (RECOMPILE),OPTION (MAXDOP 1).Motivation:
Sometimes advanced performance tuning, query control, or SQL Server-specific operations require passing additional hints at the query statement level. At present, EntityFramework-Plus provides table-level hints but does not appear to expose a way to add arbitrary OPTION hints to the end of generated queries at the query level.
Proposal:
WithQueryHint(...)extension or similar API that will inject the hint at the end of the SQL statement.Typical use cases:
MAXDOP N.Notes: