Re: Indexing

Sergey Didenko <[email protected]>
Newsgroups gmane.comp.java.prevayler
Message-ID <[email protected]>
Hi Peter,
just declare dedicated members in your RootObject ( or in other data object
).

If you make your reads through the Queries, HashMaps are ok. If you read
RootObject directly, use ConcurrentHashMap ( and remember to synchronize in
your reads and writes ).


simplified example:

class RootObject {
...
   private Map<Long, Book> bookIndex = new HashMap<Long, Book>();
...
   Long addBook( Book book ) {
       Long newId = generateNextBookId();
       book.setId( newId );
       bookIndex.put( newId, book);
   }
...
}

P.S. And please send/ publish you results when you have them.

On Thu, Aug 6, 2009 at 1:35 PM, Khayundi, Peter <[email protected]> wrote:

> Hi Klaus
>
> Thank you for replying my mail. I have been using Prevayler to conduct some
> comparison tests with other databases. My comparisons involve the ability of
> different databases to perform standard operations such as adding objects,
> querying, updating and deleting. I would now like to compare the performance
> of these databases when indexing is introduced. Please provide me with any
> information on how Prevayler handles indexing.
>
> Peter
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.