最新回答 / greenYe
我用的是windows,語句是這樣的?set global slow_query_log_file='C:\\Program Files\\MySoft\\mysql-5.6.38-winx64\\data\\slow_query.log';? ?如果是linux,,,可以嘗試下?set global slow_query_log_file='/xxx/xxx/xxx.log'
2018-12-18
已采納回答 / K8sCat
select count(time_column) from your_table group by year(from_unixtime(time_column))或者by month(from_unixtime(time_column))或者dayofyear(from_unixtime(time_column))from_unixtime: 時間戳轉(zhuǎn)時間unix_timestamp: 時間轉(zhuǎn)時間戳
2018-11-16
最贊回答 / 慕粉4057600
using index是有條件的,需要你說查詢的的列與order by 之后的列具有相同的索引才行。例如??select release_year from film order by title;要使用using index,需要?給 release_year和title字段建立相同的索引
2018-09-07