Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-14 Thread Hugh Williams
Hi Robert, We are working on a new open source snapshot build we can provide to you which may improve performance somewhat although no guarantees as the order by will always result in a full table scan first to order it then limit the results. What datasets do you have loaded in your store, is

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-13 Thread Robert Globisch
Hi Hugh, thank you! There seems to be no noticeable decrease of execution time when i use this ORDER BY clause. In the meantime I did some further tests. It seems to me like the ORDER BY clause causes this massive performance slowdowns. When i use the following query without the ORDER BY cla

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-13 Thread Hugh Williams
Hi Robert, Development suggest the query: sparql PREFIX dc: select distinct ?title ?u from WHERE { ?prog dc:title ?title . ?u rdfs:label ?label . FILTER (bif:isnotnull (bif:strstr (?label, ?title))) } ORDER BY DESC ((select ?created where {

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Robbet
Hi Ivan, i'll try this. My whole query would be like: /Select ?title ?label v Where {?s dc:title ?title; dc:created ?created./ // /?dbpedia rdfs:label ?label FILTER (bif:strcontains (?title, ?label))/ /?dbpedia foaf:name ?name }

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Ivan Mikhailov
On Fri, 2011-06-10 at 02:10 +0200, Robbet wrote: > Hi Ivan, > > thank you! Looks gut ... > > First one seems to work as a Sparql query. > > "syntax error at bif:strstr before ( " > > FILTER ( BOUND(bif:strstr (?label, ?title) ) > > But it works without the BOUND keyword. I'm sorry, there sho

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Robbet
Hi, yes, i confirm both values. Best regards, Robert On 10.06.2011 04:02, Hugh Williams wrote: Hi Robbet, What are your actual NumberOfBuffers and MaXDirtyBuffer settings for your 4GB memory system, I presume those recommended in the Virtuoso Performance Tuning guide at: http://v

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Hugh Williams
Hi Robbet, What are your actual NumberOfBuffers and MaXDirtyBuffer settings for your 4GB memory system, I presume those recommended in the Virtuoso Performance Tuning guide at: http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtRDFPerformanceTuning Which are: NumberOf

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Kingsley Idehen
On 6/10/11 1:28 AM, Robbet wrote: Hi Kingsley, changed NumberofBuffers and MaxDirtyBuffer to 4GB recommendation. Did i miss something? Dunno if it's only rely in the given hardware or if my query causes the slowdowns. If after doing that you don't have improvements. We are down to DBMS size a

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Robbet
Hi Kingsley, changed NumberofBuffers and MaxDirtyBuffer to 4GB recommendation. Did i miss something? Dunno if it's only rely in the given hardware or if my query causes the slowdowns. Best regards, Robert On 10.06.2011 02:20, Kingsley Idehen wrote: On 6/10/11 1:10 AM, Robbet wrote: Hi Iv

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Kingsley Idehen
On 6/10/11 1:10 AM, Robbet wrote: Hi Ivan, thank you! Looks gut ... First one seems to work as a Sparql query. "syntax error at bif:strstr before (" FILTER ( BOUND(bif:strstr (?label, ?title) ) But it works without the BOUND keyword. I'm new to Virtuoso and SQL / SPARQL environment and t

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-10 Thread Robbet
Hi Ivan, thank you! Looks gut ... First one seems to work as a Sparql query. "syntax error at bif:strstr before ( " FILTER ( BOUND(bif:strstr (?label, ?title) ) But it works without the BOUND keyword. I'm new to Virtuoso and SQL / SPARQL environment and try to compare small buch of trip

Re: [Virtuoso-users] bif:contains - using a string variable as search term

2011-06-09 Thread Ivan Mikhailov
Robert, bif:strstr (?haystack, ?needle) will return an zero-based position of of ?needle in ?haystack, or NULL if not found [1]. Thus FILTER (BOUND (bif:strstr (?haystack, ?needle))) is what you need. For similar future needs, note FILTER (BOUND (bif:strcasestr (?haystack, ?needle))) Recent v

[Virtuoso-users] bif:contains - using a string variable as search term

2011-06-09 Thread Robbet
Hello, actually i'm trying to find a solution to compare two string variables (exact match of the string and if one variable contains the other). Is it possible (in any way) to use the bif:contains function in this case? Like /variable1 bif:contains variable2/ (or the other way round) ? Alr