Hi Jeremy, ----- Original Message ----- From: "Jeremy Zawodny" Sent: Monday, December 22, 2003 2:20 PM Subject: Re: Benefits of MAX_ROWS and AVG_ROW_LENGTH
> On Fri, Dec 19, 2003 at 06:40:17PM -0600, Matt W wrote: > > Hi Mark, > > > > I'll tell you what I know. :-) > > > > First, AVG_ROW_LENGTH is only needed for dynamic row-length tables (it's > > ignored with fixed-length rows) -- more specifically, those with > > TEXT/BLOB columns. > > And VARCHAR/VARBINARY. Yes, in that VARCHAR makes variable length rows, but *not* that you *have to* (or rather "really should") specify AVG_ROW_LENGTH with MAX_ROWS. Sure, include it if your VARCHARs aren't always going to be filled to the max length. Otherwise, MySQL will just assume that the rows will be as long as the sum of the max length of all the VARCHAR (and other) columns. When VARCHAR(n) is specified, and n is the max length that will be stored in the column, this should be a pretty accurate assumption, no? But if you have TEXT/BLOB columns, their max length (well, plain TEXT anyway; not TINY/MEDIUM/LONG) is equivalent to 255 VARCHAR(255) columns! And again, MySQL will assume you're going to use it all. That's fine if you're actually storing 64K in each column, but that's hardly ever the case. Hence why I said, "more specifically, those with TEXT/BLOB columns." Matt -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]