Foundations for committing a graph including sparql queries for fast literal indexing