News for hackers. Stuff that matters.
Re:Disaster: MySQL 5.5 Flushing by jeltz on Monday September 19, 2011 @08:05AM (#3013188)
I do not see why views need to be so complex in MySQL. Why not do like in PostgreSQL where they are almost just subqueries saved within the database.
Re:Disaster: MySQL 5.5 Flushing by IgorPartola on Monday September 19, 2011 @11:42AM (#3013952)
That is essentially what they are. The merge algorithm merges your query with the query of the view and returns the result. However, if the query of the view returns a very large result set, it is much faster to pre-flight it, then select against it.
Re:Disaster: MySQL 5.5 Flushing by jeltz on Monday September 19, 2011 @01:46PM (#3014470)
Yeah, but letting users specify if views are MERGE or TEMPTABLE seems quite pointless. Why not always use UNDEFINED and let the planner chose. The planner knows which tables are large.