Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
149
Issues
149
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
22b4b146
Commit
22b4b146
authored
May 12, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FILES] ressources for upgrade
parent
e79e0c0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
schema.sql
devops/postgres/schema.sql
+13
-0
0.0.6.9.9.4.4.sql
devops/postgres/upgrade/0.0.6.9.9.4.4.sql
+13
-0
No files found.
devops/postgres/schema.sql
View file @
22b4b146
...
...
@@ -335,3 +335,16 @@ CREATE OR REPLACE function node_pos(int, int) returns bigint
--drop index node_by_pos;
--create index node_by_pos on nodes using btree(node_pos(id,typename));
-- Optimization for Ngrams Table View
create
materialized
view
if
not
exists
context_node_ngrams_view
as
select
context_node_ngrams
.
context_id
,
ngrams_id
,
nodes_contexts
.
node_id
from
nodes_contexts
join
context_node_ngrams
on
context_node_ngrams
.
context_id
=
nodes_contexts
.
context_id
;
create
index
if
not
exists
context_node_ngrams_context_id_ngrams_id_idx
on
context_node_ngrams
(
context_id
,
ngrams_id
);
create
index
if
not
exists
context_node_ngrams_view_context_id_idx
on
context_node_ngrams_view
(
context_id
);
create
index
if
not
exists
context_node_ngrams_view_ngrams_id_idx
on
context_node_ngrams_view
(
ngrams_id
);
create
index
if
not
exists
context_node_ngrams_view_node_id_idx
on
context_node_ngrams_view
(
node_id
);
create
index
if
not
exists
node_stories_ngrams_id_idx
on
node_stories
(
ngrams_id
);
devops/postgres/upgrade/0.0.6.9.9.4.4.sql
0 → 100644
View file @
22b4b146
create
materialized
view
if
not
exists
context_node_ngrams_view
as
select
context_node_ngrams
.
context_id
,
ngrams_id
,
nodes_contexts
.
node_id
from
nodes_contexts
join
context_node_ngrams
on
context_node_ngrams
.
context_id
=
nodes_contexts
.
context_id
;
create
index
if
not
exists
context_node_ngrams_context_id_ngrams_id_idx
on
context_node_ngrams
(
context_id
,
ngrams_id
);
create
index
if
not
exists
context_node_ngrams_view_context_id_idx
on
context_node_ngrams_view
(
context_id
);
create
index
if
not
exists
context_node_ngrams_view_ngrams_id_idx
on
context_node_ngrams_view
(
ngrams_id
);
create
index
if
not
exists
context_node_ngrams_view_node_id_idx
on
context_node_ngrams_view
(
node_id
);
create
index
if
not
exists
node_stories_ngrams_id_idx
on
node_stories
(
ngrams_id
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment