diff --git a/tables/lastpricedetail.pg.sql b/tables/lastpricedetail.pg.sql index db2337f..cbb6d7c 100644 --- a/tables/lastpricedetail.pg.sql +++ b/tables/lastpricedetail.pg.sql @@ -1,4 +1,6 @@ -CREATE TABLE pricequote.lastpricedetail AS +DROP TABLE pricequote.lastpricedetail + +CREATE MATERIALIZED VIEW pricequote.lastpricedetail AS WITH base AS ( SELECT customer, @@ -122,3 +124,5 @@ FULL OUTER JOIN seg_json s WITH DATA; --SELECT * FROM pricequote.lastpricedetail; + +CREATE INDEX lastpricedetail_idx ON pricequote.lastpricedetail(customer, partgroup); \ No newline at end of file