Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2drs-0004NA-Ab for pgsql-performance@arkaria.postgresql.org; Mon, 24 Apr 2017 13:17:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d2drr-00056O-TP for pgsql-performance@arkaria.postgresql.org; Mon, 24 Apr 2017 13:17:27 +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 1d2drr-00053o-0X for pgsql-performance@postgresql.org; Mon, 24 Apr 2017 13:17:27 +0000 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d2dro-0002ck-Iz for pgsql-performance@postgresql.org; Mon, 24 Apr 2017 13:17:26 +0000 Received: by mail-wr0-x22d.google.com with SMTP id l50so17667082wrc.3 for ; Mon, 24 Apr 2017 06:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=7wuvirQdT1J5+ePmR58XE8cfEfTEwELwMEf7aEQGQPY=; b=FcrQNEyUf9DQsXrS0hW8nwdPUc8jov8AcPkyy9fKQ5q25hzB9bQmxmcjbJ74xVpLhE oHvyOrvB3fYSgRj7nDLQN6RV5oxQKzjUGEpLqI8bhnvgnxtQ6UUklisvKpBilEsDVZWD AK7byMlx7f6nk2FCIPsvYCWW0MlY/FBDZ83LhKK+aGK5nptXNAL1s92WEwEF4fQbzw61 0J3SLEDOsvbec7uHb6SCIgDKfVn66FWi4nt9r4b5IFvrZurUVWFSFGIoT1jFOWVTm5i6 zI7Ld/WlE+t1jg5WbFRtTwh4t+cKzSur42OqHjh2lt0iwS+Bywwfzkkx/YyN/g6BwIZW WEGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=7wuvirQdT1J5+ePmR58XE8cfEfTEwELwMEf7aEQGQPY=; b=MoHfM1opbSlwaIl3nnuKGsVd8P64x7ERnu7GbPWcySzFaQ+oXszC+D/LtFGr4xUOXD uWxDKj1oNpvzmJCt7HGEb5RAT2ujpmDYXi2y9C6KnOIfaA3ON51brQOVxieK4fTiSwV8 vwR2i8xMxXUNkFls7iUVX6AGSG5F83awX7iMY2rWAcLGTx/KlGXu46kIZ792c/K2zzN9 mNQreyMdJytZY/YhbfHlwC+GOsFrqCnVaWwX6vy/4JEAfrdpuPcvqCyDj8gNqq6TO4ZE D9/Gw2hKZdEkN4b9k2yW13hLNoZh3z5AyPpTXEbtUE1urAqJFUG/ZwcyYDozM1C41WSR Km+g== X-Gm-Message-State: AN3rC/5Ew5A6yi7BCQ5j/HB+/5gSI7NaMbZFvRiNU1gA4kZ71tGvfBqm MKg/1b0dceZDijYeIDNNF9DH+ZMHcOcU/16Rcvd81PPwz/7BPOlx1Cp20KuXRxffS47tFfCXfYz 0TrUO7Geh7QaXeiHonUBuHZL2fIMXybizKKKU/APKViZBUFfAkwam2LBpjHAVf+f0jxAnGRjRgH 80UDxIQjM= X-Received: by 10.223.151.150 with SMTP id s22mr6618738wrb.123.1493039842151; Mon, 24 Apr 2017 06:17:22 -0700 (PDT) Received: from [10.137.2.17] (ip-89-177-46-65.net.upcbroadband.cz. [89.177.46.65]) by smtp.gmail.com with ESMTPSA id 21sm22380766wrb.55.2017.04.24.06.17.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Apr 2017 06:17:21 -0700 (PDT) Subject: Re: Delete, foreign key, index usage To: pgsql-performance@postgresql.org References: From: Tomas Vondra Message-ID: <54e42679-7ec5-b097-db7b-f04c9abfc3c6@2ndquadrant.com> Date: Mon, 24 Apr 2017 15:17:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 04/24/2017 08:48 AM, Johann Spies wrote: > > Why would the planner prefer the use the gin index and not the btree > index in this case? > You'll need to show what queries are you running - that's a quite important piece of information, and I don't see it anywhere in this thread. Seeing explain plans would also be helpful. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance