<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Data Types mysql between varchar and mediumtext size</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Data-Types-mysql-between-varchar-and-mediumtext-size-80032</link>
        <description></description>
        <pubDate>Sun, 19 Jul 2026 15:31:58 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Data-Types-mysql-between-varchar-and-mediumtext-size-80032" rel="self" type="application/rss+xml" />

                <item>
          <title>Data Types mysql between varchar and mediumtext size</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236595#post2236595</link>
          <description><![CDATA[<p>Thank you all very much,<br /><br />Excellent advice.</p>
<p>regards and thanks again</p>

<p>Kenny</p>]]></description>
          <pubDate>Tue, 21 Apr 2015 02:51:10 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236595#post2236595</guid>
        </item>
                <item>
          <title>Data Types mysql between varchar and mediumtext size</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236592#post2236592</link>
          <description><![CDATA[<p>Hi Kenny, </p>
<p>You can usually safely ignore all of this and just go with the defaults on typical websites with negligible performance differences, but here's some info for you:</p>
<p>The "Max Length" setting in the CMS is for error checking only.  It doesn't change how the data is stored in MySQL, it just gives an error when you submit a string longer than that.</p>
<p>When you specify a varchar field you can specify the mysql column length, but for mediumtext you can not.  </p>
<p>You can find the "Storage Requirements for String Types" in the MySQL docs here:<br /><a href="http://dev.mysql.com/doc/refman/5.5/en/storage-requirements.html#idm140193328410032" rel="nofollow">http://dev.mysql.com/doc/refman/5.5/en/storage-requirements.html#idm140193328410032</a></p>
<p>And to answer your question, every mediumText column uses the number of bytes of the data entered plus 3 more.  So "Hello World" is 11 bytes and would take 14 bytes of disk space (11 + 3), not 16 megs.</p>
<p>And 97% of the time, if you optimize last when you experience problems and don't worry about it at all, that will actually work better.  See: <a href="http://c2.com/cgi/wiki?PrematureOptimization" rel="nofollow">http://c2.com/cgi/wiki?PrematureOptimization</a></p>
<p>Hope that helps!</p>]]></description>
          <pubDate>Mon, 20 Apr 2015 12:26:00 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236592#post2236592</guid>
        </item>
                <item>
          <title>Data Types mysql between varchar and mediumtext size</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236589#post2236589</link>
          <description><![CDATA[<p>Thank you,<br />Excuse my ignorance but when I read tutorials etc they never come across as too clear to me.</p>
<p><em><strong>mediumText  </strong></em><em><strong>states in the cms gui  max 16 meg.</strong></em></p>
<p><em><strong>My question is</strong></em></p>
<p>Were I to use <strong>datatype as mediumText</strong> and <strong>set max char</strong> size to <strong>2000</strong>, does this mean every time a record is created I use up 16 meg weight of the data base space?</p>
<p><strong>Or</strong></p>
<p>By setting <strong>mediumText</strong> and setting<strong> max char</strong> size to <strong>2000</strong> does that mean, when ever a record is created I use up to 2000 char space/weight of my database?</p>

<p>Sometimes these things are not so clear, and no matter what I search and read etc they never give a straight forwardish answer.</p>
<p>I have very grateful to you both and others for any input.</p>
<p>cheers</p>

<p>Kenny</p>]]></description>
          <pubDate>Sat, 18 Apr 2015 07:06:43 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236589#post2236589</guid>
        </item>
                <item>
          <title>Data Types mysql between varchar and mediumtext size</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236585#post2236585</link>
          <description><![CDATA[<p>Hey Twocans,</p>
<p>The easiest option would be to use mediumText, and then limit the users input to 2000 characters using the <em>max length</em> setting when editing a field. If you use the option suggested by Djulia, ensure that you set the <em>max length</em> to 2000 characters or you might get MySQL errors if a user enters too many characters.</p>
<p>Cheers,</p>
<p>Greg</p>]]></description>
          <pubDate>Fri, 17 Apr 2015 11:21:40 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236585#post2236585</guid>
        </item>
                <item>
          <title>Data Types mysql between varchar and mediumtext size</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236578#post2236578</link>
          <description><![CDATA[<p>Hello,</p>
<p>Yes, you can use the option Other/Custom in the select MySQL Column Type :</p>
<p>TEXT</p>
<p><a href="http://stackoverflow.com/questions/5053658/mysql-varchar2000-vs-text" rel="nofollow">http://stackoverflow.com/questions/5053658/mysql-varchar2000-vs-text</a></p>
<p>Djulia</p>

]]></description>
          <pubDate>Fri, 17 Apr 2015 04:34:08 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236578#post2236578</guid>
        </item>
                <item>
          <title>Data Types mysql between varchar and mediumtext size</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2236577#post2236577</link>
          <description><![CDATA[<p>Hello,</p>
<p>I would be grateful for any input.<br /><br />When setting values for my user input I have the option of varchar which is cool but only 255 char. Sometimes I need something max 2000 char but feel it is such a waste to have to set mediumtext as that is 16 odd meg and wowa, I do not want to give so much option. I see there is an option of setting other custom mysql column type and that gets me excited but having looked into it, in MySQL I am not really given much options. </p>
<p>Is there a way of my setting a char type thus allowing me a max of 2000 char.</p>
<p>regards</p>
<p>Kenny</p>]]></description>
          <pubDate>Fri, 17 Apr 2015 03:35:15 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2236577#post2236577</guid>
        </item>
              </channel>
    </rss>
  