I have made a table in collation utf8_general_ci .
CREATE TABLE `general` (
`one` varchar( 250 ) NOT NULL ,
`two` varchar( 250 ) NOT NULL ,
`time` varchar( 250 ) NOT NULL,);
and entered 1000 records in it.
insert into general values('ankit','hamitte','13364783'),('john','will','13364783');
Now when i am selecting the records and sorting them then it takes a couple of second while when i use armscii_general_c1 it loads instantly.What is the main reason for this and which collation should be used by me
I’m guessing you have all three columns in a multi-column index?
If so, then with utf8, they won’t fit. MySQL will have to scan rows. A MySQL index is limited to 767 bytes in InnoDB (1000 for MyISAM), and indexes are fixed width, so UTF8 indexes are three times the size of single byte encoded indexes.
You’ll only fit one column into the index with UTF8.
So, with the single-byte encoding, MySQL can utilize the index fully, whereas with the multi-byte encoding, MySQL cannot fully utilize the index.