I can not understand how b-tree is organized when there are> 1 columns in the index and they are of different types. The logical assumption is that the key of the tree is a certain hash function of the columns, but then it is obviously necessary to observe the condition that
H (a, b)> H (a) & H (a, b)> H (b) & H (a, b) <H (a +1, b) & H (a, b + 1) <H (a + 1)
I guess that a perceptual hash with some “bits” can help with this, where the discharge corresponds to the column, but the length of the hash confuses me.
Another option seems to me not to make a hash, but to explicitly compare the values ​​of the index fields when loading / unloading from it. But then it's not clear how it will work.
select * from A where Ab > 1 Ac < 3
if the index is declared as
<Aa, Ab, Ac>
How are we going to bypass the tree without having restrictions on the first level?
Will the scheduler use this index?
Related questions - does the order of listing index fields in the WHERE clause matter?
Will we be able to get into the index if some of the fields are listed in the ON clause of the subquery, and some in the WHERE of a more general query, i.e. Does the redistribution of conditions work together with the assessment hit / do not fall into the index?
How can this be influenced?