db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul J DeCoursey <p...@decoursey.net>
Subject Re: keeping the table ordered
Date Tue, 06 Feb 2007 17:39:07 GMT
Nurullah Akkaya wrote:
>> It is not quite clear to me what you are trying to achieve.  Why do 
>> you want a sequential read?  Scanning the entire table of 100 million 
>> records should take longer time than looking up a record using a 
>> index on wordid.  Have you retrieved the query plan and made sure the 
>> index on wordid is used?  Or are you talking about doing a lookup of 
>> many different wordids in sorted order?
> i did not meant sequential scanning of the whole table i meant disk 
> i/o( bottom paragraph explains it )
> yes i checked the query plan and derby uses index to lookup records 
> and index look up checks only two index pages. so i came to the 
> conclusion that most of the time is lost making random i/o request for 
> the data thats why i am trying to keep the table sorted. since 
> sequential hard disk access is much faster than random i/o .

You should probably be looking at Lucene or perhaps Jackrabbit for this 
kind of use case.  Lucene is designed for text indexing and I have found 
it to be very fast and efficient.

View raw message