Closed Thread
Results 1 to 3 of 3

Thread: varchar & text in MySQL

  1. #1
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    varchar & text in MySQL

    Hello

    I'd wonder how big varchars you need to start consider text fields instead?

    at the moment, I have a 500 limit on my varchars, but I feel that I would need to increase it, so when should text be a reasonable field type. I know that text is treated differently. Although, there will be no full text search in this field.
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: varchar & text in MySQL

    It depends a lot on the context, but I generally view it as a question of whether there is a reasonable limit on the amount of text a user might want to enter. Anything that's for storing "notes" type information I would make text, just because that can get quite long over time. I'd say anything over 100 chars is becoming a candidate for text, but if searching on it is important, I might hold off.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: varchar & text in MySQL

    At this specific context, most values will be up to 20 characters, but at times, some longer will be needed to be stored, maybe up to 1000 characters, it's gonna be admin editable, but not user editable...
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Converting Data from varchar
    By DoktorD1313 in forum Database & Database Programming
    Replies: 6
    Last Post: 07-26-2011, 11:08 AM
  2. Conversion failed when converting the varchar value '%' to data type int.
    By TheWebGuy in forum Database & Database Programming
    Replies: 2
    Last Post: 11-07-2010, 04:27 AM
  3. Replies: 1
    Last Post: 10-20-2010, 12:38 AM
  4. Replies: 0
    Last Post: 10-10-2010, 11:06 AM
  5. [C#]MySQL] Host '****' is not allowed to connect to this MySQL server
    By ZaroX in forum Database & Database Programming
    Replies: 2
    Last Post: 02-16-2010, 08:34 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts