X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 566BF5E46CE for ; Thu, 19 Aug 2004 15:03:11 -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 30043-01 for ; Thu, 19 Aug 2004 18:03:05 +0000 (GMT) Received: from mail.3gstech.com (ns1.mcdownloads.com [216.239.132.98]) by svr1.postgresql.org (Postfix) with ESMTP id 5177F5E46C1 for ; Thu, 19 Aug 2004 15:03:05 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.3gstech.com (Postfix) with ESMTP id 0DE8C9E7B23 for ; Thu, 19 Aug 2004 11:03:04 -0700 (PDT) Received: from mail.3gstech.com ([127.0.0.1]) by localhost (fungus [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11196-09 for ; Thu, 19 Aug 2004 11:03:04 -0700 (PDT) Received: from [216.239.128.141] (daniel.omnis.com [216.239.128.141]) by mail.3gstech.com (Postfix) with ESMTP id EB5F99E7B14 for ; Thu, 19 Aug 2004 11:03:03 -0700 (PDT) Message-ID: <4124EB58.9040102@sh.nu> Date: Thu, 19 Aug 2004 11:03:04 -0700 From: Daniel Ceregatti User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040716 MultiZilla/1.6.3.1a X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: What is the best way to do attribute/values? X-Enigmail-Version: 0.84.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/328 X-Sequence-Number: 7964 Hi list, I have a database with 1M "people" in it. Each person has about 20 attributes, such as height, weight, eye color, etc. I need to be able to search for people based on these attributes. A search can be conducted on one attribute, all attributes, or any number in between. How would _you_ do this? I have already attempted to answer this. My attempts are detailed here: http://sh.nu/email.txt This is the email I was originally going to send to this list. Since it's so large, I decided to link to it instead. If you feel that it belongs in a post to the list, let me know, and I'll post again. I've discussed these attempts with people in #postgresql on irc.freenode.net. Agliodbs (I presume you know who this is) was very helpful, but in end was at a loss. I find myself in the same postition at this time. He suggested I contact this list. My ultimate goal is performance. This _must_ be fast. And by fast, I mean, < 1 second, for every permutation of the number of attributes searched for. Flexibility would be a bonus, but at this point I'll settle for something that's harder to maintain if I can get the speed gain I need. Thanks, Daniel Ceregatti