X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E27ADD1B8B1 for ; Fri, 29 Aug 2003 14:00:27 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 26389-03 for ; Fri, 29 Aug 2003 11:00:21 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id DEE02D1B8AC for ; Fri, 29 Aug 2003 11:00:15 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7TE0EjX015993; Fri, 29 Aug 2003 10:00:14 -0400 (EDT) To: "Alexander Priem" Cc: "Tomasz Myrta" , pgsql-performance@postgresql.org Subject: Re: Indexing question In-reply-to: <01bf01c36e0d$18769280$b696a8c0@APR> References: <012f01c36dfa$0f4a8760$b696a8c0@APR> <3F4EFAB6.7030104@klaster.net> <015f01c36e02$134fe960$b696a8c0@APR> <3F4F07CE.6090803@klaster.net> <018c01c36e09$4893e980$b696a8c0@APR> <3F4F1575.8090600@klaster.net> <01bf01c36e0d$18769280$b696a8c0@APR> Comments: In-reply-to "Alexander Priem" message dated "Fri, 29 Aug 2003 11:08:21 +0200" Date: Fri, 29 Aug 2003 10:00:14 -0400 Message-ID: <15992.1062165614@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/491 X-Sequence-Number: 3307 "Alexander Priem" writes: > Does anyone know whether it is bad practise to have two indexes on the > primary key of a table? (one 'primary key' index and one partial index) It's a little unusual, but if you get enough performance boost from it to justify the maintenance cost of the extra index, then I can't see anything wrong with it. The "if" is worth checking though. I missed the start of this thread, but what percentage of your rows do you expect to have null deleteddate? Unless it's a pretty small percentage, I'm unconvinced that the extra indexes will be worth their cost. regards, tom lane