I read that you can replace most of the time UNION with subquery for better
performance.

I can try to write the sql request, but to make sure I would need DDL and a
reduced set of data.

Richard


On Thu, Jul 12, 2012 at 7:31 AM, villas <[email protected]> wrote:

> I forgot that you need to add different tables,  try something like this
> instead...
>
> a=db.auth_user.with_alias('a')
> r1 = db(a.id==1).select(a.id)
>
> a=db.auth_group.with_alias('a')
> r2 = db(a.id==1).select(a.id)
>
>
> rows_all = r1 & r2
>
>

Reply via email to