From: Aaron Turner <synfinatic@gmail.com>
To: Jim C. Nasby <jnasby@pervasive.com>
Cc: Matthew T. O'Connor <matthew@zeut.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: 10+hrs vs 15min because of just one index
Date: Sat, 11 Feb 2006 23:58:48 -0800
Message-ID: <1ca1c1410602112358h1e0e9696lff8f172769dc587e@mail.gmail.com> (raw)
In-Reply-To: <20060211212453.GT57845@pervasive.com>
References: <1ca1c1410602100016p2b5fdcc4wbf45612d7efc5fdf@mail.gmail.com>
<43ECC9BF.2030107@zeut.net>
<1ca1c1410602100924s191e7cddo4bda80d8f8d7cb6d@mail.gmail.com>
<20060211212453.GT57845@pervasive.com>
On 2/11/06, Jim C. Nasby <jnasby@pervasive.com> wrote:
> On Fri, Feb 10, 2006 at 09:24:39AM -0800, Aaron Turner wrote:
> > On 2/10/06, Matthew T. O'Connor <matthew@zeut.net> wrote:
> > > Aaron Turner wrote:
> >
> > Basically, I need some way to optimize PG so that I don't have to drop
> > that index every time.
> >
> > Suggestions?
>
> I think you'll have a tough time making this faster; or I'm just not
> understanding the problem well enough. It's probably time to start
> thinking about re-architecting some things in the application so that
> you don't have to do this.
Well before I go about re-architecting things, it would be good to
have a strong understanding of just what is going on. Obviously, the
unique index on the char(48) is the killer. What I don't know is:
1) Is this because the column is so long?
2) Is this because PG is not optimized for char(48) (maybe it wants
powers of 2? or doesn't like even numbers... I don't know, just
throwing it out there)
3) Is there some algorithm I can use to estimate relative UPDATE
speed? Ie, if I cut the column length in 1/2 does that make it 50%
faster?
4) Does decoding the data (currently base64) and storing the binary
data improve the distribution of the index, thereby masking it more
efficent?
Obviously, one solution would be to store the column to be UPDATED in
a seperate joined table. That would cost more disk space, and be more
complex, but it would be more efficient for updates (inserts would of
course be more expensive since now I have to do two).
--
Aaron Turner
http://synfin.net/
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: synfinatic@gmail.com, jnasby@pervasive.com, matthew@zeut.net
Subject: Re: 10+hrs vs 15min because of just one index
In-Reply-To: <1ca1c1410602112358h1e0e9696lff8f172769dc587e@mail.gmail.com>
References: <1ca1c1410602100016p2b5fdcc4wbf45612d7efc5fdf@mail.gmail.com> <43ECC9BF.2030107@zeut.net> <1ca1c1410602100924s191e7cddo4bda80d8f8d7cb6d@mail.gmail.com> <20060211212453.GT57845@pervasive.com> <1ca1c1410602112358h1e0e9696lff8f172769dc587e@mail.gmail.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