Alexander Kabanov <alexander.kaba...@...> writes:

> > On Tue, Nov 10, 2009 at 6:22 PM, Alexander Kabanov <alexander.kabanov-
> Q1//5lscmZ4 <at> public.gmane.org> wrote:I have a query (that works) 
returning a 
> sequence of nodes. I need to wrap
> > those up in a top-level node (to use xsltproc on them). The query itself
> > is very fast - almost immediate on my machine. However, when I try to wrap 
> this
> > query up in an element constructor, it becomes very slow - it can take up 
to 
> 40
> > minutes. So to be more specific, let's say a I have a working FLWOR query. 
> Then
> > FLWOR-query-text
> > executes very quickly, but
> > <Top>{ FLWOR-query-text }</Top> takes ages.
> > This also happens if I put the query inside a function
> > declare local:query_function(...) as element()*
> > the call
> > local:query_function(...)
> > is fast
> > but
> > <Top>{ local:query_function(...)  }</Top>
> > is really slow. What am I doing wrong?
> > ---------------------------------------------------------------------------


OK, I think I know what's going on. This has nothing to do with top-level 
wrapping, it is just a very slow query. I was originally running this query as 

se_term <arguments> | less

and since less doesn't parse the entire input at once, this created an illusion 
of fast execution. If I just run

se_term <arguments>

with the original query, it's slow again.
 
So this isn't really a Sedna issue, I just need to learn to write better 
queries. Sorry to bother everyone.





------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Reply via email to