Forum OpenACS Development: Re: Best way to join with latest revisions

Collapse
Posted by Jeff Davis on
I wonder if we should consider adding live and latest revision
to the OBJi and OBJx views or possibly a OBJ(some other letter) view which would include those. The only issue I
can see in adding them to the OBJx view is that you might break some queries which do the style of joins you are
talking about here.

Then the query would be "select ... from contactsx x where x.latest_revision = revision_id" as we are already joining cr_items inside the view anyway.

It's a pretty common use case I think.

Collapse
Posted by Dave Bauer on
Claudio,

Can you post the queries and plans where the automatically generated view is much slow than your view? I can see that your view does not join on acs_objects.

Collapse
Posted by Dave Bauer on
Jeff,

I agree that adding latest revisio n and live revision is a good idea. It would break all the CR based code I have been writing though.

I suppose it would not be too difficult to update that code and it definitely would make it more readable.