Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
属性にインデックスを作成すると、この属性のツリーが作成されます。 しかし、複合属性を持つインデックスを作成するとどうなるでしょうか? 2 つのツリーが作成されますか。両方とも同じツリーの一部ですか?何?
あなたが言及したのと同じ順序で属性を連結します。同じ理由で、列 a、b、c に同じ順序で複合インデックスがある場合、インデックスは左側の列が検索される場合にのみ役立ちます。
WHERE a=4 ## uses index WHERE a=4 and b=10 ## uses index WHERE b=10 ## doesnot use index