X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E770652AE8 for ; Fri, 8 Jul 2005 17:55:12 -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 56535-06 for ; Fri, 8 Jul 2005 20:55:03 +0000 (GMT) Received: from web32515.mail.mud.yahoo.com (web32515.mail.mud.yahoo.com [68.142.207.225]) by svr1.postgresql.org (Postfix) with SMTP id 6272D52AEF for ; Fri, 8 Jul 2005 17:55:02 -0300 (ADT) Received: (qmail 5925 invoked by uid 60001); 8 Jul 2005 20:55:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=UGQDZhWVAgtvEQy6/P7faiJh0QfgOQlG+Ql0mRE4gT71ULIbNNeKr+rdF25wj3sjGimJs/FX8M5mACWxpka/cGF5kEjOJDg2OvSTyUxIU1MuGKyK6i5BENMHoTv7cUBZ1z0lPK8t2t8mS2qAh1PkaJcaYNTRP38WUoR8gJM/PO0= ; Message-ID: <20050708205503.5923.qmail@web32515.mail.mud.yahoo.com> Received: from [216.173.173.66] by web32515.mail.mud.yahoo.com via HTTP; Fri, 08 Jul 2005 13:55:03 PDT Date: Fri, 8 Jul 2005 13:55:03 -0700 (PDT) From: CG Reply-To: cgg007@yahoo.com Subject: Clustering problem To: PostgreSQL SQL In-Reply-To: <200507081126.50279.lawgon@thenilgiris.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.742 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FORGED_YAHOO_RCVD, FROM_ENDS_IN_NUMS X-Spam-Level: ** X-Archive-Number: 200507/91 X-Sequence-Number: 22069 I have what I call a "dictionary" table which supports a "master table". This dictionary table is designed to hold generic data : CREATE TABLE sup_data (link_id uniqueidentifier, field_name varchar(255), field_data text) WITH OIDS; ... It works well when you're digging into it to pull the supplementary information for a small number of rows in the master table. It uses an index on the link_id, and can jump right to the few pages for the supplemental data. That was the design. Now "the powers that be" want to do some aggreate inquiries on subsets of the generic data, based on many rows from the master table. This doesn't work so well... Its having to pull many pages to create the result set to aggreate on. If I could cluster the generic data to match the clustering on the "master table" it would reduce the number of pulled pages considerably and the speedup would make it work well. I'm trying to avoid replicating the column and index used to cluster the main table in this dictionary table. Is it even possible to cluster a table based on the clustering scheme (which is not the link_id ...) from the master table? Can you gurus think of a better strategy? :) (Please??) :) CG ____________________________________________________ Sell on Yahoo! Auctions – no fees. Bid on great items. http://auctions.yahoo.com/