Not logged in : Login
(Sponging disallowed)

About: Step 6     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : schema:HowToStep, within Data Space : openlinksw.com associated with source document(s)
QRcode icon
http://openlinksw.com/c/4fvJuasGcQ

Check the primary key on the RDF_QUAD table is not broken by running the command: select count (s), count (p ), count (o ), count (g ) from rdf_quad table option (index rdf_quad, check); The counts of the `s, p, o, g` columns should all be the same, and if not the primary key index can be repaired by running the following queries: insert into rdf_quad index rdf_quad_pogs (s,p,o,g) select s,p,o,g from rdf_quad a table option (index rdf_quad) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_pogs) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s); Then the reverse insert query needs to be run to insert any missing rows from the `rdf_quad` index into the `rdf_quad_pogs` full index ie insert into rdf_quad index rdf_quad (s,p,o,g) select s,p,o,g from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s); And the following 3 insert queries need to be run to insert any missing rows in the 3 partial indexes ie rdf_quad_gs, rdf_quad_sp & rdf_quad_op as follows: insert into rdf_quad index rdf_quad_sp (s,p) select s,p from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_sp) where a.p = b.p and a.s = b.s); insert into rdf_quad index rdf_quad_op (o,p) select o,p from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_op) where a.o = b.o and a.p = b.p); insert into rdf_quad index rdf_quad_gs (g,s) select g,s from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_gs) where a.g = b.g and a.s = b.s); Then run the `select count ...` queries again as above, to check indexes, the counts `ALL` of which should all be zero indicating they are repaired. If the above steps are successful the RDF index has been repaired and the database is ready for use again.

AttributesValues
description
  • Check the primary key on the RDF_QUAD table is not broken by running the command: <code>select count (s), count (p ), count (o ), count (g ) from rdf_quad table option (index rdf_quad, check);</code> The counts of the `s, p, o, g` columns should all be the same, and if not the primary key index can be repaired by running the following queries: <pre>insert into rdf_quad index rdf_quad_pogs (s,p,o,g) select s,p,o,g from rdf_quad a table option (index rdf_quad) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_pogs) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s); </pre> Then the reverse insert query needs to be run to insert any missing rows from the `rdf_quad` index into the `rdf_quad_pogs` full index ie <pre>insert into rdf_quad index rdf_quad (s,p,o,g) select s,p,o,g from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s); </pre> And the following 3 insert queries need to be run to insert any missing rows in the 3 partial indexes ie rdf_quad_gs, rdf_quad_sp & rdf_quad_op as follows: <pre> insert into rdf_quad index rdf_quad_sp (s,p) select s,p from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_sp) where a.p = b.p and a.s = b.s); insert into rdf_quad index rdf_quad_op (o,p) select o,p from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_op) where a.o = b.o and a.p = b.p); insert into rdf_quad index rdf_quad_gs (g,s) select g,s from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_gs) where a.g = b.g and a.s = b.s); </pre> Then run the `select count ...` queries again as above, to check indexes, the counts `ALL` of which should all be zero indicating they are repaired. If the above steps are successful the RDF index has been repaired and the database is ready for use again.
  • Check the primary key on the RDF_QUAD table is not broken by running the command: <code>select count (s), count (p ), count (o ), count (g ) from rdf_quad table option (index rdf_quad, check);</code> The counts of the `s, p, o, g` columns should all be the same, and if not the primary key index can be repaired by running the following queries: <pre>insert into rdf_quad index rdf_quad_pogs (s,p,o,g) select s,p,o,g from rdf_quad a table option (index rdf_quad) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_pogs) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s); </pre> Then the reverse insert query needs to be run to insert any missing rows from the `rdf_quad` index into the `rdf_quad_pogs` full index ie <pre>insert into rdf_quad index rdf_quad (s,p,o,g) select s,p,o,g from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad) where a.g = b.g and a.p = b.p and a.o = b.o and a.s = b.s); </pre> And the following 3 insert queries need to be run to insert any missing rows in the 3 partial indexes ie rdf_quad_gs, rdf_quad_sp & rdf_quad_op as follows: <pre> insert into rdf_quad index rdf_quad_sp (s,p) select s,p from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_sp) where a.p = b.p and a.s = b.s); insert into rdf_quad index rdf_quad_op (o,p) select o,p from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_op) where a.o = b.o and a.p = b.p); insert into rdf_quad index rdf_quad_gs (g,s) select g,s from rdf_quad a table option (index rdf_quad_pogs) where not exists (select 1 from rdf_quad b table option (loop, index rdf_quad_gs) where a.g = b.g and a.s = b.s); </pre> Then run the `select count ...` queries again as above, to check indexes, the counts `ALL` of which should all be zero indicating they are repaired. If the above steps are successful the RDF index has been repaired and the database is ready for use again.
described by
name
  • Step 6
type
position
is topic of
is schema:step of
Faceted Search & Find service v1.17_git148 as of Oct 14 2024


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3332 as of Sep 19 2024, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (30 GB total memory, 26 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2024 OpenLink Software