setShouldBindAllParameters performance issue [message #483278] |
Mon, 31 August 2009 20:43  |
Eclipse User |
|
|
|
We recently upgraded to EclipseLink from TopLink and noticed a huge
performance drop on MSSQL Server. Our automated test suite went from
taking
8 minutes to about 25 minutes. Oracle and MySQL didn't seem to have the
same problem. We aren't currently running our application with
bindAllParameters set to true because of a performance problem we
documented
in the following forum post.
http://forums.oracle.com/forums/thread.jspa?messageID=247136 9
On a hunch, I turned bindAllParameters to true, and reran the test suite.
The MSSQL Server performance was back down to 8 minutes or so. I expect
parameterized statements to be faster in general, but I'm a little hesitant
to turn them back on in our production environment given the trouble we had
with the above problem. Also, I'm wondering why would EclipseLink
performance on non-parameterized statements be so much worse? Does anyone
have any input here? If there was a bug fix for the performance problem,
I'm hoping someone here would know.
|
|
|
Re: setShouldBindAllParameters performance issue [message #483495 is a reply to message #483278] |
Tue, 01 September 2009 17:46  |
Eclipse User |
|
|
|
Parameter binding is a database optimization, it generally allows the
usage of statement caching and avoid the database having to re-parse every
SQL statement. The performance loss or gains probably has little to do
with EclipseLink, but with your database. Normally you use parameter
binding in combination with statement caching to avoid the cost of
creating statements entirely, you can also enable statement caching in
EclipseLink if using EclipseLink connection pooling, otherwise you must
enable statement caching in your server's DataSource configuration.
Parameter binding is recommended.
|
|
|
Powered by
FUDForum. Page generated in 0.03797 seconds