ERXFetchSpecification poolFetch = new ERXFetchSpecification(_Pool.ENTITY_NAME, poolQual, null);
NSArray <String> keyPaths = new NSArray(new String[] {Pool.ENTRIES_KEY ,
Pool.ENTRIES_KEY + "." + Entry.COMBO_TEAMS_KEY,
Pool.ENTRIES_KEY + "." + Entry.COMBO_TEAMS_KEY + "." + ComboTeam.TEAM_POPUPS_KEY,
Pool.ENTRIES_KEY + "." + Entry.ENTRY_SCORE_KEY,
Pool.ENTRIES_KEY + "." + Entry.ENTRY_ADMIN_KEY,
Pool.ENTRIES_KEY + "." + Entry.PLACE_INFOS_KEY});
poolFetch.setPrefetchingRelationshipKeyPaths(keyPaths);
poolFetch.setRefreshesRefetchedObjects(false);
Pool pool = (Pool) ec.objectsWithFetchSpecification(poolFetch).lastObject();
A typical fetch might involve the following number of rows:
1 Pool---100>>Entry----63>>ComboTeams----2>>TeamPopups
Entry----1>EntryScore
Entry----1>EntryAdmin
Note that this is run on a brand new EO and OBS stack, so I set refreshesRefetchedObjects to false. One other phenomenon I've noticed is that running two instances of my app also tends to kill performance. I do have -WOAllowsConcurrentRequestHandling YES set in the javamonitor config.