I’ve been thinking lately about polymorphic associations, and I
wonder: is there a noticeable or tangible performance “hit” from doing
polymorphic associations when you’ve got your database under really
high query load?
So for example, maybe I have a “message” model, a “user” model and an
“administrator” model, without any subclassing or STI going on.
Message has a polymorphic interface called “message_author”, and both
“User” and “Administrator” use it. Say there wind up being ~1 million
messages in that message table. Assuming everything’s properly
indexed, do polymorphic associations add any significant overhead to
conducting database queries?
Thanks guys, appreciate the input.