Updating table index and tsvector creation
This commit is contained in:
parent
9dabd87f06
commit
6efd723aac
13
tables.sql
13
tables.sql
@ -29,9 +29,16 @@ CREATE TABLE instances (
|
||||
software VARCHAR(50)
|
||||
);
|
||||
|
||||
ALTER TABLE activities ADD COLUMN normalized_idx tsvector;
|
||||
UPDATE activities SET normalized_idx = to_tsvector('english', normalized);
|
||||
CREATE INDEX ON activities USING gin(normalized_idx);
|
||||
-- ALTER TABLE activities ADD COLUMN normalized_tsvector tsvector;
|
||||
-- UPDATE activities SET normalized_tsvector = to_tsvector('english', normalized);
|
||||
|
||||
ALTER TABLE activities
|
||||
ADD normalized_tsvector tsvector
|
||||
GENERATED ALWAYS AS (to_tsvector('english', normalized)) STORED;
|
||||
|
||||
|
||||
|
||||
CREATE INDEX normalized_idx ON activities USING gin(normalized_tsvector);
|
||||
|
||||
CREATE INDEX actors_id_idx ON actors (id);
|
||||
CREATE INDEX activities_id_idx ON activities (id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user