Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ag0NS-0000RS-HU for pgsql-sql@arkaria.postgresql.org; Wed, 16 Mar 2016 01:35:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ag0NR-00032U-UV for pgsql-sql@arkaria.postgresql.org; Wed, 16 Mar 2016 01:35:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ag0MT-0001ty-4O for pgsql-sql@postgresql.org; Wed, 16 Mar 2016 01:34:57 +0000 Received: from mailout01.ims-firmen.de ([213.174.32.96]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ag0MQ-0001Au-CZ for pgsql-sql@postgresql.org; Wed, 16 Mar 2016 01:34:55 +0000 Received: from mailin03.ims-firmen.de ([192.168.1.143]) by mailout01.ims-firmen.de with esmtp (envelope-from ) id 1ag0MO-0002zO-io; Wed, 16 Mar 2016 02:34:52 +0100 Received: from [213.174.32.191] (helo=oxweb01.ims-firmen.de) by mailin03.ims-firmen.de with esmtpsa (TLSv1:RC4-MD5:128) (envelope-from ) id 1ag0MO-0005lS-94; Wed, 16 Mar 2016 02:34:52 +0100 Date: Wed, 16 Mar 2016 02:34:52 +0100 (CET) From: Andreas Kretschmer Reply-To: Andreas Kretschmer To: "David G. Johnston" Cc: ivo liondov , "pgsql-sql@postgresql.org" Message-ID: <62238924.9201.1458092092795.JavaMail.open-xchange@oxweb01.ims-firmen.de> In-Reply-To: References: <503958962.9182.1458090747344.JavaMail.open-xchange@oxweb01.ims-firmen.de> Subject: Re: delete taking long time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.6.2-Rev12 X-Originating-Client: com.openexchange.ox.gui.dhtml X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org > > Given the lack of indexes on the one table that is shown I suspect this is > the most likely cause (FK + indexes) > right, there should be an index on ts. If it is a 9.5 AND the rows are ordered on ts a BRIN-index would be fine. If not - a normal index. How many rows contains the table? -- Andreas Kretschmer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql