artsoft Active Member Licensed User Longtime User Mar 23, 2021 #1 Hi all! I am currently working with big BLOBs in a SQLite DB. (==> android:targetSdkVersion="30") _________________________________________________________________________ I know that a SQLite DB can be very big: _________________________________________________________________________ And BLOB fields can have the following size: I can save big BLOBs (max. 5 MBytes) in my SQLite DB without any problems. But the reading (selecting) of the BLOBs creates the following exception: android.database.sqlite.SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1 The cause of this exception is the big size of the BLOB in combination with the used CURSOR. The size of the CURSOR is too small to get the Bytes() data from DB. My question: So, how I can increase the limit of the CURSOR in order to read my bytes arrays from DB without any exceptions? Would be nice if somebody could help here Thanks in advance and best regards ARTsoft
Hi all! I am currently working with big BLOBs in a SQLite DB. (==> android:targetSdkVersion="30") _________________________________________________________________________ I know that a SQLite DB can be very big: _________________________________________________________________________ And BLOB fields can have the following size: I can save big BLOBs (max. 5 MBytes) in my SQLite DB without any problems. But the reading (selecting) of the BLOBs creates the following exception: android.database.sqlite.SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1 The cause of this exception is the big size of the BLOB in combination with the used CURSOR. The size of the CURSOR is too small to get the Bytes() data from DB. My question: So, how I can increase the limit of the CURSOR in order to read my bytes arrays from DB without any exceptions? Would be nice if somebody could help here Thanks in advance and best regards ARTsoft
artsoft Active Member Licensed User Longtime User Mar 24, 2021 #21 OliverA said: If no zooming/panning is required, you could also resize the image. I don’t think there are any 4000x3000 phone screens. That’s how iOS does it with their iCloud picture management. The full size is stored on iCloud and a reduced size (appropriate for the phone’s screen) is stored on the phone. Click to expand... Many thanks for this constructive help. I think - as I have already said - that it will be a combination of both: Image resolution and image quality. Best regards ARTsoft Upvote 0
OliverA said: If no zooming/panning is required, you could also resize the image. I don’t think there are any 4000x3000 phone screens. That’s how iOS does it with their iCloud picture management. The full size is stored on iCloud and a reduced size (appropriate for the phone’s screen) is stored on the phone. Click to expand... Many thanks for this constructive help. I think - as I have already said - that it will be a combination of both: Image resolution and image quality. Best regards ARTsoft
E emexes Expert Licensed User Longtime User Mar 24, 2021 #22 artsoft said: I'm really glad that you agree with me for once and support me - instead of making fun of me. Click to expand... Have we met before? ? I don't usually make fun of people, unless I'm in the firing line too. artsoft said: I am very annoyed about the cursor limit. Click to expand... Me too, and I hardly even use SQLite. What the heck are they thinking? You'd reckon they'd at least warn you on the way in that hey, best give your data a big hug because it might be the last you see of it. Upvote 0
artsoft said: I'm really glad that you agree with me for once and support me - instead of making fun of me. Click to expand... Have we met before? ? I don't usually make fun of people, unless I'm in the firing line too. artsoft said: I am very annoyed about the cursor limit. Click to expand... Me too, and I hardly even use SQLite. What the heck are they thinking? You'd reckon they'd at least warn you on the way in that hey, best give your data a big hug because it might be the last you see of it.
artsoft Active Member Licensed User Longtime User Mar 24, 2021 #23 emexes said: Have we met before? ? I don't usually make fun of people, unless I'm in the firing line too. Click to expand... Then I have to say sorry for that and thanks again for your help. Have a nice day. Regards ARTsoft Upvote 0
emexes said: Have we met before? ? I don't usually make fun of people, unless I'm in the firing line too. Click to expand... Then I have to say sorry for that and thanks again for your help. Have a nice day. Regards ARTsoft
artsoft Active Member Licensed User Longtime User Mar 24, 2021 #24 emexes said: Me too, and I hardly even use SQLite. What the heck are they thinking? You'd reckon they'd at least warn you on the way in that hey, best give your data a big hug because it might be the last you see of it. Click to expand... May I ask which DB is your favorite while developing apps for Android? Upvote 0
emexes said: Me too, and I hardly even use SQLite. What the heck are they thinking? You'd reckon they'd at least warn you on the way in that hey, best give your data a big hug because it might be the last you see of it. Click to expand... May I ask which DB is your favorite while developing apps for Android?
E emexes Expert Licensed User Longtime User Mar 24, 2021 #25 artsoft said: May I ask which DB is your favorite while developing apps for Android? Click to expand... I barely use database managers nowadays because I'm mostly just programming for myself ie no multiuser requirement, and my data fits easily within modern phone memory. I dabbled with SQLite a couple of years ago and it seemed ok, plus I understood it to be the default built-in Android database, so that'd make it my favorite. On my regular PC, it's pretty much CSV everywhere. My most-used dataset is a bit over 5 million records and 250 MB. It changes once daily, and takes a few minutes to preprocess into a binary file which then loads from disk straight into memory in 4 seconds (or 0.3 seconds if it's already in the disk caching). Upvote 0
artsoft said: May I ask which DB is your favorite while developing apps for Android? Click to expand... I barely use database managers nowadays because I'm mostly just programming for myself ie no multiuser requirement, and my data fits easily within modern phone memory. I dabbled with SQLite a couple of years ago and it seemed ok, plus I understood it to be the default built-in Android database, so that'd make it my favorite. On my regular PC, it's pretty much CSV everywhere. My most-used dataset is a bit over 5 million records and 250 MB. It changes once daily, and takes a few minutes to preprocess into a binary file which then loads from disk straight into memory in 4 seconds (or 0.3 seconds if it's already in the disk caching).