3/27 In SQL, is there any reason to use bounded VARCHAR instead of the
unbounded TEXT? TEXT gives you the ability to expand as your start
to insert data whereas VARCHAR is bounded, but what about performance
and other issues?
\_ Access and search of text datatypes tends to be pathetic compared
to varchar performance on many databases. I'm not an export so I
can't speak on, say, Oracle or SQL Server's exact performance, but
this is _certainly_ true on Postgres. I believe many databases
story text datatypes as unbounded linked lists.
\_ ok so how do I find out the minimum page size per TEXT
on MySQL? I'm going to use FULLTEXT index on TEXT so that
search will be fast. Also I'm wondering how MySQL deal
with internal fragmentation (say you allocate 5K size, then
some other data comes in, then you increase the size of
that text to say, 6K, what happens? It's a standard heap
problem...)
\_ All of this is *very* specific to the particular
database you are using. Read the docs, read the source
if you can, query relevant mailing lists, etc. Above
all, profile, profile, profile. |