Re: [PERFORM] materialized view order by and clustering

2016-11-17 Thread David G. Johnston
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?

[PERFORM] materialized view order by and clustering

2016-11-17 Thread Rick Otten
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