Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Partitioned table performance


  • From: Josh Berkus <josh(at)agliodbs(dot)com>
  • To: pgsql-performance(at)postgresql(dot)org
  • Cc: "Stacy White" <harsh(at)computer(dot)org>
  • Subject: Re: Partitioned table performance
  • Date: Sun, 5 Dec 2004 15:06:40 -0800
  • Message-id: <200412051506.41025.josh@agliodbs.com> <text/plain>

Stacy,

Thanks for the stats!

> In some cases we've seen some increased performance in tests by splitting
> the table into several smaller tables.  Both 'UNION ALL' views, and the
> superclass/subclass scheme work well at pruning down the set of rows a
> query uses, but they seem to introduce a large performance hit to the time
> to process each row (~50% for superclass/subclass, and ~150% for union
> views).

This seems reasonable, actually, given your test.   Really, what you should be 
comparing it against is not against selecting from an individual partition, 
but selecting from the whole business as one large table.  

I also suspect that wider rows results in less overhead proportionally; note 
that your test contains *only* the indexed rows.   I should soon have a test 
to prove this, hopefully.

However, I would be interested in seeing EXPLAIN ANALYZE from your tests 
rather than just EXPLAIN.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group