>From: christophe barbe <[EMAIL PROTECTED]>
>
>Is it then correct that VARCHAR(255) and TINYTEXT are strictly
>equivalent?
I believe they work almost the same, but there may be performance implications because
they are stored differently.
My understanding is that TINYTEXT is simply a sort of BLOB with FULLTEXT indexing
capability. BLOBs are stored separate from the main record, thus an additional
re-direction is involved, which may involve moving the disk heads.
Thus, BLOBs (and TEXT) cannot be properly indexed (although TEXT can have FULLTEXT
indeces, which are more complicated than normal indeces), and thus cannot be key
fields.
I don't know this from looking at the source code or MySQL docs, just from experience
with other databases and a quick look at what is enabled via phpMyAdmin. Feel free to
correct me!
Also, I think something else written in this thread is wrong. Someone said that CHAR
is much quicker than VARCHAR when traversing records, because the VARCHAR field has to
be searched for the end of the string. AFAIK, it only has to look at the size field to
determine how to skip to the next field, which is MUCH faster than searching a string
for a terminator. This has an additional implication that VARCHAR fields are always
bigger for a given string than an appropriately sized CHAR field.
Again, corrections welcome, since this is stuff I learned from deep ponderings while
optimizing Sybase and Informix databases.
>NOTE: I understand now the "sql,query" stuff. Strange idea.
Thanks. I needed that. :-)
Thanks to the admins for adding it, too. Spam can be a pain, but due to other
thoughtful mail I receive, I've already re-financed my house, have low long distance
rates, are on first-name basis with all the hottest {appropriate adjective here}
chicks, and have huge breasts and penis, so I have no need of further such goods and
services offered via this list... :-)
--
: Jan Steinman -- nature photography: <http://www.Bytesmiths.com>
: Bytesmiths -- artists' services: <http://www.Bytesmiths.com/Services>
: Join the forums at <http://www.Bytesmiths.com/wiki>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php