Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHvfb-0002zt-4T for pgsql-admin@arkaria.postgresql.org; Tue, 28 Jun 2016 16:15:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bHvfa-0001nd-Jc for pgsql-admin@arkaria.postgresql.org; Tue, 28 Jun 2016 16:15:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bHvfZ-0001nG-Vt for pgsql-admin@postgresql.org; Tue, 28 Jun 2016 16:15:26 +0000 Received: from imx6.etecsa.cu ([200.55.152.141]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHvf9-0000ES-Kk for pgsql-admin@postgresql.org; Tue, 28 Jun 2016 16:15:25 +0000 Received: from nodo1.etecsa.cu (unknown [192.168.91.200]) by imx6.etecsa.cu (Postfix) with ESMTP id 6FCE0EE; Tue, 28 Jun 2016 12:14:49 -0400 (CDT) Received: from webmail.etecsa.cu (unknown [192.168.91.6]) by nodo1.etecsa.cu (Postfix) with ESMTP id 6D871301E4B7; Tue, 28 Jun 2016 12:14:49 -0400 (CDT) Received: from 192.168.207.54 (SquirrelMail authenticated user gilberto.castillo) by webmail.etecsa.cu with HTTP; Tue, 28 Jun 2016 12:15:08 -0500 (GMT+5) Message-ID: <41101.192.168.207.54.1467134108.squirrel@webmail.etecsa.cu> In-Reply-To: References: Date: Tue, 28 Jun 2016 12:15:08 -0500 (GMT+5) Subject: Re: [MASSMAIL]long running delete From: "Gilberto Castillo" To: "Mark Steben" Cc: "pgsql-admin" Reply-To: gilberto.castillo@etecsa.cu User-Agent: SquirrelMail/1.4.8-5.el5_4.10 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 98576 [Jun 28 2016] X-KLMS-AntiSpam-Version: 5.5.9.33 X-KLMS-AntiSpam-Envelope-From: gilberto.castillo@etecsa.cu X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Moebius-Timestamps: 4204021, 4204366, 4204314 X-KLMS-AntiSpam-Info: LuaCore: 476 476 89899cc22e3b764d0555a65546dd60210b35ba41, {msgid_created_by_recepient}, Auth:dkim=none X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, 2016/06/27 20:12:56 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, bases: 2016/06/28 05:45:00 #7698382 X-KLMS-AntiVirus-Status: Clean, skipped X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org > Good morning, > > We have been running a delete for nearly 24 hours now. I would like to > verify that it is either doing what it is supposed to do or 'spinning its > wheels'. > > We are running postgres 9.2.12. > > The delete statement is not waiting on any other transaction. > > I have run straces on the pid and I see lots of 'reads, lseeks, and an > occasional semop. I have also looked in the base directory at the file > matched by the oid of the table (as defined in pg_class) and have seen no > change in size. > > Is there somewhere else I can verify that work is / is not being done? > Perhaps looking for something else in strace? My recomendation, El DELETE es prohibitivo en Cualquier gestor de BD para ello ponga a su concideración dos formas de como mejorar su comportamiento en PostgreSQL --Solución 1 DELETE FROM string s WHERE NOT EXISTS (SELECT 1 FROM data d WHERE d.object_id = s.id OR d.property_id = s.id OR d.value_id = s.id); --Solución 2 (1) CREATE TABLE copia AS SELECT (...) WHERE (...) (2) TRUNCATE en la tabla original. (3) INSERT (...) SELECT (...) --actualizar desde la copia la tabla original (4) DROP TABLE copia. > > Thanks for your time. > > -- > *Mark Steben* > Database Administrator > @utoRevenue | Autobase > > CRM division of Dominion Dealer Solutions > 95D Ashley Ave. > West Springfield, MA 01089 > t: 413.327-3045 > f: 413.383-9567 > > www.fb.com/DominionDealerSolutions > www.twitter.com/DominionDealer > www.drivedominion.com > > > -- Saludos, Gilberto Castillo ETECSA, La Habana, Cuba -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin