Guest User

Untitled

a guest
Dec 18th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. CREATE TABLE xxx.documentstate (
  2. iddoc int8 NOT NULL DEFAULT nextval('xxx.document_state_iddoc_seq'::regclass),
  3. documento uuid NULL,
  4. idstate int8 NULL,
  5. iduser int4 NULL,
  6. idprocessor int8 NULL,
  7. datecreate timestamp NULL,
  8. usercreate varchar NULL,
  9. datemodifie timestamp NULL,
  10. usermodifie varchar NULL,
  11. datestate timestamp NULL,
  12. iddocuments int8 NULL,
  13. requestc int8 NULL,
  14. details varchar NULL
  15. ) PARTITION BY RANGE (datecreate)
  16. WITH (
  17. OIDS = FALSE,
  18. toast.autovacuum_enabled = TRUE
  19. )
  20. TABLESPACE pg_default;
  21. ALTER TABLE xxx.documentstate
  22. OWNER to postgres;
  23.  
  24.  
  25.  
  26. CREATE INDEX idx_documentstatedatecreated201601 ON xxx.documentstate201601 USING btree (date_created);
  27.  
  28. CREATE INDEX idx_documentstate_id_docu201601 ON xxx.documentstate201601 USING btree (iddoc);
  29.  
  30. CREATE INDEX ind_documentstate_id_documents201601 ON xxx.documentstate201601 USING btree (iddocuments);
  31.  
  32. CREATE INDEX ind_documentstate_id_state201601 ON xxx.documentstate201601 USING btree (idstate);
  33.  
  34. CREATE INDEX ind_documentstate_id_state_brin201601 ON xxx.documentstate201601 USING brin (idstate);
Add Comment
Please, Sign In to add comment