Is a database really the right thing at all? Generally a dictionary has very special/optimized look up (see for example the latin dictionary) and you are going to be able to get much much better space usage and lookup performance by having a dedicated data structure rather than relying on a very general-purpose SQL database. Especially if your database is fixed contents (not user editable), a database seems like significant overkill to me.
On Wed, Sep 2, 2009 at 9:47 AM, mjc147 <[email protected]> wrote: > > Its a bilingual dictionary. The source data is a 2.5MB flat file once > compressed. The database stores this data plus some tables to assist > lookups. Most of the size comes from the db indexes. > > I've just done some more tests and I see that after removing the > indexes the db size is more like 40MB (the indexes can be created > pretty quickly on the device). > > And I originally forgot about compression which reduces the size to > almost a third the original. So the options are now: > > 1. 15MB database download then build indexes on the device > 2. 2.5MB flat file download then perform the lengthy insert statements > - maybe I can get this down well below the 3 hours estimate but I > don't know... > > Would a 15MB download be too unreasonable? > > On Sep 3, 12:30 am, Gavin Aiken <[email protected]> wrote: > > Does the data NEED to be on the device? Can it not reside on a server? > > Certainly you are better to manage the synchonisation yourself rather > than > > bundle the 120MB lib for downloading through the marketplace. This sort > of > > download needs to be resumable and I would recommend users only download > > with a Wifi connection. > > > > What sort of data is this?! It would have to be incredible to justify > that > > size to most users, I think with a 3 hour install you have lost 99% of > the > > user base without even knowing if the app is any good. > > > > Gav > > > > > > > > On Wed, Sep 2, 2009 at 4:47 PM, mjc147 <[email protected]> wrote: > > > > > I need to insert approximately one million rows of data (spread over 4 > > > tables) - each row has one or two numeric fields, and two or three > > > text fields (normally quite short). Single-column indexes on all the > > > fields. > > > > > After doing some tests on the emulator with a small test set, I > > > extrapolated (assuming the last row will be inserted with a similar > > > speed to the first row) my results to figure out that this would take > > > about 15 hours (I have a Core 2 Duo running Vista). > > > > > However, then I tried running the small test set on my Hero and I was > > > surprised to see it run more than four times faster. I would guess it > > > would take about 3 hours on the Hero. > > > > > Alternatively, I could make the pre-populated database available as a > > > download on the first run but this is likely to be a 120MB download. > > > > > I have a few questions I'm hoping someone can help me with: > > > > > 1. SQLite performance on the actual device being 4-5 times faster > > > compared to the emulator - is this normal/expected? > > > 2. Do the figures above generally sound fast/slow/normal (sorry this > > > is so vague)? > > > 3. From a user perspective - would it be best to provide a 120MB > > > download or a 3 hour "first-time initialisation" step (plus 6MB > > > download)? > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

