Hi Timo, Is the performance difference the same following repeat execution of the prepared statement with URI binding ?
it would still worth seeing some pseudo code showing how the prepared statement is being set and the parameters passed to it ? Best Regards Hugh Williams Professional Services OpenLink Software Web: http://www.openlinksw.com Support: http://support.openlinksw.com Forums: http://boards.openlinksw.com/support Twitter: http://twitter.com/OpenLink On 28 Mar 2011, at 15:09, Timo Westkämper wrote: > Hi. > > The problem seems to be more general and not just related to predicates. > > I have for example this query : > > SELECT DISTINCT ?dimension WHERE { ?item ?_c3 ?_c4 , ?_c5 , ?dimension } > > which I transform into the following query > > sparql > SELECT DISTINCT ?dimension WHERE { ?item `iri(??)` `iri(??)` , `iri(??)` , > ?dimension } > > with URI bindings for the three parameters. > > The execution time for this approach is ~ 3s. > > When I create the query instead like this : > > SELECT DISTINCT ?dimension WHERE { ?item <URI1> <URI2> , <URI3> , ?dimension } > > I get an execution time of ~ 1s. > > Does usage of prepared statements for SPARQL cause these issues or maybe > something else? > > Br, > Timo Westkämper > > > On 03/28/2011 12:20 PM, Hugh Williams wrote: >> Hi Timo, >> >> Can you please provide more details on this issue possibly with some pseudo >> code to demonstrate what is being done ? Are you getting the expected >> performance benefits when using prepared statements to bind variables to >> literal values but not when binding variables to predicates, for example ? >> >> Best Regards >> Hugh Williams >> Professional Services >> OpenLink Software >> Web: http://www.openlinksw.com >> Support: http://support.openlinksw.com >> Forums: http://boards.openlinksw.com/support >> Twitter: http://twitter.com/OpenLink >> >> On 28 Mar 2011, at 08:40, Timo Westkämper wrote: >> >>> Hi. >>> >>> I have noticed that when using SPARQL over JDBC as prepared statements I >>> get a huge performance penalty when binding variables acting as >>> predicates via prepared statements. >>> >>> I'd like to bind all node constants via prepared statements. How can I >>> avoid the performance penalty? >>> >>> Br, >>> Timo Westkämper >>> >>> ------------------------------------------------------------------------------ >>> Enable your software for Intel(R) Active Management Technology to meet the >>> growing manageability and security demands of your customers. Businesses >>> are taking advantage of Intel(R) vPro (TM) technology - will your software >>> be a part of the solution? Download the Intel(R) Manageability Checker >>> today! http://p.sf.net/sfu/intel-dev2devmar >>> _______________________________________________ >>> Virtuoso-users mailing list >>> Virtuoso-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users >