Interrupted queries - partial results?
Tuesday, 19 April 2022 · 7 messages · last reply 22 Apr 2022
ZD
How about some custom logging?
for $i in (1 to 10)
return
if ($i = 4) then error()
else file:append-text-lines('C:\tmp\file',string($i))There might be more sophisticated ways.
Daniel
Quoted text · Patrick Durusau · 18 lines
-----Ursprüngliche Nachricht----- Von: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> Im Auftrag von Patrick Durusau Gesendet: Dienstag, 19. April 2022 16:45 An: basex-talk at mailman.uni-konstanz.de Betreff: [basex-talk] Interrupted queries - partial results? Greetings! Is it possible to capture partial results from an interrupted query? When I realize a query is taking too long for the data involved, it might be helpful in correcting the mistake. Thanks! Patrick -- Patrick Durusau patrick at durusau.net Technical Advisory Board, OASIS (TAB) Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) Another Word For It (blog): http://tm.durusau.net Homepage: http://www.durusau.net Twitter: patrickDurusau
PD
Patrick Durusau19 Apr 2022 18:45 #
Greetings!
Is it possible to capture partial results from an interrupted query?
When I realize a query is taking too long for the data involved, it might be helpful in correcting the mistake.
Thanks!
Patrick
--
Patrick Durusau
patrick at durusau.net
Technical Advisory Board, OASIS (TAB)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
Another Word For It (blog): http://tm.durusau.net
Homepage: http://www.durusau.net
Twitter: patrickDurusau
PD
Thanks!
That should do it!
Patrick
Quoted text · Daniel · 38 lines
On 4/19/22 11:40, Zimmel, Daniel wrote: > How about some custom logging? > > for $i in (1 to 10) > return > if ($i = 4) then error() > else file:append-text-lines('C:\tmp\file',string($i)) > > There might be more sophisticated ways. > > Daniel > > -----Ursprüngliche Nachricht----- > Von: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> Im Auftrag von Patrick Durusau > Gesendet: Dienstag, 19. April 2022 16:45 > An: basex-talk at mailman.uni-konstanz.de > Betreff: [basex-talk] Interrupted queries - partial results? > > Greetings! > > Is it possible to capture partial results from an interrupted query? > > When I realize a query is taking too long for the data involved, it might be helpful in correcting the mistake. > > Thanks! > > Patrick > > -- > Patrick Durusau > patrick at durusau.net > Technical Advisory Board, OASIS (TAB) > Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) > > Another Word For It (blog): http://tm.durusau.net > Homepage: http://www.durusau.net > Twitter: patrickDurusau >
--
Patrick Durusau
patrick at durusau.net
Technical Advisory Board, OASIS (TAB)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
Another Word For It (blog): http://tm.durusau.net
Homepage: http://www.durusau.net
Twitter: patrickDurusau
CG
Christian Grün20 Apr 2022 09:58 #
Quoted text · Patrick Durusau · 1 line
> > Is it possible to capture partial results from an interrupted query?
Thanks for the suggestion, Patrick; it’s not the first time we got this request.
If you use BaseX on command line, results will be returned as soon as they are available. In the GUI, all results are cached before they are presented to the user. Maybe we can pass on the incomplete cache to the result view if a query is interrupted; I’ll have more thoughts on that.
As another alternative to Daniel’s solution, prof:dump and
fn:trace can be used to output results at runtime to the Info View:for $i in 1 to 1000000000
where $i mod 10000000 = 0
return trace($i)Quoted text · Patrick Durusau · 57 lines
On Wed, Apr 20, 2022 at 1:45 AM Patrick Durusau <patrick at durusau.net> wrote: > > Thanks! > > That should do it! > > Patrick > > On 4/19/22 11:40, Zimmel, Daniel wrote: > > How about some custom logging? > > > > for $i in (1 to 10) > > return > > if ($i = 4) then error() > > else file:append-text-lines('C:\tmp\file',string($i)) > > > > There might be more sophisticated ways. > > > > Daniel > > > > -----Ursprüngliche Nachricht----- > > Von: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> Im Auftrag von Patrick Durusau > > Gesendet: Dienstag, 19. April 2022 16:45 > > An: basex-talk at mailman.uni-konstanz.de > > Betreff: [basex-talk] Interrupted queries - partial results? > > > > Greetings! > > > > Is it possible to capture partial results from an interrupted query? > > > > When I realize a query is taking too long for the data involved, it might be helpful in correcting the mistake. > > > > Thanks! > > > > Patrick > > > > -- > > Patrick Durusau > > patrick at durusau.net > > Technical Advisory Board, OASIS (TAB) > > Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) > > > > Another Word For It (blog): http://tm.durusau.net > > Homepage: http://www.durusau.net > > Twitter: patrickDurusau > > > -- > Patrick Durusau > patrick at durusau.net > Technical Advisory Board, OASIS (TAB) > Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 > Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) > > Another Word For It (blog): http://tm.durusau.net > Homepage: http://www.durusau.net > Twitter: patrickDurusau >
PD
Patrick Durusau20 Apr 2022 23:03 #
Thanks Christian!
Patrick
Quoted text · Christian Grün · 76 lines
On 4/20/22 03:58, Christian Grün wrote: >>> Is it possible to capture partial results from an interrupted query? > Thanks for the suggestion, Patrick; it’s not the first time we got this request. > > If you use BaseX on command line, results will be returned as soon as > they are available. In the GUI, all results are cached before they are > presented to the user. Maybe we can pass on the incomplete cache to > the result view if a query is interrupted; I’ll have more thoughts on > that. > > As another alternative to Daniel’s solution, prof:dump and fn:trace > can be used to output results at runtime to the Info View: > > for $i in 1 to 1000000000 > where $i mod 10000000 = 0 > return trace($i) > > > > > On Wed, Apr 20, 2022 at 1:45 AM Patrick Durusau <patrick at durusau.net> wrote: >> Thanks! >> >> That should do it! >> >> Patrick >> >> On 4/19/22 11:40, Zimmel, Daniel wrote: >>> How about some custom logging? >>> >>> for $i in (1 to 10) >>> return >>> if ($i = 4) then error() >>> else file:append-text-lines('C:\tmp\file',string($i)) >>> >>> There might be more sophisticated ways. >>> >>> Daniel >>> >>> -----Ursprüngliche Nachricht----- >>> Von: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> Im Auftrag von Patrick Durusau >>> Gesendet: Dienstag, 19. April 2022 16:45 >>> An: basex-talk at mailman.uni-konstanz.de >>> Betreff: [basex-talk] Interrupted queries - partial results? >>> >>> Greetings! >>> >>> Is it possible to capture partial results from an interrupted query? >>> >>> When I realize a query is taking too long for the data involved, it might be helpful in correcting the mistake. >>> >>> Thanks! >>> >>> Patrick >>> >>> -- >>> Patrick Durusau >>> patrick at durusau.net >>> Technical Advisory Board, OASIS (TAB) >>> Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) >>> >>> Another Word For It (blog): http://tm.durusau.net >>> Homepage: http://www.durusau.net >>> Twitter: patrickDurusau >>> >> -- >> Patrick Durusau >> patrick at durusau.net >> Technical Advisory Board, OASIS (TAB) >> Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 >> Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) >> >> Another Word For It (blog): http://tm.durusau.net >> Homepage: http://www.durusau.net >> Twitter: patrickDurusau >>
--
Patrick Durusau
patrick at durusau.net
Technical Advisory Board, OASIS (TAB)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
Another Word For It (blog): http://tm.durusau.net
Homepage: http://www.durusau.net
Twitter: patrickDurusau
CG
Query execution in the GUI has been revised [1]: With BaseX 10, partial results and additional query information will be displayed if a query is interrupted or cannot be successfully completed. A new snapshot is online [2].
[1] https://github.com/BaseXdb/basex/issues/2089
[2] https://files.basex.org/releases/latest-10/
Quoted text · Christian Grün · 80 lines
On Wed, Apr 20, 2022 at 9:58 AM Christian Grün <christian.gruen at gmail.com> wrote: > > > > Is it possible to capture partial results from an interrupted query? > > Thanks for the suggestion, Patrick; it’s not the first time we got this request. > > If you use BaseX on command line, results will be returned as soon as > they are available. In the GUI, all results are cached before they are > presented to the user. Maybe we can pass on the incomplete cache to > the result view if a query is interrupted; I’ll have more thoughts on > that. > > As another alternative to Daniel’s solution, prof:dump and fn:trace > can be used to output results at runtime to the Info View: > > for $i in 1 to 1000000000 > where $i mod 10000000 = 0 > return trace($i) > > > > > On Wed, Apr 20, 2022 at 1:45 AM Patrick Durusau <patrick at durusau.net> wrote: > > > > Thanks! > > > > That should do it! > > > > Patrick > > > > On 4/19/22 11:40, Zimmel, Daniel wrote: > > > How about some custom logging? > > > > > > for $i in (1 to 10) > > > return > > > if ($i = 4) then error() > > > else file:append-text-lines('C:\tmp\file',string($i)) > > > > > > There might be more sophisticated ways. > > > > > > Daniel > > > > > > -----Ursprüngliche Nachricht----- > > > Von: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> Im Auftrag von Patrick Durusau > > > Gesendet: Dienstag, 19. April 2022 16:45 > > > An: basex-talk at mailman.uni-konstanz.de > > > Betreff: [basex-talk] Interrupted queries - partial results? > > > > > > Greetings! > > > > > > Is it possible to capture partial results from an interrupted query? > > > > > > When I realize a query is taking too long for the data involved, it might be helpful in correcting the mistake. > > > > > > Thanks! > > > > > > Patrick > > > > > > -- > > > Patrick Durusau > > > patrick at durusau.net > > > Technical Advisory Board, OASIS (TAB) > > > Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) > > > > > > Another Word For It (blog): http://tm.durusau.net > > > Homepage: http://www.durusau.net > > > Twitter: patrickDurusau > > > > > -- > > Patrick Durusau > > patrick at durusau.net > > Technical Advisory Board, OASIS (TAB) > > Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 > > Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) > > > > Another Word For It (blog): http://tm.durusau.net > > Homepage: http://www.durusau.net > > Twitter: patrickDurusau > >
PD
Patrick Durusau22 Apr 2022 00:56 #
Thanks!
Sorry for the slow response, head down writing/editing.
Patrick
Quoted text · Christian Grün · 88 lines
On 4/21/22 05:42, Christian Grün wrote: > Query execution in the GUI has been revised [1]: With BaseX 10, > partial results and additional query information will be displayed if > a query is interrupted or cannot be successfully completed. A new > snapshot is online [2]. > > [1] https://github.com/BaseXdb/basex/issues/2089 > [2] https://files.basex.org/releases/latest-10/ > > > > On Wed, Apr 20, 2022 at 9:58 AM Christian Grün > <christian.gruen at gmail.com> wrote: >>>> Is it possible to capture partial results from an interrupted query? >> Thanks for the suggestion, Patrick; it’s not the first time we got this request. >> >> If you use BaseX on command line, results will be returned as soon as >> they are available. In the GUI, all results are cached before they are >> presented to the user. Maybe we can pass on the incomplete cache to >> the result view if a query is interrupted; I’ll have more thoughts on >> that. >> >> As another alternative to Daniel’s solution, prof:dump and fn:trace >> can be used to output results at runtime to the Info View: >> >> for $i in 1 to 1000000000 >> where $i mod 10000000 = 0 >> return trace($i) >> >> >> >> >> On Wed, Apr 20, 2022 at 1:45 AM Patrick Durusau <patrick at durusau.net> wrote: >>> Thanks! >>> >>> That should do it! >>> >>> Patrick >>> >>> On 4/19/22 11:40, Zimmel, Daniel wrote: >>>> How about some custom logging? >>>> >>>> for $i in (1 to 10) >>>> return >>>> if ($i = 4) then error() >>>> else file:append-text-lines('C:\tmp\file',string($i)) >>>> >>>> There might be more sophisticated ways. >>>> >>>> Daniel >>>> >>>> -----Ursprüngliche Nachricht----- >>>> Von: BaseX-Talk <basex-talk-bounces at mailman.uni-konstanz.de> Im Auftrag von Patrick Durusau >>>> Gesendet: Dienstag, 19. April 2022 16:45 >>>> An: basex-talk at mailman.uni-konstanz.de >>>> Betreff: [basex-talk] Interrupted queries - partial results? >>>> >>>> Greetings! >>>> >>>> Is it possible to capture partial results from an interrupted query? >>>> >>>> When I realize a query is taking too long for the data involved, it might be helpful in correcting the mistake. >>>> >>>> Thanks! >>>> >>>> Patrick >>>> >>>> -- >>>> Patrick Durusau >>>> patrick at durusau.net >>>> Technical Advisory Board, OASIS (TAB) >>>> Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) >>>> >>>> Another Word For It (blog): http://tm.durusau.net >>>> Homepage: http://www.durusau.net >>>> Twitter: patrickDurusau >>>> >>> -- >>> Patrick Durusau >>> patrick at durusau.net >>> Technical Advisory Board, OASIS (TAB) >>> Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 >>> Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) >>> >>> Another Word For It (blog): http://tm.durusau.net >>> Homepage: http://www.durusau.net >>> Twitter: patrickDurusau >>>
--
Patrick Durusau
patrick at durusau.net
Technical Advisory Board, OASIS (TAB)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
Another Word For It (blog): http://tm.durusau.net
Homepage: http://www.durusau.net
Twitter: patrickDurusau
Written for BaseX 9.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery