Dear All,
I am developing an application using Jena along with TDB store. I have loaded around 4 million triples in my store. A small subset of my triples is as follows: <http://mycompany/ontolgy/ext/#AD> <http://mycompany/ontology#name> "AD" . <http://mycompany/ontolgy/ext/#AD> <http://mycompany/ontology#type> "category" . <http://mycompany/ontolgy/ext/#AD1003> <http://mycompany/ontology#name> "AD100" . <http://mycompany/ontolgy/ext/#AD1003> <http://mycompany/ontology#type> "product" . <http://mycompany/ontolgy/ext/#AD1003> <http://mycompany/ontology#belongsTo> <http://mycompany/ontolgy/ext/#AD> . <http://mycompany/ontolgy/ext/#light1> <http://mycompany/ontology#name> "Light" . <http://mycompany/ontolgy/ext/#light1> <http://mycompany/ontology#type> "item" . <http://mycompany/ontolgy/ext/#light1> <http://mycompany/ontology#belongsTo> <http://mycompany/ontolgy/ext/#AD1003> . <http://mycompany/ontolgy/ext/#light1> <http://mycompany/ontology#value> "42.5833" . Now I want to do a free text matching for autosuggest kind functionality. I have got this query to run against my store PREFIX gs: <http://mycompany/ontolgy/ext/#>\n\n PREFIX vs: <http://mycompany/ontology#>\n\n SELECT ?subjectName WHERE { ?subject vs:name ?subjectName FILTER regex(?subjectName, \"^Light\", \"i\") } LIMIT 10 I this query I am trying to find triples which start with a particular word, i.e starting with 'Light'. Execution of this query is taking around 20 seconds. I am using jena core 2.7, jena arq 2.9 and jena tdb 0.9. Need help in figuring out how can this be optimized. Thanks in advance. Regards Kunal _____ No virus found in this message. Checked by AVG - www.avg.com Version: 2012.0.1913 / Virus Database: 2411/4946 - Release Date: 04/19/12