1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| -- Table: fakedata
-- DROP TABLE fakedata;
CREATE TABLE fakedata
(
id serial NOT NULL,
username character varying(128) NOT NULL,
firstname character varying(128) NOT NULL,
lastname character varying(128) NOT NULL,
state character varying(128),
city character varying(128),
address character varying(128),
zipcode character varying(128),
homephone character varying(128),
workphone character varying(128),
email character varying(128) NOT NULL,
bio text,
regdate timestamp with time zone,
CONSTRAINT fakedata_primary_id PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE fakedata OWNER TO postgres;
-- Index: fulltext_bio
-- DROP INDEX fulltext_bio;
CREATE INDEX fulltext_bio
ON fakedata
USING gin
(to_tsvector('english'::regconfig, bio));
-- Index: index_email
-- DROP INDEX index_email;
CREATE INDEX index_email
ON fakedata
USING btree
(email);
ALTER TABLE fakedata CLUSTER ON index_email;
-- Index: index_location
-- DROP INDEX index_location;
CREATE INDEX index_location
ON fakedata
USING btree
(state, city, address, zipcode);
-- Index: index_name
-- DROP INDEX index_name;
CREATE INDEX index_name
ON fakedata
USING btree
(firstname, lastname);
-- Index: index_username
-- DROP INDEX index_username;
CREATE INDEX index_username
ON fakedata
USING btree
(username); |
Partager