← Back to team overview

maria-developers team mailing list archive

Re: How to change max key length for MyISAM?


Am 14.01.21 um 21:39 schrieb Witold Filipczyk:
Dnia Thu, Jan 14, 2021 at 08:52:14PM +0100, Sergei Golubchik napisał(a):
Hi, Witold!

On Jan 14, Witold Filipczyk wrote:

Why do you want to increase the max key length?

I like mysqlhotcopy as backup tool, but new soft requires big key.

Yes, that's what I was asking. What does it require, can you show an
example of a table definition?

I mean, a non-unique key doesn't have to be that long. If it's smaller,
it'll still help to narrow the search to all rows with the same
1000-byte prefix, and then just compare them all with the exact 3K
value. So 1K-key will still help even if values are 3K (except when all
your values have exactly the same 1K prefix, but it's not a very
realistic scenario). But with 1K keys you'll fit 3 times more keys per
index page, you'll have less disk IO, and less tree levels to search.

You would really need 3K, if you have 3K UNIQUE key, for UNIQUE 3k
contraints. Using 1K keys would change the semantics, values won't
necessarily be unique anymore. But since 10.4 MariaDB supports unique
constraints of arbitrary length. So, again, you should not need to
increase max key length for that (except that you're on 10.3 now).

I'm trying to install prestashop- on MyISAM

and why does that piece of software don't work with sensible defaults and force you too pacth source code and recompile your database server in a way nobody but you is running?

this is asking for troubles and until someone can prove a *real* benefit i call it bullshit and won#t install "prestashop- on MyISAM"

the other possibilty is that it's designed to work with innoDB and *not* MyISAM which means: just don't enforce MyISAM, key sizes are your smallest problems in reality

Follow ups