Re: Joins with WebObjects
Re: Joins with WebObjects
- Subject: Re: Joins with WebObjects
- From: email@hidden
- Date: Sat, 19 Mar 2005 14:36:26 +0100
Hi Guido,
i don't think your problem is with
> ((f."name" like 'Physiotherapeuten') and
> (d.plz like '45257' and d.aktiv = 1)) and
> (d.id = df.id2 and f.id = df.id1);
or
> ((f."name" like 'Physiotherapeuten') and
> (d.plz like '45257' and d.aktiv = 1)) ;
they are similar. your problem is somewhere else.
peaSe.
Sako.
----- Original Message -----
From: "Guido Neitzer" <email@hidden>
To: "WebObjects Dev" <email@hidden>; "WebObjects Dev
(Apple)" <email@hidden>
Sent: Saturday, March 19, 2005 1:55 PM
Subject: Joins with WebObjects
> Hi.
>
> I have a problem with creating a query from WebObjects - it's just
slooooow.
>
> The involved tables (entities) are:
>
> - a company (d)
> - a service (f)
> - a n:m join table between the d and f (df)
>
> How can I create a qualifier with WebObjects that does a real join on the
> tables?
>
> When I just build some qualifiers with and tie them together with an
> EOAndQualifier, the select takes about 3 to 4 seconds. When I use
"handmade"
> SQL to join d and df on primary key and foreign key it takes about 0.11
sek.
> to return the same result.
>
> Here's what I mean. WebObjects does something similar to this (I have made
> experiments with the selects in FrontBaseManager, here is only the
> "excerpt"):
>
> select d.plz, d.nachname, d.vorname, f."name" from
> DGA_DIENSTLEISTER d, DGA_DIENSTLEISTER_FACHRICHTUNG f,
> DGA_DIENSTLEISTER_ZU_FACHRICHTUNG df
> where
> ((f."name" like 'Physiotherapeuten') and
> (d.plz like '45257' and d.aktiv = 1)) and
> (d.id = df.id2 and f.id = df.id1);
>
> This takes up to 4 seconds.
>
> If I do this:
>
> select d.plz, d.nachname, d.vorname, f."name" from
> DGA_DIENSTLEISTER d join DGA_DIENSTLEISTER_ZU_FACHRICHTUNG z
> on d.id = z.id2,
> DGA_DIENSTLEISTER_FACHRICHTUNG f
> where
> ((f."name" like 'Physiotherapeuten') and
> (d.plz like '45257' and d.aktiv = 1)) ;
>
> it takes about 0.11 seconds.
>
> Is there a way to tell WebObjects how to create a "better" query?
>
> cug
>
>
>
> --
> Cocoa Seminar with Aaron Hillegass in Germany
> http://www.dreamteam-events.com
>
>
> _______________________________________________
> 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
>
>
_______________________________________________
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