The query:
for $i in (1 to 500000)
return $i
In GUI: 200ms
In PHP: 25sec.
it is because of the result size, is it?
23.07.2018, 12:24, "Ветошкин Владимир" <en-tra...@yandex.ru>:
Probably, it's because of the result size (~1.5mb).When I reduce the count of the returning data - execution time decreases.The php-code of measuring execution time:$time_start = microtime(true);while ($query->more()) {$q = $query->next();}$time_end = microtime(true);$execution_time = ($time_end - $time_start);echo $execution_time;I'll try to do this:>> you could e.g. write a little self-contained XQuery _expression_ that creates data of the same size.23.07.2018, 11:53, "Christian Grün" <christian.gr...@gmail.com>:One thing puzzles me. Why does the same query take different execution time in GUI and PHP ?
In GUI - 2.5-3sec, in PHP - 8-10sec.
There are too many factors that influence execution time (bandwidth,
result size, etc.), so you will need to provide us with more
information, such as a minimized code example that demonstrates your
observations. Instead of providing your original data, you could e.g.
write a little self-contained XQuery _expression_ that creates data of
the same size.--С уважением,Ветошкин Владимир Владимирович
--
С уважением,
Ветошкин Владимир Владимирович