Re: Column's DataType -- TEXT vs BLOB...

2004-06-11 Thread Egor Egorov
Scott Fletcher [EMAIL PROTECTED] wrote:

 I also have another table that use 4 columns of 800 characters along
 with 5 columns that use 250 characters.  I'm thinking of using TEXT for
 9 of those columns.

If you don't plan to store pure binary data in these fields, choose the TEXT
type. 





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Column's DataType -- TEXT vs BLOB...

2004-06-10 Thread Scott Fletcher



I'mwrestling 
over deciding on which data type to go with, TEXT or BLOB. I have one 
table with one column of400 characters, I was thinking that TEXT may be 
the way to go for that one. 

I also have another table that 
use 4 columns of 800 characters along with 5 columns that use 250 
characters. I'm thinking of using TEXT for 9 of those 
columns.

The reason is because I read the MySQL Manual there 
that say TEXT and BLOB are pretty much the same in many ways, the only thing 
different is that BLOB use "VARCHAR" Binary while TEXT use "VARCHAR". But 
reading the article somewhere (not part of MySQL's Manual) say 
this...

--snip--
If it doesn't have to be searchable then a BLOB 
might be more efficient and you shouldn't have to worry about size (Like size is 
important?  ). The reason 
being that BLOB information is stored seperate from the table data and is 
related by a reference number in the table. This keeps the table smaller and 
faster as I understand.
--snip--

So, I don't feel too 
sure what to decide on... Care for some advice or 
recommendation??

Thanks,
Scott 
Fletcher


Re: Column's DataType -- TEXT vs BLOB...

2004-06-10 Thread Matt W
Hi Scott,

No, TEXT and BLOB are the same except for the case-sensitivity differences.
Neither is like VARCHAR (except the with/without BINARY attribute part) in
that TEXT/BLOB columns don't lose trailing spaces when inserted, as VARCHAR
will -- just to clear that up.

That article is wrong, at least for MySQL.  In MySQL, unlike some other
DB systems, neither TEXT nor BLOB data is stored separate from the table.
If you want to have the non-TEXT/BLOB part of your table smaller and faster
(usually for full table scans), you have to manually create a separate
table for your TEXT/BLOB columns.


Hope that helps.

Matt


- Original Message -
From: Scott Fletcher
Sent: Thursday, June 10, 2004 2:47 PM
Subject: Column's DataType -- TEXT vs BLOB...


I'm wrestling over deciding on which data type to go with, TEXT or BLOB.  I
have one table with one column of 400 characters, I was thinking that TEXT
may be the way to go for that one.

I also have another table that use 4 columns of 800 characters along with 5
columns that use 250 characters.  I'm thinking of using TEXT for 9 of those
columns.

The reason is because I read the MySQL Manual there that say TEXT and BLOB
are pretty much the same in many ways, the only thing different is that
BLOB use VARCHAR Binary while TEXT use VARCHAR.  But reading the
article somewhere (not part of MySQL's Manual) say this...

--snip--
If it doesn't have to be searchable then a BLOB might be more efficient and
you shouldn't have to worry about size (Like size is important?  ). The
reason being that BLOB information is stored seperate from the table data
and is related by a reference number in the table. This keeps the table
smaller and faster as I understand.
--snip--

So, I don't feel too sure what to decide on...  Care for some advice or
recommendation??

Thanks,
 Scott Fletcher


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]