Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 78390 invoked from network); 13 Jun 2008 22:14:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jun 2008 22:14:09 -0000 Received: (qmail 79319 invoked by uid 500); 13 Jun 2008 22:14:11 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 79104 invoked by uid 500); 13 Jun 2008 22:14:11 -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 79093 invoked by uid 99); 13 Jun 2008 22:14:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jun 2008 15:14:11 -0700 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [32.97.182.141] (HELO e1.ny.us.ibm.com) (32.97.182.141) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jun 2008 22:13:20 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e1.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id m5DMDY1i028895 for ; Fri, 13 Jun 2008 18:13:34 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m5DMDXwj229680 for ; Fri, 13 Jun 2008 18:13:34 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m5DMDXae018547 for ; Fri, 13 Jun 2008 18:13:33 -0400 Received: from [127.0.0.1] (IBM-7DEEBD4F66E.usca.ibm.com [9.72.133.117]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m5DMDW7h018513 for ; Fri, 13 Jun 2008 18:13:33 -0400 Message-ID: <4852F15F.6080607@sbcglobal.net> Date: Fri, 13 Jun 2008 15:14:55 -0700 From: Kathey Marsden User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: Advice in debugging plan selection References: <4852B309.6050102@sbcglobal.net> <4852C450.8060405@gmail.com> In-Reply-To: <4852C450.8060405@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Army wrote: > > If you're in a situation where you have to use printlns, you may want > to start by printing out the contents of the bestJoinOrder array in > OptimizerImpl in two places: 1) at the end of rememberBestCost(), and > 2) at the end of modifyAccessPaths(). The former tells you every time > the OptimizerImpl thinks it has found a new "best join order" thus far > in processing, the latter tells you what the OptimizerImpl's _final_ > choice of "best join order" was. If you print out the cost of the > join orders (bestCost) as well, and then compare the results from a > "fail" plan and a "pass" plan, that might give you an indication of > where to start. But as I said, there's no silver bullet in tracking > that kind of thing down... > Well I finally got the printlns with the failing and passing runs. It seemed much less likely to happen once I put them in, but eventually I got a hit, but I don't think I am understanding what I am seeing. I expected to see large costs with the failing run. But I think I messed up and printed the current cost instead of the best cost, so I will try to print that out too and see what happens. Kathey