Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 65313 invoked from network); 10 Mar 2010 00:42:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Mar 2010 00:42:14 -0000 Received: (qmail 84897 invoked by uid 500); 10 Mar 2010 00:41:45 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 84876 invoked by uid 500); 10 Mar 2010 00:41:45 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 84867 invoked by uid 99); 10 Mar 2010 00:41:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Mar 2010 00:41:45 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of patricioe@gmail.com designates 209.85.160.42 as permitted sender) Received: from [209.85.160.42] (HELO mail-pw0-f42.google.com) (209.85.160.42) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Mar 2010 00:41:44 +0000 Received: by pwi10 with SMTP id 10so3740161pwi.1 for ; Tue, 09 Mar 2010 16:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=OiBqpamCe7rMlaAbYbwKkFSiufJEO9gEAkTlfhGy8YU=; b=TT9FDPIGfEPKZb+vBao7YkthBAANi3Fu4Y02SRHDHdU7LZtKajJB0BNY77pa33COtD BKxeg0DbbiwML9zcG6sf+4QwupMezqx/7MLZGmWjh0pcEt1HPLtrUsHbOQrAxXnyNOW7 2/AjqYjub9dmLAw+x4Wl07oZwTm8Dt/0bhHfs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=B+q5MFnSHTdNYlzEWfhbpiIRzXtVzAPiiNBfJbX0tQY3TNLrlX4uVwaKTxkZJJQbUl WytSI1oC3Yk7R8cLQVb45Z/sSSgzQTtbI1c+u4zHoou5BERlUPk3j8QvJid2FJk/BKYE 0SERlhSLh2NM3cOrdgB/JUKCJXpGb9TjXn/+s= MIME-Version: 1.0 Received: by 10.140.58.7 with SMTP id g7mr239139rva.37.1268181683770; Tue, 09 Mar 2010 16:41:23 -0800 (PST) Date: Tue, 9 Mar 2010 16:41:23 -0800 Message-ID: <4ab7f8471003091641n5f983c1au5aee861048e11010@mail.gmail.com> Subject: Help to improve this SQL2 query From: =?ISO-8859-1?Q?Patricio_Echag=FCe?= To: users@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=001636b2ac50c596f10481678e3c --001636b2ac50c596f10481678e3c Content-Type: text/plain; charset=ISO-8859-1 Hi all, I'm running this query in my repository with 5k users (nodes) where everyone has one Application node and each application has 4 Folder nodes. root | (I have here some system folder to keep only 2k users ) | user 1 .......... user 5000 \ application \ --------------- \ \ \ \ F1 F2 F3 F4 For some reason the query (1) executes really fast vs the second one that executes 20 times slower. I'm worried because the repository is almost empty and this query shold be running as fast as (1). (1) executed in 0.06 s. (SELECT * FROM [scrat:app] AS nodeType WHERE nodeType.vparentid = 'd93c442a-2096-444a-9b6c-e52ffd4d88b5' AND nodeType.[jcr:name] = 'Email') (2) executed in 1.14 s. (SELECT * FROM [myapp:folder] AS nodeType WHERE nodeType.vparentid = 'da392a3b-949c-4542-a75b-283664547878' AND nodeType.[jcr:name] = 'Inbox') My caches are by default. BundleCache in PM is 128 MB (seems ok). I'm running against Cassandra which is extremely fast. Am I doing something wrong? May someone suggest any way to speed it up? thanks in advance -- Patricio.- --001636b2ac50c596f10481678e3c--