Re: Joins with WebObjects
Re: Joins with WebObjects
- Subject: Re: Joins with WebObjects
- From: Geoff Hopson <email@hidden>
- Date: Sat, 19 Mar 2005 16:10:50 +0000
Well, the only difference between the two outputs you supply is the
'SVI_JOINS' part. IN the fast one, you look like you are joining OK on
the DGA_DIENSTLEISTER_ZU_FACHRICHTUNG table (Which I think is your n:m
table) on column id2, whereas on the slow on you have a SVI_JOINS on
"DGA_DIENSTLEISTER" table, which is one of the ends of the many-to-many.
So, something wrong there.
It looks like maybe your eomodel may be incorrectly defined? Please
check you have set the many to many up correctly.
Geoff
Guido Neitzer wrote:
"Geoff Hopson" <email@hidden> wrote:
The queries look the same to me, but obviously they are producing
different performance results.
Sorry, I should have made that more clear. Second query has an explicit
join:
DGA_DIENSTLEISTER d join DGA_DIENSTLEISTER_ZU_FACHRICHTUNG z
on d.id = z.id2,
The first doesn't have this. I think the Frontbase plugin doesn't create
good SQL for the join.
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.
Yes they have, but I don't know how to read them. I'm not database expert,
perhaps you can read something from it (I attach the two informations at the
end of this mesage).
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.
I have played around with that, but wasn't successful. Perhaps the Frontbase
guys can tell something on monday.
Or you could always give the 'rawRowsForSQL' a spin on EOUtilities...
Argl ... I wanted to avoid that for now ... ;-)
But if I have to ... :-(
cug
FAST:
{
GROUPS = (
(
{
"ROW_COUNT" = 6;
"SCHEMA_NAME" = webobjects;
"TABLE_NAME" = "DGA_DIENSTLEISTER";
}
),
(
{
"ROW_COUNT" = 33383;
"SCHEMA_NAME" = webobjects;
"TABLE_NAME" = "DGA_DIENSTLEISTER_ZU_FACHRICHTUNG";
}
),
(
{
"ROW_COUNT" = 1;
"SCHEMA_NAME" = webobjects;
"TABLE_NAME" = "DGA_DIENSTLEISTER_FACHRICHTUNG";
}
)
);
"SVI_JOINS" = (
{
ESTIMATE = 1;
"INDEX_NAME" = "_I0000000104";
"JOIN_COLUMNS" = (ID2);
"ROW_COUNT" = 33383;
"SCHEMA_NAME" = webobjects;
"TABLE_NAME" = "DGA_DIENSTLEISTER_ZU_FACHRICHTUNG";
}
);
"SVI_LITERALS" = (
{
ESTIMATE = 6;
"INDEX_NAME" = "plz_index";
"ROW_COUNT" = 7;
"SCHEMA_NAME" = webobjects;
"SELECT_INFO" = ("PLZ LIKE '45257'");
"TABLE_NAME" = "DGA_DIENSTLEISTER";
TIME = "0.000238";
},
{
ESTIMATE = 1;
"INDEX_NAME" = "_I0000000102";
"ROW_COUNT" = 1;
"SCHEMA_NAME" = webobjects;
"SELECT_INFO" = ("NAME LIKE 'Physiotherapeuten'");
"TABLE_NAME" = "DGA_DIENSTLEISTER_FACHRICHTUNG";
TIME = "0.000019";
}
);
}
==================================================
And slow:
{
GROUPS = (
(
{
"ROW_COUNT" = 1;
"SCHEMA_NAME" = webobjects;
"TABLE_NAME" = "DGA_DIENSTLEISTER_FACHRICHTUNG";
}
),
(
{
"ROW_COUNT" = 33383;
"SCHEMA_NAME" = webobjects;
"TABLE_NAME" = "DGA_DIENSTLEISTER_ZU_FACHRICHTUNG";
}
),
(
{
"ROW_COUNT" = 6;
"SCHEMA_NAME" = webobjects;
"TABLE_NAME" = "DGA_DIENSTLEISTER";
}
)
);
"SVI_JOINS" = (
{
ESTIMATE = 1;
"INDEX_NAME" = "_I0000000014";
"JOIN_COLUMNS" = (ID);
"ROW_COUNT" = 6;
"SCHEMA_NAME" = webobjects;
"TABLE_NAME" = "DGA_DIENSTLEISTER";
}
);
"SVI_LITERALS" = (
{
ESTIMATE = 6;
"INDEX_NAME" = "plz_index";
"ROW_COUNT" = 7;
"SCHEMA_NAME" = webobjects;
"SELECT_INFO" = ("PLZ LIKE '45257'");
"TABLE_NAME" = "DGA_DIENSTLEISTER";
TIME = "0.000171";
},
{
ESTIMATE = 1;
"INDEX_NAME" = "_I0000000102";
"ROW_COUNT" = 1;
"SCHEMA_NAME" = webobjects;
"SELECT_INFO" = ("NAME LIKE 'Physiotherapeuten'");
"TABLE_NAME" = "DGA_DIENSTLEISTER_FACHRICHTUNG";
TIME = "0.000019";
}
);
}
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
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