Bug #23135 Slow views performance
Submitted: 10 Oct 2006 12:10 Modified: 10 Oct 2006 13:39
Reporter: Nuno Soares Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S5 (Performance)
Version:5.0.19 OS:Linux (Linux)
Assigned to: CPU Architecture:Any
Tags: performance, Views

[10 Oct 2006 12:10] Nuno Soares
Description:
Views have slow performance on tables with large amount of data (my base table has 30000 rows and it's growing very fast).

create view v1 as
select c1, c2, c3, sum(c4) as total
  from t1
 group by c1, c2, c3

when i run the query
select * from v1 where c1 = 1
the execution time is 0.4500s

and

select c1, c2, c3, sum(c4) as total
  from t1
 where c1 = 1
 group by c1, c2, c3
the execution time is 0.0032s

what can i do to improve the view execution time ?

How to repeat:
select * from v1 where c1 = 1

select c1, c2, c3, sum(c4) as total
  from t1
 where c1 = 1
 group by c1, c2, c3
[10 Oct 2006 13:39] Valeriy Kravchuk
Duplicate of bug #23136.