Re: [bdbxml] indeces are not used in LET clauses of a FLWOR expression

John Snelson <[email protected]>
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
Indexes are indeed used in let and return statements. You might want to 
read a series of blog entries I have been writing about indexing in DB XML:

http://blog.parthenoncomputing.com/dbxml/archives/discussion/index.html

Also, you can use the "queryplan" comand in the dbxml shell (called 
"dmxml.exe") to look at which indexes would be used during the execution 
of your query.

If you send the query you are using and the output from the "queryplan" 
command to the list, I can help you understand which indexes are being 
used, and why.

John

Kotopoulos wrote:
> I found out than when calculating an FLWOR expression indeces are only used for
> the computation of For and not for Let or even Return clauses. 
> 
> I am trying to refrace my query in order to use only For clauses but it is
> somewhat difficult because I want to group some values. 
> 
> Does anybody know how can I persuade the query planer to use an index then
> calculating a let expression?
> 
> Or, If somebody knows how can I group a set of documents on an attribute
> 
> For example two documents to be aggregated might look like this:
> 
> doc1:
> <doc>
>    <id>id1</id>
>    <rank>0.5</rank>
> </doc>
> 
> doc2:
> <doc>
>    <id>id1</id>
>    <rank>1</rank>
> </doc>
> 
> I want group this set of documents on id and sum the rank.
> The documents are produced dynamically from a For clause where indeces are used.


------------------------------------------
To remove yourself from this list, send an
email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.