Subject | Re: [firebird-support] Maximum number of union? |
---|---|
Author | elita lawalata |
Post date | 2004-12-03T04:57:56Z |
Fantastic!!
Thanks Arno !
eLita
--- Arno Brinkman <firebird@...> wrote:
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
Thanks Arno !
eLita
--- Arno Brinkman <firebird@...> wrote:
> Hi,__________________________________
>
> > Is there any maximum number of union in a query?
>
> Not directly UNION, but the number of streams
> (255).
> Every tables uses 1 stream and every UNION uses 1
> stream, thus
>
> Example1:
>
> SELECT * FROM RDB$DATABASE
> UNION ALL
> SELECT * FROM RDB$DATABASE
>
> uses 3 streams
>
>
> Example2:
>
> SELECT * FROM RDB$DATABASE
> UNION ALL
> SELECT * FROM RDB$DATABASE
> UNION ALL
> SELECT * FROM RDB$DATABASE
> UNION ALL
> SELECT * FROM RDB$DATABASE
>
> uses 7 streams
>
>
> Example3:
>
> SELECT
> *
> FROM
> RDB$RELATIONS r
> JOIN RDB$RELATION_FIELDS rf ON
> (rf.RDB$RELATION_NAME = r.RDB$RELATION_NAME)
> UNION ALL
> SELECT
> *
> FROM
> RDB$RELATIONS r
> JOIN RDB$RELATION_FIELDS rf ON
> (rf.RDB$RELATION_NAME = r.RDB$RELATION_NAME)
>
> uses 5 streams
>
>
>
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250