Displaying 1 result from an estimated 1 matches for "pictures_index_picturable_type_id".
2006 Apr 02
2
rails db indexing and through association
Hello,
Say, I have a pictures table, and there are many objects which can have
pictures, so I define a picturable type. Now, to make the query for pictures
more efficient I should index the picture table using both picturable_type and
picturable_id.
Is this the correct approach to indexing the table, or can things be done
better? I want the database retrieval operation to be extremely fast (I