pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Hunter <hunteke@earlham.edu>
To: PostrgreSQL Novice List <pgsql-novice@postgresql.org>
Subject: Partitioning
Date: Tue, 26 Dec 2006 13:36:43 -0500
Message-ID: <45916BBB.5070602@earlham.edu> (raw)

Hi All,

A friend has asked me about creating a unique table for individual users 
that sign up for his site.  (In essence, each user who signs up would 
essentially get a set of CREATE TABLE {users,friends,movies,eats}_<id> ( 
... ); statements executed, the idea being to reduce the number of rows 
that the DB needs to search or index/update in regards to a particular 
user id.)  The just seems ludicrous to me, because the database still 
needs to find those tables from its internal structure, not to mention 
that it just seems silly to me from a design perspective.  Something 
about unable to optimize any queries because not only is the WHERE 
clause in flux, but so is the FROM clause.

Question: Could someone explain to me why this would be bad idea, 
because I can't put into words why it is.  Or is it a good idea? 
(Towards learning, I'm looking for a technical, Postgres oriented 
answer, as well as the more general answer.)

Since he's worried about performance, methinks a better idea would be to 
use the partitioning support of Postgres.  Is this a good hunch?

(Side question: When did Postgres get partitioning support?  I see it 
referenced in the 8.1 documentation but not before.)


Thanks,

Kevin



view thread (33+ messages)  latest in thread

Message-ID: <45916BBB.5070602@earlham.edu>
Permalink:  ../45916BBB.5070602@earlham.edu/
Also on:    postgresql.org/message-id/45916BBB.5070602@earlham.edu

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: hunteke@earlham.edu, pgsql-novice@postgresql.org
  Subject: Re: Partitioning
  In-Reply-To: <45916BBB.5070602@earlham.edu>

* 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