-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Why is it so slow? - Query table
PostPosted: Mon May 07, 2007 7:13 am 
Regular
Regular

Joined: Wed Sep 22, 2004 8:27 am
Posts: 89
Hibernate version: 3.2.2

Mapping documents:

Code:
<hibernate-mapping default-lazy="false">

    <class name="it.inform.ob.bean.GuidaUnitaOrganizzativa" table="OBTD_GPR_UNITA_ORGANIZZATIVE">
        <meta attribute="class-description">Guida processi -  Unita organizzative</meta>
       
        <composite-id name="id" class="it.inform.ob.bean.GuidaUnitaOrganizzativaPk">
           <key-property    name="cafmrcpss" column="cafmrcpss" type="string"/>
           <key-property    name="cafuog"    column="cafuog"    type="string"/>          
        </composite-id>

      <many-to-one name="uog" insert="false" update="false" class="it.inform.ob.bean.UnitaOrganizzativa" entity-name="unitaorganizzativa">
           <column name="cafuog" not-null="true" length="10"/>
      </many-to-one>


        <property name="stsval" type="string">
            <column name="stsval" length="1" sql-type="string" not-null="true"/>
        </property>
       
      <set name="ruoli" order-by=" cafrulstd ASC" table="OBTD_GPR_RUOLI_STANDARD" lazy="true" cascade="all" inverse="true">   
         <key>
            <column name="cafmrcpss"/>
            <column name="cafuog"/>
         </key>
         <one-to-many class="it.inform.ob.bean.GuidaRuolo"/>
      </set>
       
       
    </class>



Code between sessionFactory.openSession() and session.close():

session.createCriteria(GuidaUnitaOrganizzativa.class)


Full stack trace of any exception that occurs:
no exception

Name and version of the database you are using:
Oracle 9.02

The generated SQL (show_sql=true):
Normal sql query like select * from OBTD_GPR_UNITA_ORGANIZZATIVE


The oracle table contains over 1800 records and when i try to execute the query via Hibernate it takes over 5 minutes to load the list of GuidaUnitaOrganizzativa objects.

Why is it so slow? I think 1800 records aren't so much.
(Of course i could use paginate solution but i want know why it is so slow)

Thanks

[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 07, 2007 7:33 am 
Regular
Regular

Joined: Mon Mar 26, 2007 12:38 am
Posts: 119
Hi,
Here's a guess.
If session is bloated with objects, all operations around it will be slow. A full table scan is likely to do this. Change jvm settings to use greater heap size ( java -xms/x ) and see if it helps.

-----------------------------------------------------
Rate the reply if you find it helpful


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.