Skip to main content

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHARVARCHAR or TEXTTEXT. I'm setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this.

Is there a rationale for going with either VARCHAR(3000)VARCHAR(3000) or TEXTTEXT? There's something about just writing VARCHAR(3000)VARCHAR(3000) that feels somewhat counter-intuitive. I've been through other similar posts on Stack OverflowStackOverflow but would be good to get views specific to this type of common message storing.

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHAR or TEXT. I'm setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this.

Is there a rationale for going with either VARCHAR(3000) or TEXT? There's something about just writing VARCHAR(3000) that feels somewhat counter-intuitive. I've been through other similar posts on Stack Overflow but would be good to get views specific to this type of common message storing.

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHAR or TEXT. I'm setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this.

Is there a rationale for going with either VARCHAR(3000) or TEXT? There's something about just writing VARCHAR(3000) that feels somewhat counter-intuitive. I've been through other similar posts on StackOverflow but would be good to get views specific to this type of common message storing.

Post Reopened by Tom, CommunityBot
Post Closed as "Opinion-based" by Rick James, TylerH, Jim Garrison, Machavity, Munim Munna
deleted 40 characters in body
Source Link
BenMorel
  • 37k
  • 52
  • 208
  • 339

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHAR or TEXT. I'm setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this.

Is there a rationale for going with either VARCHAR(3000) or TEXT? There's something about just writing VARCHAR(3000) that feels somewhat counter-intuitive. I've been through other similar posts on Stack Overflow but would be good to get views specific to this type of common message storing.

Any help would be appreciated. Thanks.

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHAR or TEXT. I'm setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this.

Is there a rationale for going with either VARCHAR(3000) or TEXT? There's something about just writing VARCHAR(3000) that feels somewhat counter-intuitive. I've been through other similar posts on Stack Overflow but would be good to get views specific to this type of common message storing.

Any help would be appreciated. Thanks.

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHAR or TEXT. I'm setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this.

Is there a rationale for going with either VARCHAR(3000) or TEXT? There's something about just writing VARCHAR(3000) that feels somewhat counter-intuitive. I've been through other similar posts on Stack Overflow but would be good to get views specific to this type of common message storing.

Rollback to Revision 2
Source Link
Tom
  • 30.8k
  • 27
  • 94
  • 126

I've got a messages table storing "messages"in MySQL which records messages between users, with each "message" roughly about 3000 characters.

  Apart from the "message" column, I also have other fields like "id"typical ids and "message type" etcmessage types (all integer types) I need to save the actual message text as either VARCHAR or TEXT. I'm setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this.

Somehow, writing VARCHAR(3000) seems somewhat counter-intuitive. IsIs there a rationalerationale for going with either VARCHAR(3000)VARCHAR(3000) or TEXTTEXT? There's something about just writing VARCHAR(3000) that feels somewhat counter-intuitive. I've been through other similar posts on Stack Overflow but would be good to get views specific to this type of common message storing.

Any help would be appreciated. Thanks.

I've got a table storing "messages" between users, with each "message" roughly about 3000 characters.

  Apart from the "message" column, I also have other fields like "id" and "message type" etc.

Somehow, writing VARCHAR(3000) seems somewhat counter-intuitive. Is there a rationale for going with either VARCHAR(3000) or TEXT?

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHAR or TEXT. I'm setting a front-end limit of 3000 characters which means the messages would never be inserted into the db as longer than this.

Is there a rationale for going with either VARCHAR(3000) or TEXT? There's something about just writing VARCHAR(3000) that feels somewhat counter-intuitive. I've been through other similar posts on Stack Overflow but would be good to get views specific to this type of common message storing.

Any help would be appreciated. Thanks.

deleted 324 characters in body
Source Link
Pacerier
  • 90.4k
  • 112
  • 386
  • 649
Loading
removed unnecessary text.
Source Link
Tom
  • 30.8k
  • 27
  • 94
  • 126
Loading
Source Link
Tom
  • 30.8k
  • 27
  • 94
  • 126
Loading