X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id DB351D1CA01 for ; Tue, 18 Nov 2003 10:17:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 99565-03 for ; Tue, 18 Nov 2003 06:17:13 -0400 (AST) Received: from woodfire (ip-a1-37118.keycomm.it [62.152.37.118]) by svr1.postgresql.org (Postfix) with ESMTP id E837CD1B50F for ; Tue, 18 Nov 2003 06:17:08 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by woodfire (Postfix) with ESMTP id D1054318; Tue, 18 Nov 2003 12:19:38 +0100 (CET) Received: from woodfire ([127.0.0.1]) by localhost (woodfire [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04149-08; Tue, 18 Nov 2003 12:19:31 +0100 (CET) Received: from osts (unknown [192.168.100.27]) by woodfire (Postfix) with ESMTP id 90B42179; Tue, 18 Nov 2003 12:19:31 +0100 (CET) Subject: Re: Multicolum index and primary key From: Michele Bendazzoli To: Tomasz Myrta In-Reply-To: <3FB9019C.7040402@klaster.net> References: <1069088432.8338.16.camel@mickymouse.sintel> <1069086197.77562.12.camel@jester> <1069092026.8338.52.camel@mickymouse.sintel> <3FB9019C.7040402@klaster.net> Content-Type: text/plain; charset=iso-8859-2 Organization: Micky Mouse Message-Id: <1069154662.8336.64.camel@mickymouse.sintel> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 18 Nov 2003 12:24:23 +0100 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at sintelnet.it X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/210 X-Sequence-Number: 16025 On Mon, 2003-11-17 at 18:13, Tomasz Myrta wrote: > Dnia 2003-11-17 19:00, Użytkownik Michele Bendazzoli napisał: > > a is always present in the queries ... and other that (a, ab, abc) i > > have only to query (ac): so I think I have to index separately only > > (ac). > > For such cases consider changing primary key from (a,b,c) into (a,c,b) b,c are exactly simmetric, so if I change the primary key to (a,c,b) I have to index separately (a,b) ... rigth? ciao, Michele