X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 989D65281C; Thu, 2 Jun 2005 10:00:32 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94692-01; Thu, 2 Jun 2005 13:00:23 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id 0758C5289D; Thu, 2 Jun 2005 10:00:20 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 26893415684; Thu, 2 Jun 2005 14:00:14 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id A438415F0F; Thu, 2 Jun 2005 13:56:01 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27244-09; Thu, 2 Jun 2005 13:55:56 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 2D9B815ED9; Thu, 2 Jun 2005 13:40:54 +0100 (BST) Message-ID: <429EFE55.3050601@archonet.com> Date: Thu, 02 Jun 2005 13:40:53 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?K=D6PFERL_Robert?= Cc: "'dpandey@secf.com'" , pgsql-general@postgresql.org, 'PostgreSQL' Subject: Re: [SQL] index row size 2728 exceeds btree maximum, 27 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.053 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/92 X-Sequence-Number: 78800 K=D6PFERL Robert wrote: > To me it seems that the definer of this table missed the concept index = =2E.. > or the concept database > One usually looks up data using a key, but if the whole row is the key,= what > data shall be looked up. > So short story long: Remove data from your index. The data column seem= s > like the data to be looked up using the key=20 > (scan_id, host_ip, port_num, plugin_id, severity) or even less. > Postgres is able to take several indices over distinct columns into acc= ount. > Thus reducing the possible candidates to a hand full. > So several indices are also an option Actually, Dinesh didn't mention he was using this for the speed of=20 lookup. He'd defined the columns as being the PRIMARY KEY, presumably=20 because he feels they are/should be unique. Given that they are rows=20 from a logfile, I'm not convinced this is the case. --=20 Richard Huxton Archonet Ltd