Re: [Virtuoso-users] Randomness in a SPARQL results

2010-02-03 Thread Marc-Alexandre Nolin
Hello, is there a fundamental difference between these 2 queries? The first one take 10 seconds to get an answer, the second one take almost 6 hours to answer. My repository have the following indexes in it: Index Name Unique TypeColumns New Index RDF_QUAD_GOPS No

Re: [Virtuoso-users] Randomness in a SPARQL results

2010-01-22 Thread Ivan Mikhailov
Hello Marc-Alexandre, > select go count(?go) > where > { >{select distinct ?protein >where { >?protein rdf:type . >} >order by order by asc (bif:rnd(20, ?protein)) >limit 100 } . >?protein ?go . > } > order b

Re: [Virtuoso-users] Randomness in a SPARQL results

2010-01-21 Thread Marc-Alexandre Nolin
Thanks everybody, I've managed to accomplish exactly what I wanted using the query you provided me and including it into another select ?go count(?go) where { {select distinct ?protein where { ?protein rdf:type . } order by order by asc (bif:rnd(200

Re: [Virtuoso-users] Randomness in a SPARQL results

2010-01-21 Thread Ivan Mikhailov
Hello Marc-Alexandre, The proper trick is select distinct ?s where { ?s rdf:type . } order by order by asc (bif:rnd(20, ?s)) limit 100 but this is a costly thing because it should find all proteins during the run. If you need random sampling on a regular

Re: [Virtuoso-users] Randomness in a SPARQL results

2010-01-21 Thread Marc-Alexandre Nolin
Thanks a lot, your query do give me a random set, but It don't work exactly like I would like to. I will reformulate my Sparql example: select ?protein ?go where { ?protein rdf:type . bif:random(?protein, 100) . ?protein ?go . } I don

Re: [Virtuoso-users] Randomness in a SPARQL results

2010-01-21 Thread Kingsley Idehen
Marc-Alexandre Nolin wrote: Hello, When I do the following query: select distinct ?s where { ?s rdf:type . } limit 100 Lets say I have 2 objects of type protein in the triplestore. I will receive a results containing 100 rows of 100 distinct proteins. If I run

Re: [Virtuoso-users] Randomness in a SPARQL results

2010-01-21 Thread Nathan
Marc-Alexandre Nolin wrote: > Hello, > > When I do the following query: > > select distinct > ?s > where > { > ?s rdf:type . > } > limit 100 > > Lets say I have 2 objects of type protein in the triplestore. I > will receive a results containing 100 rows of 100 di

[Virtuoso-users] Randomness in a SPARQL results

2010-01-21 Thread Marc-Alexandre Nolin
Hello, When I do the following query: select distinct ?s where { ?s rdf:type . } limit 100 Lets say I have 2 objects of type protein in the triplestore. I will receive a results containing 100 rows of 100 distinct proteins. If I run the same query again, I will r