Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGk40-0004UO-Jb for pgsql-general@arkaria.postgresql.org; Mon, 20 Nov 2017 11:16:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eGk3z-0001me-NA for pgsql-general@arkaria.postgresql.org; Mon, 20 Nov 2017 11:16:31 +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 1eGk3y-0001lr-OM for pgsql-general@postgresql.org; Mon, 20 Nov 2017 11:16:30 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eGk3s-0005I0-Ot for pgsql-general@postgresql.org; Mon, 20 Nov 2017 11:16:29 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 794CB988B819 for ; Mon, 20 Nov 2017 04:16:22 -0700 (MST) Date: Mon, 20 Nov 2017 04:16:22 -0700 (MST) From: legrand legrand To: pgsql-general@postgresql.org Message-ID: <1511176582453-0.post@n3.nabble.com> In-Reply-To: <1511161692.2567.5.camel@cybertec.at> References: <1511161692.2567.5.camel@cybertec.at> Subject: Re: Query Using Massive Temp Space MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Hi, there are many Hash and Merge joins that may generate a lot of temp space, it could also be a problem of forgotten column in the join. Could you also provide indexes definitions (pk, uk and others) with the EXPLAIN (ANALYZE BUFFERS) (you can limit the scope of the query to help it to finish by limiting the number of lines from candidates by ... *FROM match_candidate_address WHERE account_id NOT IN (:exclude_ids) limit 100 * ) Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general