• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Joins with WebObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Joins with WebObjects


  • Subject: Re: Joins with WebObjects
  • From: Geoff Hopson <email@hidden>
  • Date: Sat, 19 Mar 2005 15:09:19 +0000

The queries look the same to me, but obviously they are producing different performance results.

I'm no Frontbase expert, but do they have anything like the 'explain plan' stuff in Oracle? It might be worth analysing the two queries and the effectiveness of any indexes you have on your tables.

More info on explain plan here:

http://www.evolt.org/article/Use_Oracle_s_Explain_Plan_to_Tune_Your_Queries/17/2986/

With help from that, I have managed to improve performance of several webobjects applications by either changing the order of the indexed columns in an index, or the order of the qualifiers in the EOQualifier, or a combination of the two.

Or you could always give the 'rawRowsForSQL' a spin on EOUtilities...

Geoff

Guido Neitzer wrote:
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



_______________________________________________
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


  • Follow-Ups:
    • Re: Joins with WebObjects
      • From: Guido Neitzer <email@hidden>
References: 
 >Joins with WebObjects (From: Guido Neitzer <email@hidden>)

  • Prev by Date: Re: Strange Exception Continues
  • Next by Date: Re: Strange Exception Continues
  • Previous by thread: Re: Joins with WebObjects
  • Next by thread: Re: Joins with WebObjects
  • Index(es):
    • Date
    • Thread