随笔分类 -  sql mybatis mysql

摘要:背景 :快速的update 后select 使用 LambadQueryWrapper 一會16條 一會 10條 判斷 很可能是這種查詢使用了二級緩存導致 直接在dao中使用 @Select("select * from XXX") 跳過二級緩存 阅读全文
posted @ 2025-03-04 09:51 清明雨下 阅读(2) 评论(1) 推荐(0) 编辑
摘要:@Mapperpublic interface StatusDao extends BaseMapper<StatusEntity> { @Update("<script> update status set" + " current_status = #{currentStatus},update 阅读全文
posted @ 2022-08-12 14:17 清明雨下 阅读(1345) 评论(0) 推荐(0) 编辑
摘要:jdbc url加rewriteBatchedStatement=true 这样直接使用一个preparedStatement去执行 insert del update ;不然会拆成多个单个preaparedStatement去执行,所以性能会低 https://blog.csdn.net/lh15 阅读全文
posted @ 2021-12-07 11:01 清明雨下 阅读(142) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示