Index your tables people.

A good read on table index.

http://www.railway.at/articles/2008/04/24/database-agnostic-database-ignorant

Sometimes, it is easy to forget when someone or something else handles it for you. For instance, ActiveRecords. Rails does not  create foreign keys for you. It only creates the primary key. It does not impose constraint on the database level. The association is handled on the application level. So always remember to create an index for your model associations. It could save your database server from working too hard.

Tags:

No comments yet.

Leave a Reply