Preethi Sivakumar wrote:
> 
> I dont want to delete any rows from the mapping table as,
>  considering from performance point of view, deleting will take more 
> time than updating.

But you will be creating more work and time in managing changing the 
state of the join instead ?

I would classify this as _severely_ premature optimising.  Unless you 
are very regularly removing thousands of profiles from thousands of 
users this is a mad design decision.

I'd question your theory that deleting a row from a join table is 
significantly slower than updating a status on it also.  Having a status 
means that status will need to be part of both foreign keys' indexes as 
you will be accessing the join with a condition on the status.  This 
will add an "overhead" - ignoring the extra work you are going to have 
to do in all your automatic associations.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to