MySQL 在 WHERE 使用 SubQuery 會拖慢速度

盡量避免 WHERE IN 使用到大量的值來籂選資料


  1. 先將 WHERE IN 的值存成 tmp_wehre_in_table
  2. 在將籂出來的欄位另存一個新表 ex: tmp_main_table
  3. 使用 tmp_where_in_table LEFT JOIN tmp_main_table 產生新的表 tmp_new_main_table
這樣會加速資料存取的速度.
事成後在將這些表刪掉.

Nginx Deny

Allow 一次只能設定一組IP, 不能像 Apache 設定多組 IP
最後設定 Deny All;

location \
{
    allow 127.0.0.1;
    allow 192.168.1.1;
    deny all;
}

CentOS Nginx SSL chain pass password

使用 openssl 解開 SSL

openssl -in ssl.key -out pass-ssl.key