Index your tables people.

2008 July 15
by Fadhli

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.

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS