Add some note on adding index to HABTM table

This commit is contained in:
Prem Sichanugrist
2011-10-20 17:15:28 -04:00
parent d64e0955d0
commit f0be2cb192

View File

@@ -1432,6 +1432,10 @@ module ActiveRecord
# end
# end
#
# It's also a good idea to add indexes to each of those columns to speed up the joins process.
# However, in MySQL it is advised to add a compound index for both of the columns as MySQL only
# uses one index per table during the lookup.
#
# Adds the following methods for retrieval and query:
#
# [collection(force_reload = false)]