Monday, 15 February 2010

MySQL: Large VARCHAR vs. TEXT? -



MySQL: Large VARCHAR vs. TEXT? -

i've got messages table in mysql records messages between users. apart typical ids , message types (all integer types) need save actual message text either varchar or text. i'm setting front-end limit of 3000 characters means messages never inserted db longer this.

is there rationale going either varchar(3000) or text? there's writing varchar(3000) feels counter-intuitive. i've been through other similar posts on stack overflow views specific type of mutual message storing.

any help appreciated. thanks.

text , blob stored off table table having pointer location of actual storage.

varchar stored inline table. varchar faster when size reasonable, tradeoff of faster depends upon info , hardware, you'd want benchmark realworld scenario data.

mysql text messages varchar

No comments:

Post a Comment