db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: Sorting algorithms used in derby
Date Tue, 20 Sep 2011 14:27:26 GMT
> We are working on a project for optimizing sorting algorithms for SSDs using derby.
>
> 1)  It is not very clear how the algorithm is implemented for sorting. Are there any
documents that explain how it is implemented?

I don't know of any Derby-specific documents.

I believe that the basic technique is the one described here:
http://en.wikipedia.org/wiki/External_sorting#External_merge_sort

>
> 2)  does any one know how the files are accessed during externalMergeSort?

I believe that the sorter uses the general Store "conglomerate" library
to manage its temporary files, so the files are accessed in mostly the
same way as other Derby storage files. You can see the creation of a
temporary sort file in the code by looking at the code in

   org.apache.derby.impl.store.access.sort.MergeSort

specifically at the method

   createMergeRun()

thanks,

bryan

Mime
View raw message