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