<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>

<title>Virtuoso SQL, SPARQL  and Dynamic Statistics</title><link>http://virtuoso.openlinksw.com:443/blog/vdb/blog/?id=999</link><description>
Virtuoso SQL, SPARQL  and Dynamic Statistics
The last couple of weeks have been very busy, dealing with updates to the Virtuoso SQL and SPARQL compiler cost model. 
The new SQL compiler takes samples of index population on demand, thus always works with up-to-date statistics. Further, when there are constant leading key parts, it can get an estimate of the selectivity of the constant criteria with a single lookup. 
This is especially important for processing RDF. Since all triples go to one table unless otherwise declared, normal SQL statistics are not very useful for determining the join order for a SPARQL query. However, nearly always, SPARQL queries have a constant graph, constant predicate, sometimes constant subjects and objects. For example, using the index P, G, O, S, the compiler can know how many triples will have a given predicate within a given graph. This is done with a single lookup, without needing to count the actual triples, which would defeat the purpose. Also there is no need to do periodic statistics collection runs or to maintain counts of distinct combinations for multiple key parts. This makes for virtual certainty of getting reasonable join orders even for recently inserted or fast changing data sets. 
This will be part of the next Virtuoso Open Source release, probably in the next couple of weeks. There will also be a technical article with examples of how the dynamic statistics feature helps with RDF queries. 
</description><pubDate>Tue, 11 Jul 2006 19:39:29 GMT</pubDate><generator>Virtuoso Universal Server 08.03.3334</generator><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Virtuoso Data Space Bot</dc:creator><image><title>Virtuoso SQL, SPARQL  and Dynamic Statistics</title><url>http://virtuoso.openlinksw.com:443/weblog/public/images/vbloglogo.gif</url><link>http://virtuoso.openlinksw.com:443/blog/vdb/blog/?id=999</link><description>A great place to track Virtuoso&#39;s rapid evolution.</description><width>88</width><height>31</height></image>

</channel>
</rss>
