This brief blog post explains that regular expressions are expensive to evaluate regardless of what language you are using them in. The author suggests that if you can avoid using a regular expression in favor of a simpler string computation, then you can likely get much better performance out of your SPARQL engine. Alternative strategies include using CONTAINS, LCASE, UCASE, STRSTARTS, and STRENDS. If more complex string operations are required, full-text extensions to the SPARQL engine may be an option.
Keywords: SPARQL, CONTAINS, String operations, REGEX, Jena Text
Author: Vesse, Rob
Date created: 2014-06-03 04:00:00.000
Time required: P10M
Educational use: instruction
Educational audience: student
Interactivity type: expositive