• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

POJOs in action : Performance issue

 
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, mr.Chris Richardson, can i know the performance issue between ordinary JDBC and POJOs ? thank you
[ January 25, 2006: Message edited by: Nakata kokuyo ]
 
author
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nakata,

Strictly speaking your question is really how does the performance of an ORM framework compare with JDBC.

There are several different things to consider:
1. ORM is a layer on top of JDBC so there is an overhead, which may or may not be significant.
2. ORM frameworks have sophisticated performance options such as lazy/eager loading and caching that would be quite difficult to implement yourself.
3. ORM frameworks are suited to particular patterns of database access. See here https://coderanch.com/t/216017/ORM/java/iBatis-Hibernate-same-book Having said that you can, of course, write poorly performing JDBC code.
4. An ORM framework can consistently generate efficient SQL that would be a lot of work write by hand and maintain.

The big issue is whether the database access patterns of your application are compatible with how ORM frameworks work.

Chris
 
author
Posts: 4275
34
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From a performance stand point, if you write perfect SQL, only load exactly as much data as you need, and cache exactly as much data as you'll need for later... then JDBC is superior.

The problem is that as applications and databases grow, it becomes very difficult to accomplish this writing JDBC code. Aside from basic query optimization, caching is a very important part of ORM manager. If hundreds of people are all reading the same record and no one is modifying it, why load it over and over again from the database using JDBC? The ability to manage and organize caches and data is usually beyond the scope of most application level programming especially in larger applications. So from a mantainability standpoint, as well as a long term performance view, ORM tools for databases are superior.
[ January 25, 2006: Message edited by: Scott Selikoff ]
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic