performance implication of using mediumtext over text in mysql

Rohit Bajaj
Rohit Bajaj used Ask the Experts™
on
hi,
i have a mysql table with a column of type text. i want to change the type to mediumtext to support large amount of data.
what are the performance implications of the same.
will the queries be slow ?

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fixer of Problems
Most Valuable Expert 2014
Commented:
It will be slower although I don't that you will be able to tell.  https://dev.mysql.com/doc/refman/5.5/en/storage-requirements.html

Author

Commented:
i read that text and mediumtext are both stored separately and not in the table only a pointer to that is stored in table...

how can i verify this on my own...
because when i do select from table
i see the whole text only in the ouput and not any pointer
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
You can't easily verify it on your own.  It is supposed to act like single field.  The pointer is an internal function for the MySQL server, not for the user.
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Author

Commented:
ok. where exactly does mysql stores the text data...and what exactly happens when we query the table. how does it retrieve the data for text type columns or mediumtext type columns
Dave BaldwinFixer of Problems
Most Valuable Expert 2014
Commented:
MySQL stores all the database info in a 'data' directory.  I have never thought about how it retrieves the data.  Those functions are internal to the sever and invisible to the user.
Performance would probably not impacted that much, but... if the field is indexed that might have a huge impact on performance

I would guess on the contrary that manging disk space for the data (ie, recovering wasted space by "optimize"-ing te table) would not be affected if your average text size stays about the same
Thx for the grade and points.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial