jena-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Seaborne <>
Subject Re: Speed of listReifiedStatements versus some alternatives
Date Sun, 16 Jan 2011 14:25:20 GMT

I'd liek to know why it's slow - I suspect the code is being more 
careful than your use case demands because reificiations can be 
incomplete and partially duplicated and the code copes.  Also, counting 
listReificiedStatements materializes the reified statements, whiuch is 
not necessary for just a count.

If you know all reifications are well formed and all you want is a 
count, there are simpler ways to access the data to get the count.


On 15/01/11 20:04, Benson Margulies wrote:
> Andy,
> Are you sure this is worth bothering with? Yanking a subset and
> listing the reified statements in there worked fine. I'll send you the
> data in any case.

>> A query:
>> SELECT (COUNT(*) AS ?C) { ?x rdf:subject ?z }
>> or more correct for broken and partial reification:
>> SELECT (COUNT(DISTINCT ?x) AS ?C) { ?x rdf:subject ?z }
>> will also get you the answer.

View raw message