Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » setShouldBindAllParameters performance issue
setShouldBindAllParameters performance issue [message #483278] Mon, 31 August 2009 16:43 Go to next message
Sean Stephenson is currently offline Sean Stephenson
Messages: 1
Registered: July 2009
Junior Member
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 13:46 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

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.


James : Wiki : Book : Blog : Twitter
Previous Topic:Eclipselink queries on DB2
Next Topic:Equinox weaving configuration - Clasloading issue
Goto Forum:
  


Current Time: Sat Apr 19 16:06:45 EDT 2014

Powered by FUDForum. Page generated in 0.02842 seconds