• 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Partitioning in Hibernate

 
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Hibernate with Spring and have come across this strange problem.

There is a table A which was not partitioned before.

However to optimize certain queries, it was partitioned on one of the columns.

With this change, other queries which do not use the partitioning on the view over the table seem to become slow...

The strange part is that these queries which do not use the partitioning columns seem to be slow only when executed from Hibernate and seem to be very fast when executed from a SQL client like SQLPlus or TOAD.

Is it expected? What can be done to avoid it?

Rahul
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Partitioning should make no difference - Hibernate will know nothing about it. Turn on show sql and get an explain plan for the slow query. That might give you a clue.
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, i did and the strange part as i mentioned before is that the query seemed to take quite a long time to execute when Hibernate was doing it but the oracle client like TOAD gave instantaneous results.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So presumably its not the query and partitioning is a red herring? If you are sure of that, and you explain plan backs this up, you need to profile your application and see what it is doing with the results of this query.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic