Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 695603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:58:35+00:00 2026-05-14T02:58:35+00:00

I noticed that in MySQL, both VARCHAR and TEXT offer variable-sized data. Well, VARCHAR

  • 0

I noticed that in MySQL, both VARCHAR and TEXT offer variable-sized data. Well, VARCHAR is a bit more efficient in data storage, but still, TEXT MEDIUMTEXT and LONGTEXT offer a lot more potential. So, what are the real uses of VARCHAR?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:58:36+00:00Added an answer on May 14, 2026 at 2:58 am

    First of all, you should read the 10.4. String Types section of the MySQL’s manual : it’ll give you all the informations you are looking for :

    • 10.4.1. The CHAR and VARCHAR Types
    • 10.4.3. The BLOB and TEXT Types

    A couple of important differences :

    • Difference in the amount of text those can contain :
      • varchar have a quite small size limit ; with the newest versions of MySQL, it’s 64 KB, for the total of all varchar columns of a row — which is not that much.
      • TEXT have virtually no limit, as they can contain something like 2^32 bytes.
    • There are differences in indexing and sorting, if I’m not mistake ; quoting the page about TEXT :
      • About sorting : “Only the first max_sort_length bytes of the column are used when sorting.“
      • And, about performances : “Instances of BLOB or TEXT columns in the result of a query that is processed using a temporary table causes the server to use a table on disk rather than in memory“

    Considering these informations, if you are sure that your strings will not be too long, and that you’ll always be able to store them in a varchar, I would use a varchar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed that when I submit text to my MySQL form in VARCHAR it
I'm moving from MySql to Postgres, and I noticed that when you delete rows
I have an older web application that uses a MySQL Database (MYISAM). I noticed
For some time I noticed that MySQL would append comments to InnoDB tables that
I noticed that if I prepare a multi-insert statement and execute it into MySQL
I am currently writing a lot of MySQL queries and noticed that I can
We have noticed that MySQL is reporting a very high number of temporary disk
I'm using the timestamp data type in MySQL so that any timestamp saved will
I noticed that Google maps is providing directions in my local language (hungarian) when
I noticed that you can call Queue.Synchronize to get a thread-safe queue object, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.