Skip to content
Snippets Groups Projects

GIN index uses to find posts by tag

Merged Marcin requested to merge mi_gin_posts_tags into develop
1 unresolved thread
Compare and
9 files
+ 99
153
Compare changes
  • Side-by-side
  • Inline
Files
9
@@ -213,6 +213,15 @@ IF NOT EXISTS (SELECT data_type FROM information_schema.columns
ELSE
RAISE NOTICE 'SKIPPING hive_posts upgrade - adding total_votes and net_votes columns';
END IF;
IF NOT EXISTS(SELECT data_type FROM information_schema.columns
WHERE table_name = 'hive_posts' AND column_name = 'tags_ids') THEN
ALTER TABLE ONLY hive_posts
ADD COLUMN tags_ids INTEGER[];
ELSE
RAISE NOTICE 'SKIPPING hive_posts upgrade - adding a tags_ids column';
END IF;
END
$BODY$
@@ -383,3 +392,6 @@ DROP INDEX IF EXISTS hive_posts_promoted_idx;
CREATE INDEX IF NOT EXISTS hive_posts_promoted_id_idx ON hive_posts (promoted, id)
WHERE NOT is_paidout AND counter_deleted = 0
;
CREATE INDEX IF NOT EXISTS hive_posts_tags_ids_idx ON hive_posts USING gin(tags_id gin__int_ops);
Loading