X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 38D4AD1B44B for ; Tue, 25 Nov 2003 23:45:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 55083-08 for ; Tue, 25 Nov 2003 19:45:26 -0400 (AST) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by svr1.postgresql.org (Postfix) with ESMTP id B6AC4D1B44A for ; Tue, 25 Nov 2003 19:45:06 -0400 (AST) Received: from potentialtech.com ([68.68.113.33]) by mta11.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031125234513.JPLA1464.mta11.adelphia.net@potentialtech.com>; Tue, 25 Nov 2003 18:45:13 -0500 Message-ID: <3FC3E984.3020508@potentialtech.com> Date: Tue, 25 Nov 2003 18:45:08 -0500 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: schampailler@easynet.be Cc: pgsql-performance@postgresql.org Subject: Re: Impossibly slow DELETEs References: <200311252256.56433.schampailler@easynet.be> In-Reply-To: <200311252256.56433.schampailler@easynet.be> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/260 X-Sequence-Number: 4820 Stefan Champailler wrote: > Dear You all, > > (please tell me if this has already been discussed, I was unable to find any > convincing information) > > I'm developing a small application, tied to a PG 7.4 beta 5 (i didn't > upgrade). The DB i use is roughly 20 tales each of them containing at most 30 > records (I'm still in development). I can provide a whole dump if necessary. > I access the DB throug IODBC (Suse Linux 8.1), through PHP. The machine > everything runs on is 512M of Ram, 2.5GHz speed. So I assume it should be > blazingly fast. > > So here's my trouble : some DELETE statement take up to 1 minute to complete > (but not always, sometimes it's fast, sometimes it's that slow). Here's a > typical one : DELETE FROM response_bool WHERE response_id = '125' > The response_bool table has no foreing key and no index on response_id column. > No foreign key reference the response_bool table. There are 6 rows in the > table (given that size, I assumed that an index was not necessary). > > So 1 minute to complete look like I did something REALLY bad. > > It is my feeling that doing the same query with psql works without problem, > but I can't be sure. I think that last sentence is the crux of the problem. If you can establish for sure that the unreasonable delay is _only_ there when the command is issued through IODBC, then it's not a Postgresql problem. Out of curiosity, why are you using ODBC for PHP anyway? PHP has Postgresql libraries that work very well. I use them quite often without problems. -- Bill Moran Potential Technologies http://www.potentialtech.com