Authored by Lixiaodi

指定索引

... ... @@ -37,7 +37,7 @@
</update>
<select id="selectTypeCount" resultType="java.lang.Integer">
SELECT count(1) count FROM ${tableName} force index (`read`) WHERE uid = #{uid}
SELECT count(1) count FROM ${tableName} force index (`uid`) WHERE uid = #{uid}
and is_read = #{isRead} and is_del = #{isDel} AND type = #{type}
<if test="time != 0 and isRead ='N'">
and create_time &gt;= #{time}
... ...