So I am wondering if there is a definitive answer to this question.
Also, does it matter if the index is clustered vs. non-clustered.
Is it the same in all RDBMS implementations or is the exact behavior going to be proprietary?
SQL is a declarative language, not a procedural one. Each SQL implementation is going to have its own quirks about implementation details like which indexes get used, how the optimizer decides which indexes to use, what the SQL programmer can do to affect the choice, and so on.
Use of indexes is not a part of the SQL standard, but rather an implementation detail of the particular DBMS.
Ideally, it shouldn't affect it, since it doesn't affect the actual rows that are returned.
But I've seen queries on an unnamed DBMS that does change index use based on the SQL query order.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With