Preethi Sivakumar wrote: > > I was in an impression that updation takes less time than deletion. > I'm getting ur point now. > Could you please elobarate on this point so that i could proceed with > the idea of deletion instead of updation.
Instead of accessing user.profiles (as simply as that) you are going to always have to introduce a condition (or use named_scopes but ultimately the same condition is there). This is complicated more so because your condition needs to test a column on the join table so you are going to be hand crafting all your finds to reference the status column. If you are accessing a table via user_id and status regularly it makes sense to index your join table on (user_id, status) and possibly also on (profile_id, status). This probably adds more overhead than a delete would on a simpler table because changing the status will result in 2 index updates. Deletes aren't that expensive. Get your rails application working using rails' conforming techniques first. Worry about problems when they occur. And don't optimise early :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

