How optimize queries?

Hi:

I need optimize queries in Tamino 2.2.1.9.
I have seen queries can be optimized changing the order of the “and” queries.

Response time is increased when soluction set is bigger, although the result only include the ten first.
Can i make Tamino do not store all the respone set on buffer pool?

My principal problem is in “and” querys:
When i have the query:
“a=1 and b=2"
“a=1” set has about 10 docs
"b=2” set has about 9,000,000 docs
The result time is very big, i think it is because Tamino compares both sets (and both are stored in Buffer Pool).
Can i make Tamino process “b=2” over “a=1” set?

where can i see some information about Tamino query engine architecture?

Thanks and regards.

Hi,

I tested search time in Tamino 2.3.1.1 on NT. Tamino client was in Tamino DOM API. I had 10.000 docs. The more documents were the longer the search time was. Time “TaminoClient.query(…)” was from 3s for 30 docs to 9s for 10000 docs. Your base has about 1.000 docs more and that’s why your search time might be 1000 times longer.

Maybe first you should try to make a query (a=1)in the whole database and then make the query (b=2) in the results area.

I suppose Tamino query structure (in Java DOM API)is like the description of logic statements in C++.

Leszek Andrzejczak

Hi:

Thanks for your response Leszek.

Can Tamino query to a result of other query without return the result of the first query or i have to program the second query (b=2) in some API?

Thanks and regards.

If i dont misunderstood your problem, your query looks like 'SomePath[a=1 and b=2]. If so, this might help:
SAG support told me that filter expressions are processed from the right, so changing it to [b=2 and a=1] should optimize your query (if the result set for a=1 is that much smaller).

Tom

You could also see whether it makes a difference to write xx[a=1][b=2] versus xx[b=2][a=1]. I’ve no idea whether it will, but it might be worth experimenting.

Obviously the performance will depend on whether the fields a and b are indexed - I don’t think you specified this in your question.