SQL queries executor should consider @class WHERE clauses while resolving indexes
See original GitHub issueFor queries like select from V where @class='Person' and name='foobar'
no Person indexes are considered while searching for applicable indexes. We should try narrow down the possible document class and examine its indexes while executing the query.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Query Processing Architecture Guide - SQL Server
The logic used by the SQL Server Query Optimizer to decide when to use an indexed view is similar to the logic used...
Read more >Does the order of where clauses matter in SQL?
No, that order doesn't matter (or at least: shouldn't matter). Any decent query optimizer will look at all the parts of the WHERE...
Read more >Conditional WHERE clauses in SQL - Avoid Smart Logic
As a consequence, the database uses a full table scan even if there is an index for each column. It is not that...
Read more >Best practices for writing SQL queries - Metabase
SQL best practices: a brief guide to writing better SQL queries. ... consider creating an index with a WHERE clause to limit the...
Read more >Tracing and tuning queries using SQL Server indexes
In this blog post, we are going to discuss step by step how to tune the performance of the bad queries using SQL...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ODB will try to use the best index possible if you use queries like
select from SpecificClassHere where...
. This issue is applicable only if you use queries with no specific class specified and later filter by the class inwhere
clause using@class
. So, the answer is yes, ODB will use the index on indexed properties, there is no need to specify the concrete index.Thank Sergey. I’ve created an issue with the suggestion. Sorry again for hijacking this issue.
Scott