Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA9DCF38E for ; Thu, 4 Apr 2013 11:47:16 +0000 (UTC) Received: (qmail 46816 invoked by uid 500); 4 Apr 2013 11:47:16 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 46606 invoked by uid 500); 4 Apr 2013 11:47:15 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 46572 invoked by uid 99); 4 Apr 2013 11:47:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 11:47:15 +0000 Date: Thu, 4 Apr 2013 11:47:15 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DERBY-6096) OutOfMemoryError with Clob or Blob hash join: DataTypeDescriptor.estimatedMemoryUsage() has no case for BLOB or CLOB so would underestimate memory usage for those types at zero MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-6096: -------------------------------------- Attachment: less-gc.diff Attaching less-gc.diff which makes a small change in the tests so that they only run System.gc() if the memory statistics are actually going to be printed. (The call to gc() doesn't seem to slow down the test when it's run separately, but I suppose it could take longer if it runs as part of a larger test suite and there's more data on the heap.) Committed revision 1464470. > OutOfMemoryError with Clob or Blob hash join: DataTypeDescriptor.estimatedMemoryUsage() has no case for BLOB or CLOB so would underestimate memory usage for those types at zero > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-6096 > URL: https://issues.apache.org/jira/browse/DERBY-6096 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.3.0, 10.6.2.1, 10.7.1.1, 10.9.1.0, 10.10.1.1, 10.8.3.0 > Reporter: Kathey Marsden > Assignee: Kathey Marsden > Attachments: D6096.java, derby-6096_code_diff.txt, derby-6096_diff2.txt, derby-6096_diff.txt, less-gc.diff, releaseNote.html > > > In discussion on derby-dev regarding how much memory is used for hash joins, Knut noted: > I haven't verified, but I think HashJoinStrategy uses > DataTypeDescriptor.estimatedMemoryUsage() to estimate how much memory > the hash table will consume. That method has no case for BLOB or CLOB, > so it looks as if it will return zero for LOB columns. If that's so, it > will definitely overestimate how many rows fits in maxMemoryPerTable > kilobytes if the rows contain LOBs. > DataTypeDescriptor.estimatedMemoryUsage() should be updated to include BLOB and CLOB and we should try verify if this theory is correct with a reproduction. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira