1

Does MySQL have an equalavent to SQL Servers "indexed view" functionality?

Is a view faster than a simple query?

What I'm specifically looking for is a way for MySQL to create a "view" that will return results faster than simply performing the underline view's query/sql.

Community
  • 1
  • 1
GregJohn
  • 251
  • 1
  • 3
  • 5

1 Answers1

3

An Indexed View is SQL Server terminology for a materialized view, which MySQL does not support.

You can either:

  • re-create a temporary table, populated with the desired columns, at a given interval
  • use an actual table, populated and indexed though again - there'd have to be a process to keep the data and indexes current
OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
  • While considered a silver bullet, materialized views are notoriously constrained on any vendor. You can't use non-deterministic functions IE: SYSDATE or GETDATE, among other things. – OMG Ponies Mar 28 '10 at 19:58