Hi,
 
        I've been working on a project which involves quite a sizeable number of tables. There also some set of mappings between the tables. I'm providing the mapping.xml for the db.
 
The problem is when i try to obtain some (approx 2000) records. It takes around a minute to get the complete details, while retrieving the same recordset using JDBC requires less than 10 seconds. Is there any way to improve the performance.
 
The db is Oracle.
 
 
Here is the mapping file
 
<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
                           "http://castor.exolab.org/mapping.dtd">
<mapping>
 
<!--  Mapping for Job -->
 <class name="com.softex.overseerjdo.joballoc.Job" identity="id"  key-generator="MAX">
  <description>Job</description>
  <map-to table="job" xml="Job" />
   <field name="id" type="integer" >
    <sql name="JOB_ID" type="integer"/>
    <xml name="Job id" node="attribute"/>
   </field>
   <field name="name" type="string" >
    <sql name="JOB_NAME" type="char"/>
    <xml name="Job Name" node="attribute"/>
   </field>
   <field name="audiofileid" type="integer">
    <sql name="AUDIOFILE_ID" type="integer"/>
    <xml name="Aud ID" node="attribute" />
   </field>
   <field name="creationtime" type="date" >
    <sql name="CREATION_TIME" type="date"/>
    <xml name="CREATION_TIME" node="element"/>
   </field>
   <field name="inputcomments" type="string">
    <sql name="INPUT_COMMENTS" type="char" dirty="check" />
    <xml node="attribute" />
   </field>
   <field name="generalcomments" type="string">
    <sql name="GENERAL_COMMENTS" type="char" dirty="check" />
    <xml node="attribute" />
   </field>
   <field name="allocationcomments" type="string">
    <sql name="ALLOCATION_COMMENTS" type="char" dirty="check" />
    <xml node="attribute" />
   </field>
   <field name="stage" type="com.softex.overseerjdo.joballoc.Stage" >
    <sql name="STAGE_ID"/>
    <xml node="element"/>
   </field>
   <field name="status" type="com.softex.overseerjdo.joballoc.Status" >
    <sql name="STATUS_ID" />
    <xml node="element"/>
   </field>
   <field name="audiofile" type="com.softex.overseerjdo.joballoc.AudioFile">
    <sql name="AUDIOFILE_ID"  dirty="check" />
    <xml node="attribute" />
   </field>
 </class>
 
<!--  Mapping for JobDetails -->
 <class name="com.softex.overseerjdo.joballoc.JobDetails" identity="jobdetailid"  key-generator="MAX" access="read-only">
  <description>Job Details</description>
  <map-to table="jobdetails" xml="group" />
   <field name="jobdetailid" type="long" >
    <sql name="JOBDETAILS_ID" type="integer"/>
    <xml node="attribute"/>
   </field>
   <field name="tat" type="integer" >
    <sql name="TAT" type="integer"/>
    <xml node="attribute"/>
   </field>
   <field name="priority" type="integer">
    <sql name="PRIORITY" type="integer" dirty="check" />
    <xml node="attribute" />
   </field>
   <field name="job" type="com.softex.overseerjdo.joballoc.Job" >
    <sql name="JOB_ID" dirty="check" />
    <xml node="attribute" />
   </field>
   <field name="client" type="com.softex.overseerjdo.joballoc.Client">
    <sql name="CLIENT_ID" dirty="check" />
    <xml node="attribute" />
   </field>
 </class>
 

 
<!--  Mapping for Client -->
 <class name="com.softex.overseerjdo.joballoc.Client" identity="id" key-generator="MAX">
  <description>Client</description>
  <map-to table="client" xml="group" />
   <field name="id" type="integer" >
    <sql name="CLIENT_ID" type="integer"/>
    <xml node="attribute"/>
   </field>
   <field name="name" type="string" >
    <sql name="CLIENT_NAME" type="char"/>
    <xml node="attribute"/>
   </field>
   <field name="code" type="string" >
    <sql name="CLIENT_CODE" type="char"/>
    <xml node="attribute"/>
   </field>
 
 </class>
 
If i retrieve values only from the JobDetails tables,its ok.but if also include the Job table it crawls/
 
Any help regarding this matter would be appreciated,
 
Thanks
Arun
 
 

Reply via email to