X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7BD15D1B20D for ; Thu, 8 Jul 2004 21:13:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72711-08 for ; Fri, 9 Jul 2004 00:13:15 +0000 (GMT) Received: from linda-2.paradise.net.nz (bm-2a.paradise.net.nz [202.0.58.21]) by svr1.postgresql.org (Postfix) with ESMTP id 26AF5D1B1A5 for ; Thu, 8 Jul 2004 21:13:11 -0300 (ADT) Received: from smtp-2.paradise.net.nz (smtp-2b.paradise.net.nz [202.0.32.211]) by linda-2.paradise.net.nz (Paradise.net.nz) with ESMTP id <0I0K00MN05Y0W1@linda-2.paradise.net.nz> for pgsql-performance@postgresql.org; Fri, 09 Jul 2004 12:13:13 +1200 (NZST) Received: from coretech.co.nz (218-101-13-113.paradise.net.nz [218.101.13.113]) by smtp-2.paradise.net.nz (Postfix) with ESMTP id 24C9D9E81C; Fri, 09 Jul 2004 12:12:13 +1200 (NZST) Date: Fri, 09 Jul 2004 12:14:32 +1200 From: Mark Kirkwood Subject: Re: Terrible performance after deleting/recreating indexes In-reply-to: <20040708204921.4921.qmail@web51407.mail.yahoo.com> To: Bill Chandler Cc: pgsql-performance@postgresql.org Message-id: <40EDE368.90603@coretech.co.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 References: <20040708204921.4921.qmail@web51407.mail.yahoo.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/41 X-Sequence-Number: 7432 That is interesting - both psql and JDBC merely submit statements for the backend to process, so generally you would expect no difference in execution plan or performance. It might be worth setting "log_statement=true" in postgresql.conf and checking that you are executing *exactly* the same statement in both JDBC and psql. regards Mark P.s : lets see the output from EXPLAIN ANALYZE :-) Bill Chandler wrote: >Thanks for the advice. > >On further review it appears I am only getting this >performance degradation when I run the command via >a JDBC app. If I do the exact same query from >psql, the performance is fine. I've tried both the >JDBC2 and JDBC3 jars. Same results. > > > > > > >