sql_optmize

optimize some sql && add index to reduce query time