MySQL VIEW vs. embedded query, which one is faster?

Posted by Vincenzo on Stack Overflow See other posts from Stack Overflow or by Vincenzo
Published on 2010-06-15T08:15:59Z Indexed on 2010/06/15 8:22 UTC
Read the original article Hit count: 106

Filed under:

I'm going to optimize a MySQL embedded query with a view, but I'm not sure whether it will give an effect:

SELECT id FROM (SELECT * FROM t);

I want to convert it to:

CREATE VIEW v AS SELECT * FROM t; SELECT id FROM v;

I've heard about "indexed views" in SQL Server, but I'm not sure about MySQL. Any help would be appreciated. Thanks!

© Stack Overflow or respective owner

Related posts about mysql