Skip to content
LowyCCN edited this page Apr 2, 2021 · 24 revisions

Management

Tuning

Innodb

  • Check tuning point using mysqltuner
    • You can tune easy by suggestion on mysqltuner
$ wget https://github.com/major/MySQLTuner-perl/zipball/master
$ unzip master
$ cd master
$ ./mysqltuner.pl
-- Configuration
SHOW VARIABLES LIKE '%query_cache%';

-- Usages
SHOW STATUS LIKE 'Qcache%';

Information

Trouble shooting

Useful SQL

  • Update join
UPDATE users a
LEFT JOIN userlog b
ON a.userid = b.userid
SET a.point = a.point + 100
WHERE b.loginstatus = 1;
  • insert select on duplicate key update
    • it have to make primary key. Compare with TABLEA and TABLEB by primary key.
insert into TABLEA (FIELDA01, FIELDA02)
select FIELDB01, FIELDB02
from TABLEB
where FIELDB03 = 'formerge'
on duplicate key update FIELDA02 = FIELDB04

Functions

Shell

Translate this page?

Data(DBMS, NoSQL)

Development

Tools

Management

OS

Hardware

Business

Hobby

Lifestyle

Giip(RPA Engine)

Clone this wiki locally