<s>
In	O
computing	O
,	O
a	O
materialized	B-Application
view	I-Application
is	O
a	O
database	O
object	O
that	O
contains	O
the	O
results	O
of	O
a	O
query	B-Library
.	O
</s>
<s>
For	O
example	O
,	O
it	O
may	O
be	O
a	O
local	O
copy	O
of	O
data	O
located	O
remotely	O
,	O
or	O
may	O
be	O
a	O
subset	O
of	O
the	O
rows	O
and/or	O
columns	O
of	O
a	O
table	B-Application
or	O
join	B-Language
result	O
,	O
or	O
may	O
be	O
a	O
summary	O
using	O
an	O
aggregate	O
function	O
.	O
</s>
<s>
The	O
process	O
of	O
setting	O
up	O
a	O
materialized	B-Application
view	I-Application
is	O
sometimes	O
called	O
materialization	O
.	O
</s>
<s>
This	O
is	O
a	O
form	O
of	O
caching	B-General_Concept
the	O
results	O
of	O
a	O
query	B-Library
,	O
similar	O
to	O
memoization	O
of	O
the	O
value	O
of	O
a	O
function	O
in	O
functional	O
languages	O
,	O
and	O
it	O
is	O
sometimes	O
described	O
as	O
a	O
form	O
of	O
precomputation	O
.	O
</s>
<s>
As	O
with	O
other	O
forms	O
of	O
precomputation	O
,	O
database	O
users	O
typically	O
use	O
materialized	B-Application
views	I-Application
for	O
performance	O
reasons	O
,	O
i.e.	O
</s>
<s>
Materialized	B-Application
views	I-Application
which	O
store	O
data	O
based	O
on	O
remote	O
tables	O
were	O
also	O
known	O
as	O
snapshots	O
(	O
deprecated	O
Oracle	B-General_Concept
terminology	O
)	O
.	O
</s>
<s>
In	O
any	O
database	B-Application
management	I-Application
system	I-Application
following	O
the	O
relational	B-Architecture
model	I-Architecture
,	O
a	O
view	B-Language
is	O
a	O
virtual	O
table	B-Application
representing	O
the	O
result	O
of	O
a	O
database	B-Application
query	I-Application
.	O
</s>
<s>
Whenever	O
a	O
query	B-Library
or	O
an	O
update	O
addresses	O
an	O
ordinary	O
view	B-Language
's	O
virtual	O
table	B-Application
,	O
the	O
DBMS	O
converts	O
these	O
into	O
queries	B-Library
or	O
updates	O
against	O
the	O
underlying	O
base	O
tables	O
.	O
</s>
<s>
A	O
materialized	B-Application
view	I-Application
takes	O
a	O
different	O
approach	O
:	O
the	O
query	B-Library
result	O
is	O
cached	B-General_Concept
as	O
a	O
concrete	O
(	O
"	O
materialized	O
"	O
)	O
table	B-Application
(	O
rather	O
than	O
a	O
view	B-Language
as	O
such	O
)	O
that	O
may	O
be	O
updated	O
from	O
the	O
original	O
base	O
tables	O
from	O
time	O
to	O
time	O
.	O
</s>
<s>
Materialized	B-Application
views	I-Application
find	O
use	O
especially	O
in	O
data	O
warehousing	O
scenarios	O
,	O
where	O
frequent	O
queries	B-Library
of	O
the	O
actual	O
base	O
tables	O
can	O
be	O
expensive	O
.	O
</s>
<s>
In	O
a	O
materialized	B-Application
view	I-Application
,	O
indexes	B-Data_Structure
can	O
be	O
built	O
on	O
any	O
column	O
.	O
</s>
<s>
In	O
contrast	O
,	O
in	O
a	O
normal	O
view	B-Language
,	O
it	O
's	O
typically	O
only	O
possible	O
to	O
exploit	O
indexes	B-Data_Structure
on	O
columns	O
that	O
come	O
directly	O
from	O
(	O
or	O
have	O
a	O
mapping	O
to	O
)	O
indexed	O
columns	O
in	O
the	O
base	O
tables	O
;	O
often	O
this	O
functionality	O
is	O
not	O
offered	O
at	O
all	O
.	O
</s>
<s>
Materialized	B-Application
views	I-Application
were	O
implemented	O
first	O
by	O
the	O
Oracle	B-General_Concept
Database	I-General_Concept
:	O
the	O
Query	B-Library
rewrite	O
feature	O
was	O
added	O
from	O
version	O
8i	O
.	O
</s>
<s>
Example	O
syntax	O
to	O
create	O
a	O
materialized	B-Application
view	I-Application
in	O
Oracle	B-General_Concept
:	O
</s>
<s>
In	O
PostgreSQL	B-Application
,	O
version	O
9.3	O
and	O
newer	O
natively	O
support	O
materialized	B-Application
views	I-Application
.	O
</s>
<s>
In	O
version	O
9.3	O
,	O
a	O
materialized	B-Application
view	I-Application
is	O
not	O
auto-refreshed	O
,	O
and	O
is	O
populated	O
only	O
at	O
time	O
of	O
creation	O
(	O
unless	O
WITH	O
NO	O
DATA	O
is	O
used	O
)	O
.	O
</s>
<s>
It	O
may	O
be	O
refreshed	O
later	O
manually	O
using	O
REFRESH	O
MATERIALIZED	B-Application
VIEW	I-Application
.	O
</s>
<s>
In	O
version	O
9.4	O
,	O
the	O
refresh	O
may	O
be	O
concurrent	O
with	O
selects	O
on	O
the	O
materialized	B-Application
view	I-Application
if	O
CONCURRENTLY	O
is	O
used	O
.	O
</s>
<s>
Example	O
syntax	O
to	O
create	O
a	O
materialized	B-Application
view	I-Application
in	O
PostgreSQL	B-Application
:	O
</s>
<s>
Microsoft	O
SQL	O
Server	O
differs	O
from	O
other	O
RDBMS	O
by	O
the	O
way	O
of	O
implementing	O
materialized	B-Application
view	I-Application
via	O
a	O
concept	O
known	O
as	O
"	O
Indexed	O
Views	O
"	O
.	O
</s>
<s>
The	O
main	O
difference	O
is	O
that	O
such	O
views	O
do	O
not	O
require	O
a	O
refresh	O
because	O
they	O
are	O
in	O
fact	O
always	O
synchronized	O
to	O
the	O
original	O
data	O
of	O
the	O
tables	O
that	O
compound	O
the	O
view	B-Language
.	O
</s>
<s>
To	O
achieve	O
this	O
,	O
it	O
is	O
necessary	O
that	O
the	O
lines	O
of	O
origin	O
and	O
destination	O
are	O
"	O
deterministic	O
"	O
in	O
their	O
mapping	O
which	O
limits	O
the	O
types	O
of	O
possible	O
queries	B-Library
to	O
do	O
this	O
.	O
</s>
<s>
Example	O
syntax	O
to	O
create	O
a	O
materialized	B-Application
view	I-Application
in	O
SQL	O
Server	O
:	O
</s>
<s>
Apache	B-Language
Kafka	I-Language
(	O
since	O
v0.10.2	O
)	O
,	O
Apache	B-Language
Spark	I-Language
(	O
since	O
v2.0	O
)	O
,	O
Apache	O
Flink	O
,	O
Kinetica	O
DB	O
,	O
Materialize	O
,	O
and	O
RisingWave	O
all	O
support	O
materialized	B-Application
views	I-Application
on	O
streams	O
of	O
data	O
.	O
</s>
<s>
Materialized	B-Application
views	I-Application
are	O
also	O
supported	O
in	O
Sybase	B-Application
SQL	I-Application
Anywhere	I-Application
.	O
</s>
<s>
In	O
IBM	B-Application
Db2	I-Application
,	O
they	O
are	O
called	O
"	O
materialized	B-Application
query	I-Application
tables	I-Application
"	O
.	O
</s>
<s>
ClickHouse	B-Language
supports	O
materialized	B-Application
views	I-Application
that	O
automatically	O
refresh	O
on	O
merges	O
.	O
</s>
<s>
MySQL	B-Application
does	O
n't	O
support	O
materialized	B-Application
views	I-Application
natively	O
,	O
but	O
workarounds	O
can	O
be	O
implemented	O
by	O
using	O
triggers	O
or	O
stored	O
procedures	O
or	O
by	O
using	O
the	O
open-source	O
application	O
Flexviews	O
.	O
</s>
<s>
Materialized	B-Application
views	I-Application
can	O
be	O
implemented	O
in	O
Amazon	B-Application
DynamoDB	I-Application
using	O
data	O
modification	O
events	O
captured	O
by	O
DynamoDB	B-Application
Streams	O
.	O
</s>
<s>
Google	O
announced	O
in	O
8	O
April	O
2020	O
the	O
availability	O
of	O
materialized	B-Application
views	I-Application
for	O
BigQuery	O
as	O
a	O
beta	O
release	O
.	O
</s>
