Short answer: "depends on the implementation" and "depends on the
query".
Long answer:
* ASK should finish as soon as the first result is ready. This
doesn't mean it's always quick; just that it will be between ~0% and
100% of the execution time of the equivalent SELECT query.
* SELECT is the baseline. Its execution time is proportional to the
complexity of the query, the number of results obtained, and other
factors.
* DESCRIBE is entirely implementation-dependent, but if a node has a
particularly large set of relevant statements, it can be very
expensive indeed.
* Bindings obtained from SELECT are used to evaluated DESCRIBE and
CONSTRUCT (in most cases). This means that most DESCRIBE or CONSTRUCT
queries will take longer than the SELECT query, modulo serializing
the selected results. This is *not* true if you apply ordering
conditions to the SELECT query; they're irrelevant for DESCRIBE and
CONSTRUCT, so CONSTRUCT could actually come out quicker.
As you can see, it's not as simple as you think, and the ratios vary
significantly depending on which language features you use.
Why are you trying to find this out?
-R
On 8 Jan 2008, at 9:04 PM, Ahmad Iqbal wrote:
hi all,
I am wondering, if anybody in this group find out the relative
estimated processing time of SPARQL four contstructs; SELECT, ASK,
DESCRIBE and CONSTRUCT. Although, I know that processing time
varies depending on the complexity of the query (i.e. graph
patterns) and size of the dataset but we can always compare
relative period between the two. Let's say one query with SELECT
construct consumes x msec then the same or similar query with ASK,
DESCRIBE and CONSTRUCT may consume 0.6x, 1.3x and 1.5x msecs
respectively.
Thanks in advance.
--
Ahmad