以上语句mysql执行不报错,但结果不对,只选出‘%Task%’的结果集。正确写法是:where type_desc like '%Task%' or type_desc like '%Script%'。但上述语句在hive里会直接报错。
2.Mac OS X上,启动mysql报错
[ERROR] InnoDB: Unable
to
lock ./ibdata1 error: 35
[Note] InnoDB:
Check
that you do
not
already have another mysqld process using the same InnoDB data
or
log files.
ps -ef | grep mysqld查看确实有相关mysqld存在。强行杀掉后,过一会查看ps -ef | grep mysqld,又有相关mysqld存在。
3.lb_task_ext(记录少),anyloader_job_log(记录多),lb_task(记录多)3表作inner join,且连接条件都是task_id,则把lb_task_ext作为中间连接表,执行效率会大幅提高。
4.有些表的数字列被定义为varchar类型,则需要order by cast(total_success_lines_writed as signed) desc转换为数字类型进行排序。