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 010C2564A3 for ; Thu, 17 Mar 2005 15:56:11 +0000 (GMT) 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 83268-03 for ; Thu, 17 Mar 2005 15:56:06 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.194]) by svr1.postgresql.org (Postfix) with ESMTP id 2B96156401 for ; Thu, 17 Mar 2005 15:56:05 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id 1so120607rny for ; Thu, 17 Mar 2005 07:56:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=VWWjsJeOhFTlTIdvyPF362/l4hGIsabmADoGLzdh2yh/JMXzu4TNxtTej69tZuGf06nHsK7A1+OjPoi2KazSoEAw8M+6DPzZ4OQrslucU8ndRFWQ58rLD+9O2BrN+V6Z8/aotitdK8MUVqvu0Q+B42Tv/E52liStda4rJs22Zx4= Received: by 10.38.206.58 with SMTP id d58mr488833rng; Thu, 17 Mar 2005 07:56:10 -0800 (PST) Received: by 10.38.179.55 with HTTP; Thu, 17 Mar 2005 07:56:10 -0800 (PST) Message-ID: Date: Thu, 17 Mar 2005 10:56:10 -0500 From: Alexander Ranaldi Reply-To: Alexander Ranaldi To: pgsql-performance@postgresql.org Subject: Building a DB with performance in mind Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.398 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/358 X-Sequence-Number: 11063 Greetings everyone, I am about to migrate to Postgres from MySQL. My DB isn't enormous (< 1gb), consists mostly of just text, but is accessed quite heavily. Because size isn't a huge issue, but performance is, I am willing to normalize as necessary. Currently I have a table "Entries" containing 500k rows. The table contains many text columns, and a few others: EntryID (unique, indexed) UserID (references "Users" table, indexed) Private (boolean. indexed) Most of my queries return rows based on UserID, and also only if Private is FALSE. Would it be in the interest of best performance to split this table into two tables: "EntriesPrivate", "EntriesNotPrivate" and remove the "Private" column? I appreciate any feedback. I'm certainly not a DB design expert. :) Thanks, Alex