Copy/paste from the answer to the question that was posted before yours;
Quote:
That means the index is sorted on col1, then col2. Meaning, col1 will be located first, then most rows following with the same col1 will be sorted on col2.
Meaning, in a list of users, while random stored in the table, would have an index that orders it as such; Lastname, Firstname Doe, Jane Doe, John Vluggen, Albert Vluggen, Eddy Vluggen, Zack If you search it, you go "where lastname = bla (col1 from index) AND firstname = bla2 (col2 from index)". This way, it will first locate the segment for "Vluggen", and only has to scan until it finds "Eddy" within that segment. That's what the DB is optimized to do.
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.