Skip to content

Instantly share code, notes, and snippets.

@geobabbler
Last active June 6, 2017 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geobabbler/48d714290b3e86e69ca9cd9e39491bb8 to your computer and use it in GitHub Desktop.
Save geobabbler/48d714290b3e86e69ca9cd9e39491bb8 to your computer and use it in GitHub Desktop.
CREATE MATERIALIZED VIEW public.mvw_cellular_count_geom_hex AS
SELECT uuid_generate_v4() AS oid,
vw_cellular_count_geom_hex.id,
vw_cellular_count_geom_hex.shape,
COALESCE(vw_cellular_count_geom_hex.features, 0::bigint)::integer AS features
FROM vw_cellular_count_geom_hex
WITH DATA;
CREATE INDEX sidx_mvw_cellular_count_geom_hex_shape
ON public.mvw_cellular_count_geom_hex
USING gist
(shape);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment