1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

CSC#4385: slow sorting for UTF8 large table:

my_strnxfrm_utf8 now requires 2 bytes per character
in filesort key, instead of 3 bytes per character.
Shorter filesort keys make sorting faster.
This commit is contained in:
unknown
2005-01-26 16:34:09 +04:00
parent e8ae338356
commit 9bb464487d
20 changed files with 58 additions and 16 deletions

View File

@ -21,6 +21,15 @@
#include "stdarg.h"
/*
Returns the number of bytes required for strnxfrm().
*/
uint my_strnxfrmlen_simple(CHARSET_INFO *cs, uint len)
{
return len * (cs->strxfrm_multiply ? cs->strxfrm_multiply : 1);
}
/*
Converts a string into its sort key.
@ -1365,6 +1374,7 @@ MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler =
my_strnncoll_simple,
my_strnncollsp_simple,
my_strnxfrm_simple,
my_strnxfrmlen_simple,
my_like_range_simple,
my_wildcmp_8bit,
my_strcasecmp_8bit,