why length 3 key in utf8 use 11 bytes?

2006-10-18 Thread freebat
create index ub_city_key on ub (city(3)); id: 1 select_type: SIMPLE table: ub type: ref possible_keys: ub_id_key,ub_city_key key: ub_city_key key_len: 11 ref: const rows: 4340 Extra: Using where 1 row in set (0.00 sec) Why

Re: Why 30,000,000 rows simple table index select so slow?

2006-10-15 Thread freebat
10/15/06, *freebat* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: this is the table: CREATE TABLE `gossip` ( `id` bigint(20) unsigned NOT NULL auto_increment, `owner` int(11) NOT NULL, `sender` int(11) NOT NULL, PRIMARY KEY (`id`),

Why 30,000,000 rows simple table index select so slow?

2006-10-15 Thread freebat
this is the table: CREATE TABLE `gossip` ( `id` bigint(20) unsigned NOT NULL auto_increment, `owner` int(11) NOT NULL, `sender` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `owner_id` (`owner`,`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin table status: mysql> show table st