From dev-return-35280-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Mon Jun 11 09:39:44 2012 Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-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 8FA1AC323 for ; Mon, 11 Jun 2012 09:39:44 +0000 (UTC) Received: (qmail 1291 invoked by uid 500); 11 Jun 2012 09:39:44 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 1254 invoked by uid 500); 11 Jun 2012 09:39:44 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 1021 invoked by uid 99); 11 Jun 2012 09:39:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2012 09:39:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 67162142863 for ; Mon, 11 Jun 2012 09:39:43 +0000 (UTC) Date: Mon, 11 Jun 2012 09:39:43 +0000 (UTC) From: "P.C.Sun (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1903831083.2382.1339407583424.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1474751625.2007.1339389162629.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (JCR-3333) The binary file entities are stored twice in the DB 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/JCR-3333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292714#comment-13292714 ] P.C.Sun commented on JCR-3333: ------------------------------ Hey Thomas, Pls let me know the possibility and risk of upgrading the jackrabbit. i'm confirming the version liferay is using. Thx. > The binary file entities are stored twice in the DB > --------------------------------------------------- > > Key: JCR-3333 > URL: https://issues.apache.org/jira/browse/JCR-3333 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: JCR 2.0 > Environment: Windows 7, Linux > Reporter: P.C.Sun > Attachments: repository.xml > > > We are using JCR in Liferay to store documents, which means all documents store in DB in binary. As these days, we found the size of DB is increasing very fast. So we run the SQL to get size of documents. The SQLs are like: > 1. select sum(size_) from dlfileentry(liferay table to store file meta data, such as name, size); -> All documents size recorded in dlentry table: > The result is: 43330765874, which means around 40.36 GB > 2. The DB size report is: around 95.97 GB. > 3. Within these tables, there are two very big tables: > j_pm_liferay_binval -> 52.07GB > j_v_pm_binval -> 43.65 GB > So the question is: if the document itself is only around 40.36 GB, what are those two tables storing? From the table itself, they are the all binval tables...Does it mean every document is stored twice or something. What's inside those tables? > In this case, the DB increase around 30 GB within 3 months, really fast, any suggestion to improve this? > As replied from Liferay: the table j_v_pm_binaval is to store the file version. However, for the new document, it's also stored, which we think it should be created only when a new version is generated. They also mentioned to solve this we need to change repository.xml, however, we don't have the answer how to deal with the old files, whether they will get lost if we change the config file. > Please let me know whether it is possible to clean them in DB? > Thank you very much and looking forwards to your reply. > Best Regards. > P.C.(JACK) SUN -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira