There are all sorts of possibilities.  First off, it's not unlikely
that a 2+GB file is simply larger than Android and the Android
implementation of Sqlite can handle.  2147483647 is the largest signed
value that can be expressed in a 4-byte integer, and arithmetic with
numbers on that scale is apt to experience "overflow" issues that
confuse compare operations, etc.

Additionally, if the database is not declared up front to be read-
only, Sqlite may make copies of pages as it operates, and will almost
definitely create a "journal" of what it's doing.  This could occupy
enough additional space to "blow" the size of the SD card if it's not
at least (I would guess) 4GB.  And in doing the sort of query
described Sqlite will need considerable working storage, which could
blow the SD card size limit.

Plus there could simply be a bug in the Android "disk" access logic
when confronted with the intense "disk" activity this query would
generate.

On Jan 14, 8:24 am, Menion <[email protected]> wrote:
> Hi,
>   this was already discussed here, but I have another problem with
> database search.
>
> I'm testing on one big database, more then 2GB (stored on SD card of
> course) with around 1 million of rows in table 'tiles'. Database
> contain X, Y, Z coordinates as INT (map index) and byte[] image data.
>
> database is created with this SQLite string which cannot be changed!
> CREATE TABLE tiles (x INTEGER,y INTEGER,z INTEGER,s INTEGER,image
> BYTE, PRIMARY KEY (x, y, z, s));
>
> And all I want is to get all available Z values in database like by
> this
> SELECT DISTINCT z FROM tiles
>
> But after around 5 minutes of loading (time isn't problem here) logcat
> return
>   android.database.sqlite.SQLiteDiskIOException: disk I/O error
>
> have you please any tip how to solve this??

-- 
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

Reply via email to