由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - java.lang.OutOfMemoryError: Java heap space in DB query
相关主题
Java GC 为什么不能自动释放jdbc connection?Spring Library Bug?
java后端开发hibernate一个国际化保存unicode value的问题
How to get all tables in a schema in Oracle 9i using its JDBC driver?谁给推荐一个简单的ORM吧
紧急求助: java OutOfMemoryErrorhibernate能不能orm没有主键的表格
Question: OutOfMemoryError when drawImag一大堆Java的 web app framework,学那个最有用啊
Re: Question: OutOfMemoryError when drawspring到底有什么好处?
Wrap up -Re: Question: OutOfMemoryError一个读log以后的问题 spring + hibernate
OutofMemoryError: Java Heap Space做topcoder上的设计挑战题学Java是不是个好方式?
相关话题的讨论汇总
话题: where话题: select话题: 1234话题: refenence
进入Java版参与讨论
1 (共1页)
l*****b
发帖数: 82
1
I use Spring JdbcTemplate to do the following query and use RowMapper to get
the ResultSet. However, the Jboss server generate java.lang.
OutOfMemoryError some time.
SELECT *
FROM transactions
WHERE transaction_id = (SELECT refenence_tran_id FROM transactions WHERE
transaction_id = '1234')
or transaction_id = (SELECT original_transaction_id FROM transactions WHERE
transaction_id = '1234')
or original_transaction_id = '1234' or refenence_tran_id = '1234' order by
transaction_id
Notes:
1. The tabl
l*****b
发帖数: 82
2
The whole error log is:
INFO [org.springframework.jdbc.support.SQLErrorCodesFactory] SQLErrorCodes
loaded: [DB2, HSQL, MS-SQL, MySQL, Oracle, Informix, PostgreSQL, Sybase]
ERROR [STDERR] com.active.dao.DAOException: An exception occurred during
database access: PreparedStatementCallback; uncategorized SQLException for
SQL [SELECT * FROM transactions WHERE transaction_id = (SELECT refenence_
tran_id FROM transactions WHERE transaction_id = ?) or transaction_id = (
SELECT original_transaction_id F
g*****g
发帖数: 34805
3
try specify -Xms -Xmx when you start jboss.

get
WHERE

【在 l*****b 的大作中提到】
: I use Spring JdbcTemplate to do the following query and use RowMapper to get
: the ResultSet. However, the Jboss server generate java.lang.
: OutOfMemoryError some time.
: SELECT *
: FROM transactions
: WHERE transaction_id = (SELECT refenence_tran_id FROM transactions WHERE
: transaction_id = '1234')
: or transaction_id = (SELECT original_transaction_id FROM transactions WHERE
: transaction_id = '1234')
: or original_transaction_id = '1234' or refenence_tran_id = '1234' order by

l*****b
发帖数: 82
4
The config values are
-server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.
dgc.server.gcInterval=3600000
Thanks, goodbug
A**o
发帖数: 1550
5
time for a profiler

rmi.

【在 l*****b 的大作中提到】
: The config values are
: -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.
: dgc.server.gcInterval=3600000
: Thanks, goodbug

b******y
发帖数: 1684
6
这个SQL好像有脱裤子放P之嫌啊?
难道不可以优化一下吗?
SELECT *
FROM transactions
WHERE transaction_id = (SELECT refenence_tran_id FROM transactions WHERE
transaction_id = '1234')
or transaction_id = (SELECT original_transaction_id FROM transactions WHERE
transaction_id = '1234')
or original_transaction_id = '1234' or refenence_tran_id = '1234' order by
transaction_id
==
SELECT *
FROM transactions
WHERE original_transaction_id = '1234' or refenence_tran_id = '1234' order
by
transaction_id

get
WHERE

【在 l*****b 的大作中提到】
: I use Spring JdbcTemplate to do the following query and use RowMapper to get
: the ResultSet. However, the Jboss server generate java.lang.
: OutOfMemoryError some time.
: SELECT *
: FROM transactions
: WHERE transaction_id = (SELECT refenence_tran_id FROM transactions WHERE
: transaction_id = '1234')
: or transaction_id = (SELECT original_transaction_id FROM transactions WHERE
: transaction_id = '1234')
: or original_transaction_id = '1234' or refenence_tran_id = '1234' order by

m******t
发帖数: 2416
7
Your version wouldn't pick up the second row below:
reference_tran_id transaction_id
5555 1234
9898 5555

WHERE

【在 b******y 的大作中提到】
: 这个SQL好像有脱裤子放P之嫌啊?
: 难道不可以优化一下吗?
: SELECT *
: FROM transactions
: WHERE transaction_id = (SELECT refenence_tran_id FROM transactions WHERE
: transaction_id = '1234')
: or transaction_id = (SELECT original_transaction_id FROM transactions WHERE
: transaction_id = '1234')
: or original_transaction_id = '1234' or refenence_tran_id = '1234' order by
: transaction_id

1 (共1页)
进入Java版参与讨论
相关主题
做topcoder上的设计挑战题学Java是不是个好方式?Question: OutOfMemoryError when drawImag
Re: 怎样才支持JDBC2.0?Re: Question: OutOfMemoryError when draw
Re: Entity EJB: anyone with real experienceWrap up -Re: Question: OutOfMemoryError
Quick jdbc question, help needed, thx!OutofMemoryError: Java Heap Space
Java GC 为什么不能自动释放jdbc connection?Spring Library Bug?
java后端开发hibernate一个国际化保存unicode value的问题
How to get all tables in a schema in Oracle 9i using its JDBC driver?谁给推荐一个简单的ORM吧
紧急求助: java OutOfMemoryErrorhibernate能不能orm没有主键的表格
相关话题的讨论汇总
话题: where话题: select话题: 1234话题: refenence