Why does not indexing improve X-query performance?

Hi,

We have two different X-queries:

/BIND-Submit[/BIND-Submit/BIND-Submit_interactions/BIND-Interaction-set/BIND-Interaction-set_interactions/BIND-Interaction/BIND-Interaction_a/BIND-object/BIND-object_short-label=‘105D_C’]/@ino:id

and

/BIND-Submit[/BIND-Submit/BIND-Submit_interactions/BIND-Interaction-set/BIND-Interaction-set_interactions/BIND-Interaction/BIND-Interaction_descr/BIND-descr/BIND-descr_simple-descr~=‘103D_B’]/@ino:id

In the first query the BIND-object_short-label field is indexed (or it should be indexed). In the latter query the BIND-descr_simple-descr field is not indexed.

For some reason the response time for both queries is same (about 4 min 45 seconds which is unbelievable high). It thus seems that the indexing does not take any effect. Someting wrong with indexing?

Any other ideas?

Thanks in advance,
Erno
bindSchema.tsd (687 KB)

Hi,

I am not sure that the query

/BIND-Submit[/BIND-Submit/BIND-Submit_interactions/BIND-Interaction-set/BIND-Interaction-set_interactions/BIND-Interaction/BIND-Interaction_a/BIND-object/BIND-object_short-label=‘105D_C’]/@ino:id

does really reflect what you want. maybe the following is intended instead:

/BIND-Submit[BIND-Submit_interactions/BIND-Interaction-set/BIND-Interaction-set_interactions/BIND-Interaction/BIND-Interaction_a/BIND-object/BIND-object_short-label=‘105D_C’]/@ino:id

The original query would basically select all documents if there is one document matching the condition.

Maybe this helps

Regards

Harald

Hello everybody,

I also tested the query you Harald proposed but it does not seem to optimize the response time considerably even though the search algortihm of that query should be more optimal. Anyway thanks for the tip!

I still think that there are some problems with indexing. In the attachment of my original message there is a schema. Could some one check that the indexing is made correctly in the schema?

Hello,

I found out a solution to this problem. I was using a “=” operand which caused that the indexing did not taky effect. Now I am using a “~=” operand and the query is very fast.

Regards,
Erno