|
Posted by Bill Karwin on August 30, 2006, 1:35 am
Please log in for more thread options
dt wrote:
> why doesn't mysql offer a feature where it indexes by the END of the
> string, so we can do these types of searches efficiently?
Probably the same answer as for any other "why don't they offer feature
X?" The answer is, "great idea! we'll do it when it comes to the top of
the priority list."
By the way, what you're describing could be achieved with current MySQL:
create a second column, copying the string to it using the REVERSE()
function, and then indexing that column.
Another extension to MySQL could be to allow us to create indexes based
on an expression, like REVERSE(colname), and then any expression in a
query that uses that exact syntax could make use of the index. This is
called "expression indexes" and it's an implementation feature in some
other RDBMS products (e.g. Firebird).
Regards,
Bill K.
|