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
|