Not logged in : Login

About: VirtTipsAndTricksGuideMergeOneByOne     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : atom:Entry, within Data Space : vos.openlinksw.com associated with source document(s)

AttributesValues
type
Date Created
Date Modified
label
  • VirtTipsAndTricksGuideMergeOneByOne
maker
Title
  • VirtTipsAndTricksGuideMergeOneByOne
isDescribedUsing
has creator
content
  • %META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---+ What is the difference between a "merge" and a "one by one" execution of SPARQL queries across named graphs? By wrapping one or more triple patterns in a <b><code>GRAPH ?g { ... }</code></b> pattern, the triple patterns inside this "graph group pattern" will be restricted to the specified named graph, <b><code>?g</code></b>. Lacking the <b><code>GRAPH ?g { ... }</code></b>, the triples may be found in different named graphs. Using graph group patterns can thus dramatically reduce the amount of data to be processed for all triple patterns after the first in join order, so it's typically faster. <i><b>Note</b> -- The "default graph" in Virtuoso is not a union of all graphs; it is a sum. This means that Virtuoso's behavior differs slightly from the SPARQL spec, in that some duplicate result rows may appear if the same values appear as <code>{ ?s ?p ?o }</code> in two or more different graphs). (Results perfectly conforming to the SPARQL spec would leave out these duplicate rows.)</i> This query will deliver matching triples from any and all named graphs in the Virtuoso store -- <verbatim> [PREFIXes here] SELECT ?serial ?sr ?ct1 ?ct2 WHERE { ?sr a dm:SessionRecord . ?sr dm:hasDataSnapshot ?snap . ?device dm:hasSessionRecord ?sr . ?device dm:hasSerialNumber ?serial . [etc.] } </verbatim> With the added <b><code>GRAPH ?g { ... }</code></b> patterns below, only matching triples from the specified named graph(s) will be returned. <verbatim> [PREFIXes here] SELECT ?serial ?sr ?ct1 ?ct2 WHERE { GRAPH ?g1 { ?sr a dm:SessionRecord } GRAPH ?g2 { ?sr dm:hasDataSnapshot ?snap } GRAPH ?g3 { ?device dm:hasSessionRecord ?sr } GRAPH ?g4 { ?device dm:hasSerialNumber ?serial } [etc.] } </verbatim> ---++ Related * [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]] * [[http://www.w3.org/TR/rdf-sparql-query/][SPARQL Query Language for RDF]]
id
  • 9b9e17756823a30648ec80c2b39ceccf
link
has container
http://rdfs.org/si...ices#has_services
atom:title
  • VirtTipsAndTricksGuideMergeOneByOne
links to
atom:source
atom:author
atom:published
  • 2017-06-13T05:50:06Z
atom:updated
  • 2017-06-13T05:50:06Z
topic
is made of
is container of of
is link of
is http://rdfs.org/si...vices#services_of of
is creator of of
is atom:entry of
is atom:contains of
Faceted Search & Find service v1.17_git150 as of Jan 20 2025


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 11 2024, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (15 GB total memory, 830 MB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2025 OpenLink Software