Re: Inheritance...
Re: Inheritance...
- Subject: Re: Inheritance...
- From: Florijan Stamenkovic <email@hidden>
- Date: Thu, 8 May 2008 13:19:57 -0400
On May 08, 2008, at 12:51, Chuck Hill wrote:
Besides the question below, I came up with another scenario
today... While it is true that performance should not be an issue
with the records in the inheritance tree, what about
relationships? I will have potentially thousands of records that
have two mandatory relationships to the leaf nodes, but defined in
the model as relationships to the root of the inheritance....
Those relationships will be used heavily, and I will need to pre-
fetch them. So, when that happens, what is going on in the
database, when using horizontal inheritance? There is an FK in the
table I am fetching on, but that FK might resolve to a PK in any
of the inheritance tables, no? Sounds kind of expensive... Or is
there something magical going on?
For Horizontal, it will issue one select for each leaf entity
(IIRC). Single table is much more efficient in this scenario.
Yeah, thought that would be the case. Which will not work for me...
Single-table it is. Interesting how when I started out I was thinking
exactly the opposite (something like: "vertical is for me, horizontal
is cool enough for wimps, and bah, who would ever use single-table!"
Yeah right Flor...
Thanks a bunch for the help everyone! I'm off to make a test case...
Flor
_______________________________________________
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