목록Database/MySQL (9)
4번독수리의 둥지
https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html For any Unicode character set, operations performed using the xxx_general_ci collation are faster than those for the xxx_unicode_ci collation. For example, comparisons for the utf8mb4_general_ci collation are faster, but slightly less correct, than comparisons for utf8mb4_unicode_ci. The reason is that utf8mb4_unicode_ci supports ..
http://gywn.net/2012/04/mysql-covering-index/ create table usertest ( userno int(11) not null auto_increment, userid varchar(20) not null default '', nickname varchar(20) not null default '', .. 중략 .. chgdate varchar(15) not null default '', primary key (userno), key chgdate (chgdate) ) engine=innodb; 위 테이블에서select * from usertest where chgdate like '2010%' limit 100000, 100vsselect a.* from ( s..
$l = 100; // DATE_ADD() : 0 sec $sql1 = "select * from TABLE where Date > DATE_ADD(NOW() INTERVAL -30 DAY)"; $starttime = time(); for ($i = 0; $i '{$date}'"; $starttime = time(); for ($i = 0; ..
http://stackoverflow.com/questions/448023/what-is-the-difference-between-left-right-outer-and-inner-joins
http://stackoverflow.com/questions/1992312/meaning-of-select-tables-optimized-away-in-mysql-explain-plan It means you have done a query that does nothing more than count the number of rows in a table, and that table is a MyISAM table. MyISAM tables are stored with a separate row count, so to do this query MySQL doesn't need to look at any of the table row data at all. Instead it immediately retu..
http://stackoverflow.com/questions/7110964/correct-indexing-when-using-or-operator You misunderstand how indexes work. Think of a telephone book (the equivalent of a two-column index on last name first, first name last). If I ask you to find all people in the telephone book whose last name is "Smith," you can benefit from the fact that the names are ordered that way; you can assume that the Smit..
lsof -nc mysqld | grep index mysqlbinlog bin_log_file_name > sql_file_name http://www.psce.com/blog/2012/06/02/how-to-find-mysql-binary-logs-error-logs-temporary-files/ https://dev.mysql.com/doc/refman/5.0/en/mysqlbinlog.html
database select를 하기 전에는 prepare가 되지 않음.
There should be no significant performance difference between multiple tables in a single database versus multiple tables in separate databases. In MySQL, databases (standard SQL uses the term "schema" for this) serve chiefly as a namespace for tables. A database has only a few attributes, e.g. the default character set and collation. And that usage of GRANT makes it convenient to control access..