e-凯发k8国际

`
文章列表
错误信息:   org.springframework.dao.cannotacquirelockexception: ### error updating database. cause: com.mysql.cj.jdbc.exceptions.mysqltransactionrollbackexception: lockwaittimeoutexceeded; try restarting transaction   原因:表的某条记录更增操作可能在另外一个大的事务里被锁,锁的时间超过了数据库指定时间(如下图:innodb_lock_wait_timeout=10秒),导致此处 ...
unsupported conversion from date to java.lang.long   正解:date类型换成localdatetime 误解:去掉@builder标签
 mysql 读写分离 1. 引入包 com.baomidou dynamic-datasource-spring-boot-starter 3.5.1 mysql ...
ql语句报错问题 #1055 - expression #3 of select list is not in group by clause and contains nonaggregated column ‘cash.sdb_login_log.id‘ which is not functionally dependent on columns in group by clause; this is incompatible with sql_mode=only_full_group_by ###   官方文档的解决方法 https://dev.mysql.com/doc/re ...
  • 2017-11-22 14:15
  • 浏览 2143
  • 分类:数据库
当执行事务时,相当于执行了锁,来保持数据的一致性,但是锁分多种,有行锁,表锁。行锁就是只锁定那一行,那一条记录,别的连接下的操作还可以操作这张表。表锁就是锁定整张表,只有当前连接执行完事务,才可以解锁。   就效率而然,当然是行锁好,适用与多线程和高并发的情况,不过行锁对数据库会带来额外的开销。表锁高并发就差一点了,但单个的话快一点。   以mysql为例,有索引并且使用了该索引当条件的时候就是行锁,没有索引的时候就是表锁。innodb 的行锁是在有索引的情况下,没有索引的表是锁定全表的.   锁是对于别的连接来说,不是对于当前连接,即当前连可以一直不加rollback,commi ...
  • 2017-09-08 16:11
  • 浏览 901
  • 分类:数据库
产品智能推介。找匹配度最高的记录。   select *   from(select id,org_id,sum(   (case when instr(product_type,'2')>0 then 1 else 0 end)   (case when interest>5 and interest<11 then 1 else 0 end)   (case when 2000 between amount_low and amount_high then 1 else 0 end)   )   as cnt from hideseek.orgpro ...
  • 2016-11-10 10:49
  • 浏览 324
  • 分类:数据库
select * from session where createtime >= now()-interval 3 day;  
  • 2016-10-19 15:13
  • 浏览 2206
  • 分类:数据库
global site tag (gtag.js) - google analytics
网站地图