progress of query execution

Sunday, 27 May 2018 · 2 messages · last reply 29 May 2018
ВВ
Ветошкин Владимир27 May 2018 13:11 #
Hi, everybody! My core has written in php and php-script execute xquery-scripts to get needed data. To get the progress of one large query I have to divide it into some small ones. Isn't it? Are there any more options? Maybe it is possible to get number of seconds, which needed to complete execution of query?
-- С уважением, Ветошкин Владимир Владимирович
CG
Christian Grün29 May 2018 11:10 #
Hi Владимир (which is your first name I guess?),
Quoted text · Ветошкин Владимир · 2 lines
> My core has written in php and php-script execute xquery-scripts to get needed data. > To get the progress of one large query I have to divide it into some small ones. Isn't it?
Exactly. You can pass on additional arguments (start, end) to the server and return only the requested results:
  let $result := ...
  return $result[position() = $start to $end]
Additionally, you can try to reduce the size of the returned data if your PHP client does not require the full result.
Quoted text · Ветошкин Владимир · 1 line
> Maybe it is possible to get number of seconds, which needed to complete execution of query?
For assessing the total execution time, the full query must be evaluated. There can be various reasons why query execution is too slow in practice. Could you give us more information on your use case? Do you e.g. have a web site, and your users want to see the first results more quickly? Or is your connection bandwidth limited? Yours respectfully, Christian

⚡Generated with XQuery