This Wednesday, 6th June 2018, I will be presenting at OpenExpo Europe in Madrid: Experiences with testing dev MySQL versions and why it’s good for you. It’s always good to test new releases of MySQL and this presentation talks about why. If you are at the conference then please come along and say hello. Update 2018-06-07. … Continue reading I will be presenting at OpenExpoEurope in Madrid on Wednesday
Showing entries 1 to 2
Jun
04
2018
Mar
13
2015
One of my customers wants to search for names in a table. But
sometimes the search is case insensitive, next time search should
be done case sensitive. The index on that column always is
created with the collation of the column. And if you search with
a different collation in mind, you end up with a full table scan.
Here is an example:
The problem
mysql> SHOW CREATE TABLE City\G
*************************** 1. row ***************************
Table: City
Create Table: CREATE TABLE `City` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` char(35) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`CountryCode` char(3) NOT NULL DEFAULT '',
`District` char(20) NOT NULL DEFAULT '',
`Population` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`ID`),
KEY `CountryCode` (`CountryCode`),
KEY `Name` (`Name`),
) ENGINE=InnoDB AUTO_INCREMENT=4080 DEFAULT CHARSET=latin1
1 row in set (0,00 sec)
…
[Read more]
Showing entries 1 to 2