Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxFOF-0003GL-7H for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Oct 2016 15:36:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bxFOE-00083D-QX for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Oct 2016 15:36:18 +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 1bxFMq-0005ZP-5J for pgsql-hackers@postgresql.org; Thu, 20 Oct 2016 15:34:52 +0000 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bxFMm-0008QF-Gg for pgsql-hackers@postgresql.org; Thu, 20 Oct 2016 15:34:50 +0000 Received: by mail-lf0-x235.google.com with SMTP id x79so94728266lff.0 for ; Thu, 20 Oct 2016 08:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=aBcH8Fw7IyhkMwyc7ClyNKGrKIH7OwTs6yhzZWSzcA0=; b=ZhEi+lhwpWZQG/AvoHh+FA8rhm9+KaVGR//5Y0nfDftIhRPGl7Sq8uiIEPp38jQ1Zv hBTe/oAD2W1N3dLz8f/TULt4m1O/aQzL4JzY487mhh/h2+061uTPA8ULrK9fmgUDPbM4 AAlrDSCZQXY7AiDN5uXY6Y4f9G7GVOX04iFapNhQBP40htILG/gJbBVVnrwu0/KQGVXy kAVi5S0Hh0UqB8T4dxZ65+0Urx8FmnG55Fziv/xpCMrvO74laFsivjp+M4jwqGJOv9a/ Y2xYgpNgp2yntWj3IJ6IsZVKOog5Fh/XjvIbEfSw9EZ95QnmM2TW+ooZTovTVKOHb11W nZqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=aBcH8Fw7IyhkMwyc7ClyNKGrKIH7OwTs6yhzZWSzcA0=; b=EZsxTp08SUcrMhAQj+kOR5OS0EGETNMIIIBp5tfCD1torGn7C67Qweh8ZDeOvPu/N/ DGmk1A7K5dIjO49TyxcEhf7N3+3EXBQBRlcO8LV/AfjhCmf6ED8zq6iVQkkVNDY1OImY 1KPDA/aBY3+sUe0YBt9ZdYCVAirnaX/3EXuzBb4taXSpTViFLQlbKuiGe+yuyPSN9W9E JWm2BtpXSsbJFEkDr1nzwa4qIR5YBWtimwQVNFNnHs9siXonfkyV19w/Ea0MZD5A5BOD I8Xecm+uU7LlOgeTyx9RF7FH9a0QtZ7WiQuCzOr4G2EXKjR/2ksSRCUjbTmihcJRAg41 TW0Q== X-Gm-Message-State: AA6/9RlDzIdwjolJR+zPb720U03LkZXiv8Ppt8SyFpJjt8E/dBAwkkVSoR9p6Mt0aCbwl1nvw4ww+uXM2siziNyXdmQuxNw6sXtp9SzGQ9lh3ZTWhoGHiUR5VQNrXDGackXBXbJ/Ty2eMpQy8y0W9SQ25JJq2TbVfFYvrYG4QYLjMmH5hrVQLc6bWJ03ITfR+Q== X-Received: by 10.25.67.29 with SMTP id q29mr297320lfa.22.1476977685618; Thu, 20 Oct 2016 08:34:45 -0700 (PDT) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id e70sm12467152lji.30.2016.10.20.08.34.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 08:34:44 -0700 (PDT) Subject: Re: Indirect indexes To: Bruce Momjian References: <20161018182843.xczrxsa2yd47pnru@alvherre.pgsql> <20161019164043.GN5087@momjian.us> <20161019170416.GR5087@momjian.us> <20161020122937.GA28621@momjian.us> <13500012-c20a-1fc4-5a57-054c9aeb4e25@2ndquadrant.com> <20161020152440.GB18972@momjian.us> Cc: Simon Riggs , Pavan Deolasee , Alexander Korotkov , Robert Haas , Alvaro Herrera , Pg Hackers From: Petr Jelinek Message-ID: Date: Thu, 20 Oct 2016 17:34:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161020152440.GB18972@momjian.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 20/10/16 17:24, Bruce Momjian wrote: > On Thu, Oct 20, 2016 at 05:14:51PM +0200, Petr Jelinek wrote: >>> Also, it seems indirect indexes would be useful for indexing columns >>> that are not updated frequently on tables that are updated frequently, >>> and whose primary key is not updated frequently. That's quite a logic >>> problem for users to understand. >>> >> >> Which covers like 99.9% of problematic cases I see on daily basis. >> >> And by that logic we should not have indexes at all, they are not >> automatically created and user needs to think about if they need them or >> not. > > Do you have to resort to extreme statements to make your point? The use > of indexes is clear to most users, while the use of indirect indexes > would not be, as I stated earlier. > Not extreme statement just pointing flaw in that logic. People need to understand same limitation for example when using most of current trigger-based replication systems as they don't support pkey updates. And no, many users don't know when to use indexes and which one is most appropriate even though indexes have been here for decades. The fact that some feature is not useful for everybody never stopped us from adding it before, especially when it can be extremely useful to some. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers