Storing large amounts of information in MySQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chemlight
    New Member
    • Jan 2009
    • 33

    Storing large amounts of information in MySQL

    I have been doing research, and according to what I have found, the field format TEXT supposedly supports unlimited storage. I have a web application, which I am trying to write a save function for. The save function gets all of the dynamic parts of the page, and inputs them into a MySQL databse.

    I was running into problems on pages that have a lot of generated content (mainly due to generated drop down menus with options). The end result is that not all of my information is getting stored in the database. I've been testing the character count before I input using javascript, and it turns out to be right around 85,000 to 90,000 characters.

    I am using MySQL 5.0.67.

    Any suggestions on getting a single field to actually support unlimited information would be greatly appreciated.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    TEXT only stores a maximum of 2 ^(61) - 1 characters which my calculator says is 65 535 characters.
    Better use MEDIUMTEXT which is 2^(24) - 1 characters or bring the sledgehammer LONGTEXT to the party (4G a.k.a 2 (32) - 1)

    Comment

    • wizardry
      New Member
      • Jan 2009
      • 201

      #3
      this doc shows how to increase your packet buffer and explains more about blob and text.

      I personally suggest longblob instead of longtext you can do a lot of dml with long blob.




      engine and table restrictions


      quick note about memory allocation in using blobs and text with size problems


      hope this helps

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        You should rather use Blob for binary data only.

        Comment

        Working...