Hi! On Feb 21, HMax wrote: > Thank you for your answer Sergei, > > It's all clear now, and I'm glad to know where the problem comes from. > > Now if I understand correctly, my only solution is to manage to create > indexes in my tables that ALL have the same block size (1024). This > would mean reducing the size of the indexes on my Varchar fields, > which I think I can. What is the max characters I should use when > indexing my Varchar so that block size are 1024 ? (if possible of > course). I have no idea how to calculate this.
You'd better try with trial-and-error. myisamchk -dvv shows block size. It's enough to create an empty table and run myisamchk -dvv on it. The formula is in mi_create.c but I would spend more time unrolling all the defines and deriving max varchar langth, that you would do with trial-and-error :) > And is there absolutly no way to force 1024 block size even for > varchar ? No, but you can make it 2048 for normal indexes. Block length is a multiple of myisam_block_size, so if you set it to 2048, all indexes will use it. (of course it'll be suboptimal for everything but the long varchar keys. And even if you have an index over VARCHAR(255), actual values are usually shorter, right ?) Regards, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]