3 ms·
I really don't understand your general thrust here. MySql certainly had lots of issues in 2003, but being able to support multi-column indexes was not one of th
by hn_throwaway_99 5y ago
I really don't understand your general thrust here. MySql certainly had lots of issues in 2003, but being able to support multi-column indexes was not one of them. Her analysis is simply wrong - it is wrong now and was wrong then. Here is the doc from MySql v3.23:
7.4.2 Multiple-Column Indexes
MySQL can create composite indexes (that is, indexes on multiple columns). An index may consist
of up to 16 columns. For certain data types, you can index a prefix of the column (see Section 7.4.1,
“Column Indexes”).
A multiple-column index can be considered a sorted array containing values that are created by
concatenating the values of the indexed columns.
MySQL uses multiple-column indexes in such a way that queries are fast when you specify a known
quantity for the first column of the index in a WHERE clause, even if you do not specify values for the
other columns
- mst 5y agoAs I said already: "mysql could index strings" and "using a compound index over four varchar columns would've worked out well" are significantly different propositions. To be more verbose about it - there is an important difference between "can be created" and "will perform sufficiently well on whatever (likely scavenged) hardware was assigned to the internal IT system in question." I wouldn't be surprised if the "server" for this system was something like a repurposed Pentium 233 desktop with a cheap spinning rust IDE drive in it, and depending on just how badly the spammers were kicking the shit out of the mail system in question that's going to be a fun time.
- lern_too_spel 5y agoThey are not significantly different. It just means sorting using more than one column.
- merb 5y agoyou know for performance the new table would've needed a string index aswell?
- yuliyp 5y agoA single-column string index is a different beast to implement compared to a multi-column varchar index.
- jeremyjh 5y agoA composite index is literally just concatenating the fields and then indexing that value. This is not technology that was out of reach of MySQL in 2002 and there is no reason to presume it was so when TFA clearly described the problem as a complete lack of indexes.