List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:October 8 1999 2:21am
Subject:text vs char(255)
View as plain text  
>>>>> "Adam" == Adam Powell <adam@stripped> writes:

Adam> I am writing a messaging system on a web site, and currently I am using
Adam> char(255) for the message body.  However, I would really like the messages
Adam> to be larger than this.  My problem is that there will be lots and lots of
Adam> database queries that look through the entire table of messages, and I am
Adam> worried that if I change the char(255) to text, then I am going to get
Adam> significant slowdown.... even if the messages only went up to say.. 400
Adam> characters... would this be a problem?

Adam> Thanks,
Adam> Adam

No.  You will get almost exactly the same slowdone for a VARCHAR as for a
TEXT column;  In both cases MySQL will use a dynamic length row
format.

(This assumes of course that your medium message lenght doesn't
increase too much)

Regards,
Monty
Thread
text vs char(255)Adam Powell8 Oct
  • text vs char(255)Michael Widenius8 Oct