Re: Blob column behaviour, when we dont have data when having less data
On 12/4/2014 9:57 PM, kosurusekhar wrote: Thanks Mike for quick reply. 2) whether derby will occupy complete 6MB space if I am trying to insert small size files like 512KB or 1MB? *space used will be that of the size of the inserted column plus some metadata overhead/page overhead. * This means that in a 6MB column if I save 512KB content file then it will occupy 6MB + metadata size. Right? no, it will be 512kb plus a relatively small overhead. Is there any provision to space in this kind of scenario ? Thanks Sekhar. -- View this message in context: http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363p143376.html Sent from the Apache Derby Users mailing list archive at Nabble.com. .
Blob column behaviour, when we dont have data when having less data
Hi Folks, We have requirement to store the files in DB, we created a Blob column. As per derby manuals we need to specify the size of the content while creating the column. We have 4 different sizes of files like 200KB, 512KB, 1MB, 6MB some times we don't have any content into this column. If I go with max size 6MB, 1) whether derby will occupy 6MB space for this row even i am not inserting data in to this column? 2) whether derby will occupy complete 6MB space if I am trying to insert small size files like 512KB or 1MB? Please let me know how derby database behaves in this case. I am using Derby (Network server) 10.9 version. Thanks in Advance. Regards Sekhar. -- View this message in context: http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
Re: Blob column behaviour, when we dont have data when having less data
Thanks Mike for quick reply. 2) whether derby will occupy complete 6MB space if I am trying to insert small size files like 512KB or 1MB? *space used will be that of the size of the inserted column plus some metadata overhead/page overhead. * This means that in a 6MB column if I save 512KB content file then it will occupy 6MB + metadata size. Right? Is there any provision to space in this kind of scenario ? Thanks Sekhar. -- View this message in context: http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363p143376.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
Re: Blob column behaviour, when we dont have data when having less data
Derby uses only as much space as the size of your BLOB. The DDL for size of BLOB column is the maximum BLOB you can store. On 5 December 2014 at 06:57, kosurusekhar kosurusek...@gmail.com wrote: Thanks Mike for quick reply. 2) whether derby will occupy complete 6MB space if I am trying to insert small size files like 512KB or 1MB? *space used will be that of the size of the inserted column plus some metadata overhead/page overhead. * This means that in a 6MB column if I save 512KB content file then it will occupy 6MB + metadata size. Right? Is there any provision to space in this kind of scenario ? Thanks Sekhar. -- View this message in context: http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363p143376.html Sent from the Apache Derby Users mailing list archive at Nabble.com. -- Peter Ondruška
Re: Blob column behaviour, when we dont have data when having less data
Sekhar, you asked, This means that in a 6MB column if I save 512KB content file then it will occupy 6MB + metadata size. Right?. I think the answer is no. The size will be 512KB+metadata size. Mike, please correct me if I am wrong. On Thu, Dec 4, 2014 at 10:10 PM, Peter Ondruška peter.ondru...@kaibo.eu wrote: Derby uses only as much space as the size of your BLOB. The DDL for size of BLOB column is the maximum BLOB you can store. On 5 December 2014 at 06:57, kosurusekhar kosurusek...@gmail.com wrote: Thanks Mike for quick reply. 2) whether derby will occupy complete 6MB space if I am trying to insert small size files like 512KB or 1MB? *space used will be that of the size of the inserted column plus some metadata overhead/page overhead. * This means that in a 6MB column if I save 512KB content file then it will occupy 6MB + metadata size. Right? Is there any provision to space in this kind of scenario ? Thanks Sekhar. -- View this message in context: http://apache-database.10148.n7.nabble.com/Blob-column-behaviour-when-we-dont-have-data-when-having-less-data-tp143363p143376.html Sent from the Apache Derby Users mailing list archive at Nabble.com. -- Peter Ondruška