From derby-user-return-9849-apmail-db-derby-user-archive=db.apache.org@db.apache.org Fri Oct 03 09:35:00 2008 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 92861 invoked from network); 3 Oct 2008 09:35:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Oct 2008 09:35:00 -0000 Received: (qmail 25113 invoked by uid 500); 3 Oct 2008 09:34:49 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 25026 invoked by uid 500); 3 Oct 2008 09:34:49 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 24999 invoked by uid 99); 3 Oct 2008 09:34:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2008 02:34:48 -0700 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.21] (HELO gmp-eb-inf-1.sun.com) (192.18.6.21) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2008 09:33:45 +0000 Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12]) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m939YDt1024234 for ; Fri, 3 Oct 2008 09:34:13 GMT Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K8500I01NAQ1L00@fe-emea-09.sun.com> (original mail from Kristian.Waagan@Sun.COM) for derby-user@db.apache.org; Fri, 03 Oct 2008 10:34:13 +0100 (BST) Received: from [129.159.112.237] by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K85008ZNP8PMR90@fe-emea-09.sun.com> for derby-user@db.apache.org; Fri, 03 Oct 2008 10:34:02 +0100 (BST) Date: Fri, 03 Oct 2008 11:33:42 +0200 From: Kristian Waagan Subject: Re: BLOB question In-reply-to: Sender: Kristian.Waagan@Sun.COM To: Derby Discussion Message-id: <48E5E6F6.4070705@Sun.com> Organization: Sun Microsystems Inc. MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; no-NO; rv:1.8.1.16) Gecko/20080825 Lightning/0.8 Thunderbird/2.0.0.16 Mnenhy/0.7.5.0 X-Virus-Checked: Checked by ClamAV on apache.org On 09/30/08 16:23, epdv wrote: > Hello! > > Does BLOB size affect record/database size? I.e., is it a good idea to > create a large BLOB for some big and many small images, or should they > better be stored in separate tables? Hello, As far as I know, the only thing that will happen is that the page size will be set to 32K on table creation when there's a LOB column in the table. Defining a 2 GB BLOB column, which is the default maximum size, will not cause Derby to reserve a huge amount of space. Mixing small and large BLOBs in the same table should be fine (although I don't know the details regarding space allocation/utilization per page). You may run into file size limitations imposed by the file system, so you should think about how much data you need to store in your table. If you first insert and then delete lots of BLOBs, compressing the table might be a good idea to release free space to the OS. If you're having performance problems with the BLOBs, please let us know and include information about the JDBC methods you use to access the BLOBs and which Derby driver you are using. regards, -- Kristian > > Kind regards > > Peter Nabbefeld > > >