Try use the 2 query approach as described below rather than recursively query the sub(sub) - categories. querying recursively is a performance killer espessially when insrels are involved. We speeded up our app's initialisation drastically (from 10 secs to 0.2) when we changed our code to the two query approach although intuitively one would prefer the more elegant recursive approach.


Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Edwin van der Elst
Verzonden: woensdag 30 juni 2004 15:00
Aan: '[EMAIL PROTECTED]'
Onderwerp: RE: object tree query

Hi,
 
We did this type of queries for a menu definition (with sub-sub-sub-menu;s etc.).
 
Datamodel: menu with a relation to itself for the 'parent' relation.
 
2 Queries: 1 for all menu's, 1 for all the relations of our type (a subclass of Posrel).
The creation of the tree was done in memory (it resulted in a javax.swing.Treemodel like structure).
 
All our code worked on the cloud interface.
 
Regards,
 

Edwin van der Elst
Finalist IT Group 

 -----Oorspronkelijk bericht-----
Van: Paul van Beukering [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 30 juni 2004 14:50
Aan: [EMAIL PROTECTED]
Onderwerp: object tree query

Imagine, I  have defined an objecttypes products and categories.
Products are grouped in categories, these categories can have subcategories...etc, recursive.
Is there a way to query an objecttree like this in a single call, or do I have to query for subcategories for every category I find?
 
Thanks in advance, Paul


-----------------------Disclaimer-------------------------
Dit bericht (met bijlagen) is met grote zorgvuldigheid samengesteld. Voor mogelijke onjuistheid en/of onvolledigheid van de hierin verstrekte informatie kan Kennisnet geen aansprakelijkheid aanvaarden, evenmin kunnen aan de inhoud van dit bericht (met bijlagen) rechten worden ontleend. De inhoud van dit bericht (met bijlagen) kan vertrouwelijke informatie bevatten en is uitsluitend bestemd voor de geadresseerde van dit bericht. Indien u niet de beoogde ontvanger van dit bericht bent, verzoekt Kennisnet u dit bericht te verwijderen, eventuele bijlagen niet te openen en wijst Kennisnet u op de onrechtmatigheid van het gebruiken, kopiëren of verspreiden van de inhoud van dit bericht (met bijlagen).

This message (with attachments) is given in good faith. Kennisnet cannot assume any responsibility for the accuracy or reliability of the information contained in this message (with attachments), nor shall the information be construed as constituting any obligation on the part of Kennisnet. The information contained in this message (with attachments) may be confidential or privileged and is only intended for the use of the named addressee. If you are not the intended recipient, you are requested by Kennisnet to delete this message (with attachments) without opening it and you are notified by Kennisnet that any disclosure, copying or distribution of the information contained in this message (with attachments) is strictly prohibited and unlawful.
----------------------------------------------------------

Reply via email to