query execution time

Hi,

I have this very simple query:

declare namespace ft=“http://www.w3.org/2002/04/xquery-operators-text
for $a in input()/EN_RECURSO_HUMANO
where ft:text-contains($a/@NME_RH, “Newton”)
return

{$a/@NME_RH}
{$a/@NRO_ID_CNPQ}

When I change the search term, I get different execution times, as expected. This times vary from less than half a second to almost 10 seconds (example: “Newton” - 0.45s, "Jos

Hi,

Just a short question. How big are the result sets for the two search terms?

Best Regards,

Thorsten Fiebig

Hi,

In the example above, I have the following sizes:

“Newton” – 704 files matching the search condition
“Jos

Hi,

My guess is that the different response times are caused by the different result sizes. Especially if you are using the Tamino Interactive Interface running on the same machine as Tamino the query performance is getting very low for big query results.
This is caused by the fact that a lot of CPU power is spent by the Internet Explorer on rendering the result.
You can verify the effect of the result size on the query performance by just retrieving the first item of each result set, via a position range query.
The according query to retrieve the first “Newton” result item looks like this:

declare namespace ft=“http://www.w3.org/2002/04/xquery-operators-text
(
for $a in input()/EN_RECURSO_HUMANO
where ft:text-contains($a/@NME_RH, “Newton”)
return

{$a/@NME_RH}
{$a/@NRO_ID_CNPQ}

)
[position() = 1]

Best Regards,

Thorsten Fiebig

Hi,

Thank you for your answer.

I could not test your suggestion using the Tamino Interactive Interface because when I try to execute queries that return large result set I get the following error:

<ino:message ino:returnvalue=“9238”>
<ino:messagetext ino:code=“INOXYE9238”>Internal database error has occurred</ino:messagetext>
</ino:message>

For small result sets the query works fine. (I will try to find what this error means later…)

Nevertheless I agree that this difference in query execution times may be related with result set size because all the tests I made have the same behaviour (large result set: more time, small result: less time under 1s) .

For the test I used Tamino API for .NET. The code executed in the server works like this:

  • connect to DB
  • take start time
  • execute query
  • take end time
  • compute execution time (end time – start time)
  • prepare output
  • disconnect from DB

The client (web browser) is executed using other computer.

I think the time measured like this is not affected by the rendering in the browser. May be there are other factors involved.

Thank you,
JN