db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Segel <de...@segel.com>
Subject Re: keeping the table ordered
Date Tue, 06 Feb 2007 14:09:33 GMT
On Monday 05 February 2007 4:51 pm, Nurullah Akkaya wrote:
> i am using derby in embedded mode.
> i have a table of 100 million records when i do a select i get 600k
> to 1million records table structure is as follows
>
[SNIP]
> 99 percent of the time i select ( above query ) based on the wordId i
> have implemented all the tuning tips in the manual but it stil takes
> so much time( more than a minute ) disk i/o seems to be the bottleneck
> ( no swapping occurs  cpu is idle during select derby uses index)
> what i want to do is keep the tables sorted by wordId so that i can
> avoid random reads and do a sequential read. rigth now insert
> performance is faster than i expected so i can trade some write for
> read is this possible? if this is not possible out of the box can you
> give me some tips as to how can i implement this in to the source code?
>
> Thanks for your time...
>

What exactly are you trying to do?
Based on the little snippet, it looks like this is an exercise to create a 
"google like" search on a series of documents.

The problem is that your wordID, while an integer, is not going to be unique 
enough.

For example, search your documents where the wordID is the integer look up for 
the word "the". 

Do you see the problem?

-- 
--
Michael Segel
Principal 
Michael Segel Consulting Corp.
derby -=-@segel.com
(312) 952-8175 [mobile]

Mime
View raw message