优先查询某字段不为空数据
//优先查询image不为空字段,之后根据时间排序
SELECT * from test ORDER BY IF(ISNULL(image),1,0),time DESC
连接数
show variables like 'max_connections'
set GLOBAL max_connections=500
空闲;连接存活时长(秒)
show global variables like 'wait_timeout';
set global wait_timeout=100