项目中一条SQL语句有严重的性能问题: SELECT role_goods.id,role_goods.number,roleId,role.`name` ,goods.`name` as '物品名称' from role_goods LEFT JOIN role on role.id =role_goods.roleId LEFT JOIN goods on good...(more)
一、问题现象: 连接池中的链接空闲超过一定时间后,再次访问数据库时候出现如下异常: com.mysql.jdbc.Communication***ception: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException&n...(more)
今天再复习DB2考试认证的时候发现了一条语句:delete from tablename where 1=1;在这之前没有遇到过where 1=1 语法,于是百度了一下,下面供以后复习和学习交流:where 1=1有什么用?在SQL语言中,写这么一句话就跟没写一样。select * from table1 where 1=1与select * from ta...(more)
select t.*, t.rowid from psecurity t where (t.suser,t.iobject,t.ipermission)
in (select suser,iobject,ipermission from psecurity group by suser,iobject,ipermission having count(*)>1)
-- 检查当前剩余空间
SELECT F.TABLESPACE_NAME,
...(more)