Dear all,

I am using *async_observer plug-in*.

*Scenario :-*
I am having two models Listener and Webhits, in which *Listener* has_many *
webhits* is the association.
When I am deleting Listener It should delete all the webhits corresponding
to that Listener.
When the data is less every thing is fine and corresponding data(webhits)
are deleting.

*Problem:-*
Now In My Database each Listener is holding more than 2lakhs of records.
When I am trying to delete Listener I am getting ana error and Mysql is not
responding.

*@listener *is my Listener object

In my Controller, *destroy* method I added the following line

*@listener.async_send(:destroy).* because I am using *async_observer
plug-in.*

But Its not deleting if the listener is having more records and Mysql
getting hang.

Can any one suggest me how to delete the records batch wise(10,000) from my
DB so that Mysql might not hangs.

Thanks In advance.


Thanks,
Yaswanth Kakarla.

-- 
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 https://groups.google.com/groups/opt_out.


Reply via email to