i don't think partitioning is going to help you if count(*) didn't even 
work.

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 
better.)

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 = 
@article"

(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 view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/jLhHswr_E7QJ.
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