Optimize SPARQL queries.