lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morus Walter <morus.wal...@tanto.de>
Subject Re: why same query different execution time?
Date Fri, 09 Jul 2004 10:04:43 GMT
Hi,

> I execute search with  the same query, on the same index using the same pc 
> an get always different execution time, for example:
> 
> 1st run:
> LuceneItems: Search for : +contents:vasella, Documents found : 121, 
> Documents age : [15.09.04 -10.08.02]
> LuceneItems: Last document retrieved - 39, Search time(ms) - 1362
> 2d run:
> LuceneItems: Search for : +contents:vasella, Documents found : 121, 
> Documents age : [15.09.04 -10.08.02]
> LuceneItems: Last document retrieved - 39, Search time(ms) - 584
> 
The first search reads the index from disk to memory. The second profits
of caching (by the operating system, not by lucene) and thus is faster.
To get the same time you need to make sure that the conditions are equal.
E.g. boot before each test... And it will still slightly differ due to
background processes.

Morus

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message