]> Git — Sourcephile - gargantext.git/blob - devops/postgres/upgrade/0.0.6.9.9.4.4.sql
Merge remote-tracking branch 'origin/203-dev-corpus-json-import' into dev
[gargantext.git] / devops / postgres / upgrade / 0.0.6.9.9.4.4.sql
1
2
3 create materialized view if not exists context_node_ngrams_view as
4 select context_node_ngrams.context_id, ngrams_id, nodes_contexts.node_id
5 from nodes_contexts
6 join context_node_ngrams
7 on context_node_ngrams.context_id = nodes_contexts.context_id;
8
9 create index if not exists context_node_ngrams_context_id_ngrams_id_idx on context_node_ngrams(context_id, ngrams_id);
10 create index if not exists context_node_ngrams_view_context_id_idx on context_node_ngrams_view(context_id);
11 create index if not exists context_node_ngrams_view_ngrams_id_idx on context_node_ngrams_view(ngrams_id);
12 create index if not exists context_node_ngrams_view_node_id_idx on context_node_ngrams_view(node_id);
13 create index if not exists node_stories_ngrams_id_idx on node_stories(ngrams_id);