optimizing qualifier / query
optimizing qualifier / query
- Subject: optimizing qualifier / query
- From: Jean-Francois Veillette <email@hidden>
- Date: Fri, 21 Aug 2009 09:46:53 -0400
I have a text field that have the binding : value = reclamationDG.queryMatch.agentImmobiliers.agent.nomPrenom;
The user want to filter a display group. The initial object are of Reclamation class. The graph is as follow: Reclamation -->> agentImmobiliers --> Agent . nomPrenom There are 3 problems with this: 1- Reclamation -->> agentImmobiliers is a to-many 2- agentImmobiliers --> Agent is a fake relation, not based on primary key. It's a method that query based on the latest (based on the max snapshot date) Agent for an identifier key also kept in the agentImmobilier object. 3- nomPrenom is a method that return the concatenation of both firstName and lastName.
The only way I was able to speed it up is to pre-fetch the relation agentImmobiliers --> Agent. It does work great ... most of the time. But sometimes, (I guess when eos get too old due to fetch timestamp) they need to be refreshed and things just start to get bad.
Do you have any recommandation for me ? Ideally I would like to avoid doing the prefetch of agentImmobiliers --> Agent and have a single query to the db ... one can dream :-)
note: - WO 5.3 (latest), - MicrosoftSQL Server, - reclamation table is juste over 1k big, - reclamation -->> agentImmobiliers list contain an average of 2 or 3 objects, some will have more (max 5 I would say), this is not growing, - agentImmobiliers -->> Agent list (based on the identifier key) will contain an average of 30 objects, this will grow as time goes, - Wonder (latest of the 5.3 branch I think, not updated for a while, maybe a bit old by now),
- jfv
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden