Query Analyzer
FluxCRUD includes aQueryAnalyzer to help you spot performance bottlenecks such as N+1 problems or excessive row scans.
Analyzing and improving slow queries
QueryAnalyzer to help you spot performance bottlenecks such as N+1 problems or excessive row scans.
from fluxcrud.query import QueryAnalyzer
async with QueryAnalyzer() as analyzer:
users = await repo.get_multi(session)
print(f"Total Queries: {analyzer.count}")
from fluxcrud.query import with_hints
# Apply hints
query = with_hints(query, "MAX_EXECUTION_TIME(1000)")