Yes sir!! I didn't think about it, I don't need to matter with duplicate, since each component of the union are mutually exclusive...
At least it was working with or, but very long... Thanks Anthony!! Richard On Tue, Oct 22, 2013 at 11:45 AM, Anthony <[email protected]> wrote: > On Tuesday, October 22, 2013 11:28:07 AM UTC-4, Richard wrote: > >> Hello, >> >> I try to do union as explain the book, but it keeps running and >> running... on row1|row2, I hava complexe query though with a lot of join >> and subrequest... >> > > It loops through row2 and checks whether each record already exists in > row1, so if there are a lot of records in either and the records are > complex, I suppose that could take a while. If you just do row1&row2 > instead, that will just combine the two sets of records without removing > duplicates -- so if you don't need to worry about duplicates, that should > be a lot faster. > > Anthony > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

