List:General Discussion« Previous MessageNext Message »
From:Shawn Green (MySQL) Date:September 3 2010 2:32pm
Subject:Re: question about VIEWS in 5.1.x
View as plain text  
On 9/3/2010 6:23 AM, Jangita wrote:
> On 02/09/2010 8:30 p, Hank wrote:
>> Simple question about views:
>>
>> I have a view such as:
>>
>>           create view combo as
>>           select * from table1
>>           union
>>           select * from table2;
>>
>> ...
>>
>> (I've also tried "UNION ALL" with the same results).
>>...
>>
> Hank,
> I think mysql is selecting ALL the records from both tables then 
> applying the where clause to all the data from table 1 and table 2 (I 
> think - guys correct me if I'm wrong)
> ...
 >

Jangita is correct. Read the bottom of
http://dev.mysql.com/doc/refman/5.1/en/view-algorithms.html


-- 
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc.
Office: Blountville, TN
Thread
question about VIEWS in 5.1.xHank2 Sep
  • Re: question about VIEWS in 5.1.xJangita3 Sep
    • Re: question about VIEWS in 5.1.xMySQL)3 Sep
Re: question about VIEWS in 5.1.xHank3 Sep
  • Re: question about VIEWS in 5.1.xJangita6 Sep
Re: question about VIEWS in 5.1.xJangita6 Sep