Have you tried FILTER( bif:contains(?name, '"blood*"'))
It my actually result in a different compilation strategy although it does the same thing as far as I know. I also wasn't aware that GRAPH operated outside of UNION. I would tend to put the two GRAPH's into the UNION parts myself as follows. BASE <http://www.semantic-systems-biology.org/> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX ssb:<http://www.semantic-systems-biology.org/SSB#> SELECT ?name ?unique_id WHERE { { GRAPH <OBO> { ?unique_id rdfs:label ?name. FILTER( bif:contains(?name, '"blood*"')) } } UNION { GRAPH <OBO> { ?unique_id ssb:name ?name. FILTER( bif:contains(?name, '"blood*"')) } } } I was also under the impression that GRAPH names needed to be IRI/URI syntax. Does BASE influence the GRAPH reference? Cheers, Peter ----- "Erick Antezana" <er...@psb.ugent.be> wrote: > From: "Erick Antezana" <er...@psb.ugent.be> > To: "Hugh Williams" <hwilli...@openlinksw.com> > Cc: "virtuoso-users" <virtuoso-users@lists.sourceforge.net> > Sent: Friday, 1 August, 2008 3:01:00 AM GMT +10:00 Brisbane > Subject: Re: [Virtuoso-users] Announcing OpenLink Virtuoso, Open-Source > Edition, v5.0.7 > > hi, > > here it is: > > BASE <http://www.semantic-systems-biology.org/> > PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> > PREFIX ssb:<http://www.semantic-systems-biology.org/SSB#> > SELECT ?name ?unique_id > WHERE { > GRAPH <OBO> { > FILTER regex(?name, 'blood') > {?unique_id rdfs:label ?name.} > UNION > {?unique_id ssb:name ?name.} > } > } > > > erick > > Hugh Williams wrote: > > HI Erick, > > > > Can you please provide the SPARQL query this explain output was > > generated from also ... > > > > Regards > > Hugh > > > > On 31 Jul 2008, at 16:37, Erick Antezana wrote: > > > >> Hi Hugh, > >> > >> I've run the 'explain' on a sample query, here is the result: > >> > >> Query result: > >> REPORT > >> VARCHAR > >> { > >> Precode: > >> 0: $25 "callret" := Call __box_flags_tweak (<constant > >> (http://www.semantic-systems-biology.org/OBO)>, <constant (1)>) > >> 5: $26 "org/OBO" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($25 > >> "callret") > >> 12: $27 "callret" := Call __box_flags_tweak (<constant > >> (http://www.w3.org/2000/01/rdf-schema#label)>, <constant (1)>) > >> 17: $28 "ema#label" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($27 > > >> "callret") > >> 24: $29 "callret" := Call __box_flags_tweak (<constant > >> (http://www.semantic-systems-biology.org/SSB#name)>, <constant > (1)>) > >> 29: $30 "SSB#name" := Call DB.DBA.RDF_MAKE_IID_OF_QNAME_SAFE ($29 > > >> "callret") > >> 36: BReturn 0 > >> Subquery > >> { > >> Union > >> { > >> from DB.DBA.RDF_QUAD by RDF_QUAD 6.8e+04 rows > >> Key RDF_QUAD ASC ($37 "s-9-3-t0-u8.O", $36 "s-9-3-t0-u8.S") > >> inlined <col=412 G = $26 "org/OBO"> > >> row specs: <col=414 P = $28 "ema#label"> > >> Current of: <$39 "<DB.DBA.RDF_QUAD s-9-3-t0-u8>" spec 5> > >> After test: > >> 0: $40 "callret" := Call __rdf_sqlval_of_obj ($37 > "s-9-3-t0-u8.O") > >> 5: $41 "callret" := Call DB.DBA.RDF_REGEX ($40 "callret", > <constant > >> (blood)>) > >> 12: if (<constant (0)> 1(=) $41 "callret") then 16 else 15 unkn > 16 > >> 15: BReturn 1 > >> 16: BReturn 0 > >> After code: > >> 0: $32 "unique_id" := := artm $36 "s-9-3-t0-u8.S" > >> 4: $33 "name" := := artm $37 "s-9-3-t0-u8.O" > >> 8: BReturn 0 > >> Subquery Select($32 "unique_id", $33 "name", <$39 "<DB.DBA.RDF_QUAD > > >> s-9-3-t0-u8>" spec 5>) > >> } > >> { > >> from DB.DBA.RDF_QUAD by RDF_QUAD 3.4e+04 rows > >> Key RDF_QUAD ASC ($50 "s-11-6-t1.O", $49 "s-11-6-t1.S") > >> inlined <col=412 G = $26 "org/OBO"> > >> row specs: <col=414 P = $30 "SSB#name"> > >> Current of: <$52 "<DB.DBA.RDF_QUAD s-11-6-t1>" spec 5> > >> After test: > >> 0: $53 "callret" := Call __rdf_sqlval_of_obj ($50 "s-11-6-t1.O") > >> 5: $54 "callret" := Call DB.DBA.RDF_REGEX ($53 "callret", > <constant > >> (blood)>) > >> 12: if (<constant (0)> 1(=) $54 "callret") then 16 else 15 unkn > 16 > >> 15: BReturn 1 > >> 16: BReturn 0 > >> After code: > >> 0: $32 "unique_id" := := artm $49 "s-11-6-t1.S" > >> 4: $33 "name" := := artm $50 "s-11-6-t1.O" > >> 8: BReturn 0 > >> Subquery Select($32 "unique_id", $33 "name", <$39 "<DB.DBA.RDF_QUAD > > >> s-9-3-t0-u8>" spec 5>) > >> } > >> } > >> After code: > >> 0: $62 "name" := Call __rdf_sqlval_of_obj ($33 "name") > >> 5: $63 "unique_id" := Call id_to_iri ($32 "unique_id") > >> 10: BReturn 0 > >> Select ($62 "name", $63 "unique_id") > >> } > >> No. of rows in result: 64 > >> > >> > >> As I mentioned, no row is returned. Unfortunately, I cannot compare > > >> with our previous installation (5.0.3). > >> > >> Any hint? > >> > >> Erick > >> > >> > >> Hugh Williams wrote: > >>> Erick, > >>> On 22 Jul 2008, at 13:21, Erick Antezana wrote: > >>> > >>>> Hi Tim, > >>>> > >>>> I installed the latest release (5.0.7) on a linux box (64bits) > and > >>>> reloaded our data from scratch. Surprisingly some SPARQL queries > that > >>>> were working previously are not anymore. We have not done a full > test > >>>> but so far I found that in some cases I got a string: ''end > reservoir" > >>>> while asking for the rdfs:label of a resource (I also get the > right > >>>> label). On the other hand, I also faced some issues with: > FILTER > >>>> regex(?term_name, "test") , it seems the regex doesn't do the > job > >>>> anymore (things like FILTER bound (?name) work.)...Let me know if > you > >>>> need any "explain" execution or so... > >>> > >>> [Hugh] explain output for these problem queries would be useful to > > >>> see. Also, I presume you still have an instance of the previous > >>> Virtuoso 5.0.6 build running when these queries run successfully, > > >>> in which case comparison explain queries would be useful to have > also. > >>>> > >>>> Another question: what is expected to happen with virtuoso if I > am > >>>> loading some data in a specific graph and namespace and during > that > >>>> loading process I launch a SPARQL query to the system asking > something > >>>> from that graph/namespace? I've got an error (DBD::ODBC::st > execute > >>>> failed: [unixODBC][OpenLink][Virtuoso iODBC Driver][Virtuoso > >>>> Server]SR172: Transaction deadlocked (SQL-40001)) from my > loading > >>>> pipeline script. The loading process stops. It seems I cannot > query > >>>> during the loading process? > >>> > >>> [Hugh] This is most probably a transaction isolation level issue. > > >>> Note that when loading large RDF Data sets the default transaction > > >>> isolation setting should be READ COMMITTED, DefaultIsolation = 2 > in > >>> the [Parameters] section of the virtuoso configuration > >>> file(virtuoso.ini)as detailed at: > >>> > >>> > http://docs.openlinksw.com/virtuoso/rdfperformancetuning.html#rdfperfloadingunitpro > > >>> > >>> > >>> This will enable read access to committed data via an ODBC or any > > >>> other data access client. > >>> > >>> You can also set the transaction isolation for your connection to > > >>> READ COMMITTED on the client also as detailed at: > >>> > >>> > http://docs.openlinksw.com/virtuoso/ptune.html#TRANSACTION_ISOLATION_LEVELS > > >>> > >>> > >>> This can be done either using SQL you pass after connect : > >>> > >>> SET TRANSACTION ISOLATION LEVEL READ COMMITTED > >>> > >>> or at connect time using the following ODBC API call: > >>> > >>> SQLSetConnectOption (hdbc, SQL_TXN_ISOLATION, > SQL_TXN_READ_COMMITTED); > >>> > >>> Note that READ COMMITTED by nature may provide unpredictable > results > >>> as it will only return data committed at the time the query is > run. > >>> > >>> Regards > >>> Hugh > >>> > > -- > ================================================================== > Erick Antezana http://www.cellcycleontology.org > PhD student > Tel:+32 (0)9 331 38 24 fax:+32 (0)9 3313809 > VIB Department of Plant Systems Biology, Ghent University > Technologiepark 927, 9052 Gent, BELGIUM > er...@psb.ugent.be http://www.psb.ugent.be/~erant > ================================================================== > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Virtuoso-users mailing list > Virtuoso-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/virtuoso-users Find a better answer, faster with the new Yahoo!7 Search. www.yahoo7.com.au/search