ibatiS 查询数据量大 出现内存不足
系统内存不足。请对大型 ResultSet 使用服务器端游标: Java heap space。ResultSet 大小:21,751,046。JVM 总内存大小:66,650,112。; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
xml 源码
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="schoolstyle">
<typeAlias alias="schoolstyle" type="com.gxedu.resource.schoolstyle.Schoolstyle" />
<!--
===================================================select==========================================
-->
<select id="getSchoolstyleBynews" parameterClass="Schoolstyle" resultClass="Schoolstyle">
select * from informations
<dynamic prepend="where">
<isNotNull prepend="and" property="parts_ids">
parts_ids like '%$parts_ids$%'
</isNotNull>
<isNotNull prepend="and" property="channel_id">
channel_id=#channel_id#
</isNotNull>
<isNotNull prepend="and" property="status">
status=#status#
</isNotNull>
<isNotNull prepend="and" property="is_instant_flash">
is_instant_flash=#is_instant_flash#
</isNotNull>
</dynamic>
</select>
</sqlMap>
如何解决,望各位高手指点!最好能举个例子
--- The error occurred while applying a parameter map.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
xml 源码
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="schoolstyle">
<typeAlias alias="schoolstyle" type="com.gxedu.resource.schoolstyle.Schoolstyle" />
<!--
===================================================select==========================================
-->
<select id="getSchoolstyleBynews" parameterClass="Schoolstyle" resultClass="Schoolstyle">
select * from informations
<dynamic prepend="where">
<isNotNull prepend="and" property="parts_ids">
parts_ids like '%$parts_ids$%'
</isNotNull>
<isNotNull prepend="and" property="channel_id">
channel_id=#channel_id#
</isNotNull>
<isNotNull prepend="and" property="status">
status=#status#
</isNotNull>
<isNotNull prepend="and" property="is_instant_flash">
is_instant_flash=#is_instant_flash#
</isNotNull>
</dynamic>
</select>
</sqlMap>
如何解决,望各位高手指点!最好能举个例子
...全文
相关推荐
主子表查询ibatis
使用ibatis配置的主子表关联查询的实例,一对多关系,在控制台打印,有log4j的使用,打印结果详细,(码云同步)
iBatis条件查询
iBatis做的按条件查询,没关联其他表,内带Mysql,适用于小型项目,hibernate是全自动化,如有朋友想学习下半自动化持久层框架,那就来下载这个看看吧。。
ibatis应对批量update
最近遇到需要批量update数据的问题,一开始用了一个for循环去update,数据量大的时候效率很低。原因是for循环每次update一条语句,都是一次连接过程。遇到大批数据更新的时候,效率就可想而知了。在google上找了一遍,发现ibatis里有对批量update的支持,挺好的东西。
ibatis 文档查询
ibatis in action的文档,详细介绍ibatis的查询等
ibatis的动态查询
这个文件中包含了许多ibatis的查询语句,能够让你很清楚的知道,如何实现动态的查询。


高性能WEB开发
