Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 89253 invoked from network); 12 Apr 2008 16:29:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Apr 2008 16:29:22 -0000 Received: (qmail 38368 invoked by uid 500); 12 Apr 2008 16:29:21 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 38339 invoked by uid 500); 12 Apr 2008 16:29:21 -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 38328 invoked by uid 99); 12 Apr 2008 16:29:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 09:29:21 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of clfleck@bellsouth.net designates 207.115.11.52 as permitted sender) Received: from [207.115.11.52] (HELO fmailhost01.isp.att.net) (207.115.11.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 16:28:29 +0000 Received: from kyle (adsl-144-254-246.aby.bellsouth.net[70.144.254.246]) by isp.att.net (frfwmhc02) with SMTP id <20080412162848H02004t6fje>; Sat, 12 Apr 2008 16:28:48 +0000 X-Originating-IP: [70.144.254.246] From: "Christopher L. Fleck" To: "'Derby Discussion'" References: <474DCA53.6070704@amberpoint.com> In-Reply-To: Subject: RE: Query Plans Date: Sat, 12 Apr 2008 12:28:04 -0400 Message-ID: <4DF801B4582B4D21AB1B0DAB970C18E7@home.local> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 Thread-Index: Acgx+knPqwSOjKZURLap7hS2FilMzgAAIyMwGq/TZSA= X-Virus-Checked: Checked by ClamAV on apache.org I figured out what my problem is. The query plan isn't displayed until you close the statement. -----Original Message----- From: Christopher L. Fleck [mailto:clfleck@bellsouth.net] Sent: Wednesday, November 28, 2007 3:14 PM To: 'Derby Discussion' Subject: RE: Query Plans Is this not sufficient: private static void printResultSet(ResultSet results) { try { while(results.next()) { for(int i = 1; i <= results.getMetaData().getColumnCount(); i++) { System.out.print(results.getString(i) + "\t"); } System.out.println(); } } catch(SQLException e) { e.printStackTrace(); } } Also, I'm not sure if that would explain why I sometimes get the query plan but not always. With the same query, the query plan may show up or it may not. Thank you for responding, CLF -----Original Message----- From: Bryan Pendleton [mailto:bpendleton@amberpoint.com] Sent: Wednesday, November 28, 2007 3:07 PM To: Derby Discussion Subject: Re: Query Plans > I've got query plan logging enabled in Derby, but, for some reason, I > only see query plans for my selects seemingly at random. Make sure you're fully retrieving all the rows from the result set. I think I remember that query plan logging only occurs at the completion of execution, after all the rows have been fully fetched. thanks, bryan