On Thu, Nov 17, 2016 at 9:36 AM, Rick Otten
wrote:
>
> Does it matter if I also try to CLUSTER the materialized view on that
> primary sort field? Or is it already clustered because of the 'order by'?
>
> [...]
>
> When I refresh the materialized view (concurrently) is the order_by
> preserved?
If I construct the materialized view with an 'order by', I can use a BRIN
index to a sometimes significant performance advantage, at least for the
primary sort field. I have observed that even though the first pass is a
little lossy and I get index rechecks, it is still much faster than a
regular