Sunday, October 11, 2009

JODB (Java Objects Database) for Android (3) with reduced TestIndex benchmark

While creating and running the TestIndex for JODB I've discovered a few things.
  • Search operations are slow, and scale with the amount of records that is present in the database, so if it tok 2 seconds to get 10 distinct records with 100 records it will take 200 seconds with 10000, which are the number of records currently used in the TestIndex test. So large record-sets are not a good idea.
  • It seems to use a very little amount of memory, but when searching goes as it goes, that doesn't really help that much when things take as much time as it does.
  • As mentioned before it only supports primitives as indexes, so one really can't do a full TestIndex test.
As search operations was so costly I though I run a very reduced test with 100 records just to see how all of the other database management systems (DBMS).


As we see search operations are costly, my guess to why they are so costly is the way that JODB interacts with files on the system. I think that it do a lot of input/output (IO) operations when it does it's search operations. From what I gathered from looking in the source code it uses a FileChannel object to access its database files, which just reads or writes on a specific part of a file. So when doing a search operation it will read through the file until it finds the "part" (Record) that we are interested in. This would also explain why it use so little memory when it is running.



Perst
SQLite
DB4O
BerkeleyDB
JODB
Insert
106
586
278
354
2183
Search
48
889
989
334
31021
Iterate
14
36
238
192
718
Delete
115
498
415
465
1011

3 comments:

  1. Java Object Database File interact with file on the System. It is concern more with Input/Output operation when it is working on search operation. Apart from that JODF is using more memory as compared to other database terminology.

    ReplyDelete
  2. you have nice site. thanks for sharing this site. various kinds of ebooks are available here

    http://feboook.blogspot.com

    ReplyDelete
  3. Hi Tord,

    You have done a great job in benchmarking for different databases for Android. Really great job

    Can you please mention which one is the best space-wise???

    Looking for the answer....

    Regards,

    Jawwad Farooq

    jawwad.farooq@gmail.com

    ReplyDelete