Thanks a lot for all your help and input. Just in case it can help
someone else one day: it turned out that my table was corrupted. It
was a real surprise to me since I was still able to "use it" (via
joins) and mySQL would not "complain".

I found out doing a "check table": it did not return an error but it
was crashing mysqld every time.

On Sep 15, 1:49 pm, JayC wrote:
i don't think partitioning is going to help you if count(*) didn't even

some basic questions for you on the comments table. is there a primary key?
is there a separately indexed article_id? i'm sure you have them, but better
to rule out the easy stuff first.

i was going to suggest using the exists() function rather than an outer
join, but again it doesn't sound like your main issue. (you should learn to
use the exists() function if you don't know it. i've found it to work

for the order of operations you are trying to do, i agree with an earlier
suggestion to delete comments first, then articles.  also don't use "not
in".  instead delete comments.* from comments where comments.article_id =

(sorry if this shows up like 3 times, it is my first time posting to this
group and it wasn't working.)
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
To unsubscribe from this group, send email to
For more options, visit this group at

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
postedSep 17, '11 at 8:05p
activeSep 17, '11 at 8:05p

1 user in discussion

PierreW: 1 post



site design / logo © 2022 Grokbase