Forum OpenACS Development: Re: Very slow query

Collapse
9: Re: Very slow query (response to 1)
Posted by Don Baccus on
Andrei - take a close look at your query, it never deletes any rows!

If object_id = :old.object_id and ancestor_id = :old.object_id, then "object_id <> ancestor_id" always returns false!

If you remove the <> then it's still wrong but I'll leave that to you ...

Barry - your patch is exactly what I had in mind when I suggested that Janine loop over the ancestors and delete the relevant rows within the loop.