mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Add some note on adding index to HABTM table
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user