[ale] MySQL question on indexes
Greg Sabino Mullane
greg at turnstep.com
Tue Mar 5 13:50:48 EST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Is it possible to create an index using a function, like upper() or
> ucase() or whatever?
This is what is known as a functional index. Last I checked, MySQL
does not have this. Matter of fact, all it has is simple b-tree
indexes. Functional indexes are very handy things to have around:
they let your run a function (even ones much more complcated than the
examples above) one time only; after that, the results are available via
the index for very fast lookups. It's not something you can really implement
any other way and get the same benefits.
> I'm converting an old DOS Foxpro app with standard
> dbase tables to a Windows app using MySQL as the backend
Ah, there's the problem. You're attempting to go from a RDBMS to
a non-RDBMS. Hopefully the functional index is the only real
difference, and hopefully you're using for something where data
integrity is not important, such as serving up web pages.
Greg Sabino Mullane greg at turnstep.com
PGP Key: 0x14964AC8 200203051348
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html
iD8DBQE8hRM4vJuQZxSWSsgRAgoCAKCUWlC/iWoiCO9XaTpNmRrVH3fvsQCg7S69
UXS/VvS3Repi1gLZC3aAwuE=
=tUEg
-----END PGP SIGNATURE-----
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list