pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Castle, Lindsay <lindsay.castle@eds.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: One table or many tables for data set
Date: Tue, 22 Jul 2003 18:02:21 -0700
Message-ID: <3F1DDE9D.4010108@joeconway.com> (raw)
In-Reply-To: <B09017B65BC1A54BB0B76202F63DDCCA0532489F@auntm201>
References: <B09017B65BC1A54BB0B76202F63DDCCA0532489F@auntm201>

Castle, Lindsay wrote:
> I'm working on a project that has a data set of approximately 6million rows
> with about 12,000 different elements, each element has 7 columns of data.
> 
> I'm wondering what would be faster from a scanning perspective (SELECT
> statements with some calculations) for this type of set up;
> 	one table for all the data
> 	one table for each data element (12,000 tables)
> 	one table per subset of elements (eg all elements that start with
> "a" in a table)
> 

I, for one, am having difficulty understanding exactly what your data 
looks like, so it's hard to give advice. Maybe some concrete examples of 
what you are calling "rows", "elements", and "columns" would help.

Does each of 6 million rows have 12000 elements, each with 7 columns? Or 
do you mean that out of 6 million rows, there are 12000 distinct kinds 
of elements?

> Can I do anything with Indexing to help with performance?  I suspect for the
> majority of scans I will need to evaluate an outcome based on 4 or 5 of the
> 7 columns of data.
> 

Again, this isn't clear to me -- but maybe I'm just being dense ;-)
Does this mean you expect 4 or 5 items in your WHERE clause?

Joe




view thread (9+ messages)  latest in thread

Message-ID: <3F1DDE9D.4010108@joeconway.com>
Permalink:  ../3F1DDE9D.4010108@joeconway.com/
Also on:    postgresql.org/message-id/3F1DDE9D.4010108@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: mail@joeconway.com, lindsay.castle@eds.com
  Subject: Re: One table or many tables for data set
  In-Reply-To: <3F1DDE9D.4010108@joeconway.com>
  References: <B09017B65BC1A54BB0B76202F63DDCCA0532489F@auntm201> <3F1DDE9D.4010108@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox