Tim Kane
2014-05-18 21:47:49 UTC
HI all,
Iâm curious about materialised views.
I was just setting something up, and noticed there is no support for
UNLOGGED materialised views
(http://www.postgresql.org/message-id/E1UZNrD-0008Eh-***@gemulon.postgresql.o
rg)
I also notice that the creation of an unlogged table appears to be a lot
quicker than that of a materialised view (as you might expect).
Read operations seem indistinguishable, though Iâve not tested with cold
buffers.
Aside from the convenience of the REFRESH functionality, are there any other
factors I should consider?
(the base tables get dropped/recreated each night, so I canât rely on
REFRESH functionality â Iâll need to recreate the table/view in either
case).
Oh, I also noticed we donât support alternate spellings of MATERIALIZE, as
we do for ANALYZE.
Iâm not sure if we do this anywhere else, maybe itâs just analyze being the
odd one out.
=# create materialized view testview as select 1;
SELECT 1
Time: 21.760 ms
=# create materialised view testview as select 1;
ERROR: syntax error at or near "materialised"
LINE 1: create materialised view testview as select 1;
Not that it isnât difficult for users to simply spell it one way or the
other, it just seems a minor inconsistency.
Cheers,
Tim
Iâm curious about materialised views.
I was just setting something up, and noticed there is no support for
UNLOGGED materialised views
(http://www.postgresql.org/message-id/E1UZNrD-0008Eh-***@gemulon.postgresql.o
rg)
I also notice that the creation of an unlogged table appears to be a lot
quicker than that of a materialised view (as you might expect).
Read operations seem indistinguishable, though Iâve not tested with cold
buffers.
Aside from the convenience of the REFRESH functionality, are there any other
factors I should consider?
(the base tables get dropped/recreated each night, so I canât rely on
REFRESH functionality â Iâll need to recreate the table/view in either
case).
Oh, I also noticed we donât support alternate spellings of MATERIALIZE, as
we do for ANALYZE.
Iâm not sure if we do this anywhere else, maybe itâs just analyze being the
odd one out.
=# create materialized view testview as select 1;
SELECT 1
Time: 21.760 ms
=# create materialised view testview as select 1;
ERROR: syntax error at or near "materialised"
LINE 1: create materialised view testview as select 1;
Not that it isnât difficult for users to simply spell it one way or the
other, it just seems a minor inconsistency.
Cheers,
Tim