MySQL Forums
Forum List  »  Performance

Re: VARCHAR vs. TEXT - some performance numbers
Posted by: Rick James
Date: June 16, 2009 10:25PM

I thought I was forgetting something...

MyISAM puts TEXT and BLOB 'inline'. If you are searching a table (range scan / table scan), you are 'stepping over those cow paddies' -- costly for disk I/O. That is, the existence of the inline blob hurts performance in this case.

InnoDB puts only 767 bytes of a TEXT or BLOB inline, the rest goes into some other block. This is a compromise that sometimes helps, sometimes hurts performance.

Something else (Maria? Falcon? InnoDB plugin?) puts TEXTs and BLOBs entirely elsewhere. This would make a noticeable difference in performance when compared to VARCHAR. Sometimes TEXT would be faster (eg, range scan that does not need the blob); sometimes the VARCHAR would be faster (eg, if you need to look at it and/or return it).

Note: in later versions, VARCHAR can go up to 65535, making it nearly the same as TEXT, not just TINYTEXT.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: VARCHAR vs. TEXT - some performance numbers
29597
June 16, 2009 10:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.