Not logged in : Login
(Sponging disallowed)

About: Step 6     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : schema:HowToStep, within Data Space : linkeddata.uriburner.com:28898 associated with source document(s)

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
type
described by
name
  • Step 6
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.
position
is topic of
is schema:step of
Faceted Search & Find service v1.17_git149 as of Dec 03 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.3331 as of Aug 25 2024, on Linux (x86_64-ubuntu_noble-linux-glibc2.38-64), Single-Server Edition (378 GB total memory, 42 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2025 OpenLink Software