[thelist] Joins across UNION statements

Matt Warden mwarden at gmail.com
Tue Oct 7 13:07:56 CDT 2008

On Tue, Oct 7, 2008 at 1:41 PM, Bill Moseley <moseley at hank.org> wrote:
> Am I not doing a UNION of ALL the rows of the two tables and then
> limiting to user 1234?  Perhaps it's not something to worry about
> but I would think I'd rather do a UNION of two small sets first.

A view is supposed to be a "virtual table" of sorts. Would the query
on a table run faster if it only had 1 row in it? Sure, but that's not
really what a table is supposed to be. Same with a view.

Prepare the view to give you the data set you want, and then query
that data set as if it were a table.

Matt Warden
Cincinnati, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list