search for: picturable_type

Displaying 1 result from an estimated 1 matches for "picturable_type".

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 have some other types such as votes, which require many queries and the speed of query retrieval is important). Thanks in advance fo...