• Post Reply Bookmark Topic Watch Topic
  • New Topic

SQL and EJB-QL  RSS feed

 
Gayan Balasooriya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone explain me the performance difference
between standard SQL and EJB-QL.
Gayan Balasooriya
Sun Certified Java Programmer
Sun Certified Web Component Developer for J2EE
 
Rick Hightower
Author
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can you explain the performance difference
between standard SQL and EJB-QL.

I find code that get's generated from EJB QL can be really ineffecient SQL/JDBC code. But....
Most app servers will cache the entity beans so you don't hit the DB everytime you hit the site. We found that EJB CMP with caching turned on improved our performance.
I think you should look into EJB CMP. It is very productive. There is a link to serveral tutorials I wrote on EJB CMP included in my signature.
 
Gayan Balasooriya
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rick for your reply.
Gayan Balasooriya
Sun Certified Java Programmer
Sun Certified Web Component Developer for J2EE
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The other major difference between EJB-QL and SQL, is that EJB-QL lacks some important features. Most noticeably is the lack of date comparisons in EJB-QL and the lack of parmeterized values within a LIKE comparison.
Both of these features are supposed to be addressed by the next version of the EJB specification which is scheduled to be finialized sometime in December.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!