I started using SPARQL queries on an RDF dataset, and I wanted to know whether there's a difference (time consumption) between SELECT
queries and ASK
queries, given the same constraints.
To be more precise: I don't really need the results but I need just to check if there's data which satisfies my constraints or no;
That is why I'm asking whether it would be better to use ASK
or SELECT
queries (regarding performance).
Since you only need to know if any solution in the endpoint would satisfy the query, ASK
is the verb to use. There are various reasons why some SELECT
queries might return (some) result(s) faster than the parallel ASK
, but overall ASK
will be faster.