Hi Shiva, I'm sorry but there is no documentation or readme available on PTF yet. Where to start depends on your mapping (bidirectional / unidirectional / bidirectional with lazy loading) and how you load your objects (query 1-side and access objects of the n-side / query n-side and access 1-side). I'll try to give you a short explanation of the files.
mysql.sql is the script to set up tables on mysql database. The data objects with relations to each other are: Department.java Equipment.java Locked.java Reason.java Service.java State.java Supplier.java Type.java The files with measurement result of different refactorings are: results-....txt OID.java is a helper class for OID loading strategy. TestAll.java executes all tests starting with TestCreate.java which creates the test data and ends with TestRemove.java which removes all the test data. To execute tests with different mappings between the data objects i needed 3 different jdo-conf files and mapping files. bi-jdo-conf.xml and bi-mapping.xml are used for test with bidirectional mapping. That means the n-side have a reference to the 1-side and also the 1-side has a reference to the n-side (ArrayList). This jdo-conf and mapping is used at TestLoadBi1toN.java and TestLoadBiNto1.java. uni-jdo-conf.xml and uni-mapping.xml are used for test with unidirectional mapping. That means the n-side have a reference to the 1-side but the 1-side has *no* reference to the n-side (ArrayList). This jdo-conf and mapping is used at TestLoadUni1toN.java and TestLoadUniNto1.java. lazy-jdo-conf.xml and lazy-mapping.xml are used for test with bidirectional mapping with lazy loading. That means the n-side have a reference to the 1-side and also the 1-side has a reference to the n-side (ArrayList). With this test the objects of the n-side are lazy fetched when accessed. This jdo-conf and mapping is used at TestLoadLazy1toN.java. The difference between the tests with postfix 1toN and Nto1 is how you access your objects. 1toN executes a query to load the objects of the 1-side and then walks through all referenced objects which is the n-side of the relation in this case. E.g. the query returns 10 A objects that each have references to 10 B objects having references to 10 C objects each, which leads to walk over 1000 C objects. Nto1 is the other direction. The objects of the n-side are loaded with a query and the code walks all the referenced objects. In above example the query returns all 1000 C objects and accesses the B object referenced by C and also the A objects referenced by B. A <1----N> B <1----N> C with 10 A objects 10 x 10 B objects 10 x 10 x 10 C objects The names of the test methods inside of the test classes are: testReadWriteEmpty load objects with access mode 'ReadWrite' by standard OQL query, cache is empty when test begins. testReadWriteCached load objects with access mode 'ReadWrite' by standard OQL query, cache contains all objects that are queried, loaded or accessed duringt the test. testReadWriteOidEmpty load objects with access mode 'ReadWrite' by OID loading strategy, cache is empty when test begins. testReadWriteOidCached load objects with access mode 'ReadWrite' by OID loading strategy, cache contains all objects that are queried, loaded or accessed duringt the test. testReadOnlyEmpty load objects with access mode 'ReadOnly' by standard OQL query, cache is empty when test begins. testReadOnlyCached load objects with access mode 'ReadOnly' by standard OQL query, cache contains all objects that are queried, loaded or accessed duringt the test. testReadOnlyOidEmpty load objects with access mode 'ReadOnly' by OID loading strategy, cache is empty when test begins. testReadOnlyOidCached load objects with access mode 'ReadOnly' by OID loading strategy, cache contains all objects that are queried, loaded or accessed duringt the test. testReadOnlyOidOnly only execute the query to load OID but do not access any object. Having said that the queries that need to be executed for the OID loading strategy are passthrough SQL statements. Hope that helps Ralf Castor JDO, committer Shiva P. Kodityala schrieb: > Thank you, Ralf. I am going through those classes. There are number of Test* > classes > > Could you pls let me know which classes/mapping.xml/database.xml to follow. > Any readme files that would be helpful? > > Thanks > Shiva > > > > -----Original Message----- > From: Ralf Joachim [mailto:[EMAIL PROTECTED] > Sent: Friday, December 09, 2005 10:00 AM > To: [email protected] > Subject: Re: [castor-user] Query Performance > > > Hi Shiva, > > I suggest you to have a look at our performance test framework (PTF) > under src/tests/ptf/jdo. PTF demonstrats different access situations and > loading strategies on a tree of objects with 1:n relations. Especially > you may want to look for the strategy I call OID loading as this can > improve your load performance by a factor of 10 depending on your object > hierarchy. > > Having said that PTF is only included in the source distribution of > castor and is configured to run against a mysql database. The result of > some runs of PTF on a 2GHz PC with different refactorings are also > included. For the latest results have a look at: > src/tests/ptf/jdo/rel1toN/results-tx-poly.txt. > > Regards > Ralf > Castor JDO, committer > > Shiva P. Kodityala schrieb: > >>Yes, I read that. >> >>I have little complex mapping: >> >>TableAClass has some fields and array of TableBClass objects; TableBClass has >>some fields and array of TableCClass objects. >> >>Trying to query TableAClass objects (Indirectly getting TableBClass and >>TableCClass objects underneath). >> >>I don't know whether I am doing lazy loading or something. How do I set it? >> >>Thanks >> >> >> >> >> >> >>-----Original Message----- >>From: Werner Guttmann [mailto:[EMAIL PROTECTED] >>Sent: Friday, December 09, 2005 8:51 AM >>To: [email protected] >>Subject: RE: [castor-user] Query Performance >> >> >>In general, can I assume that you have read >> >>http://castor.codehaus.org/jdo-best-practice.html >> >>In particular, what kind of relationships to you use ? Are you using >>lazy loading ? Etc. >> >>Werner >> >> >> >>wg> -----Original Message----- >>wg> From: Shiva P. Kodityala [mailto:[EMAIL PROTECTED] >>wg> Sent: Friday, December 09, 2005 5:39 PM >>wg> To: [email protected] >>wg> Subject: [castor-user] Query Performance >>wg> >>wg> >>wg> A query results in tens of thousands of rows. How should I >>wg> improve the performance? Making use of constant >>wg> Database.ReadOnly; Using castor release 0.9.9. Is there >>wg> any way to fetch results in bulk instead of one row by another? >>wg> >>wg> Thanks >>wg> >>wg> ------------------------------------------------- >>wg> If you wish to unsubscribe from this list, please send an >>wg> empty message to the following address: >>wg> >>wg> [EMAIL PROTECTED] >>wg> ------------------------------------------------- >>wg> >>wg> >> >>------------------------------------------------- >>If you wish to unsubscribe from this list, please >>send an empty message to the following address: >> >>[EMAIL PROTECTED] >>------------------------------------------------- >> >> >>------------------------------------------------- >>If you wish to unsubscribe from this list, please >>send an empty message to the following address: >> >>[EMAIL PROTECTED] >>------------------------------------------------- > > -- Syscon Ingenieurbüro für Meß- und Datentechnik GmbH Ralf Joachim Raiffeisenstraße 11 D-72127 Kusterdingen Germany Tel. +49 7071 3690 52 Mobil: +49 173 9630135 Fax +49 7071 3690 98 Email: [EMAIL PROTECTED] Web: www.syscon-world.de ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

