[Modeling-users] Problem with modeling efficency
Status: Abandoned
Brought to you by:
sbigaret
From: <luk...@po...> - 2003-11-25 12:06:30
|
Hi I have some questions about modeling efficency. Lets consider the followi= ng example: Model: (mother lives in one province, in one province lives many mothers) |------------| |--------------| | Mothers | | Province | |------------|* 1|--------------| | MothersId |-----------| ProvinceId | | BirthDate | | Name | | ProvinceId | | | |------------| |--------------| and python code (my orginal code translated from Polish to English:-): EC=3DEditingContext() mothers=3DEC.fetch('Mothers') for mother in mothers: id=3Dmother.getMothersId() date=3Dmother.getBirthDate() # efficency problematic code province=3Dmother.gettoProvince().getName() According to the manual everything is all right, and so it works. But... = in database there is over 100 records. When I'm fetching the hole databse an= d get only Id and BirthDate it takes 0.0 seconds - good. But when I try to = get the name of the province by toProvince realtion it takes about 0,5 sec fo= r each row! So presenting this small database takes about minute. 1. Am I doing something wrong or this slow working is the feature of Modeling Framework? 2. Is there any explanation for this or another way to get this data but much faster? **************************** * =A3ukasz =A3akomy * luk...@po... **************************** |