|
|
Subscribe / Log in / New account

Re: Why we lost Uber as a user

From:  Bruce Momjian <bruce-AT-momjian.us>
To:  Josh Berkus <josh-AT-agliodbs.com>
Subject:  Re: Why we lost Uber as a user
Date:  Tue, 26 Jul 2016 17:56:12 -0400
Message-ID:  <20160726215612.GC27321@momjian.us>
Cc:  "Joshua D. Drake" <jd-AT-commandprompt.com>, pgsql-hackers <pgsql-hackers-AT-postgresql.org>
Archive‑link:  Article

On Tue, Jul 26, 2016 at 02:26:57PM -0700, Josh Berkus wrote:
> On 07/26/2016 01:53 PM, Josh Berkus wrote:
> > The write amplification issue, and its correllary in VACUUM, certainly
> > continues to plague some users, and doesn't have any easy solutions.
> 
> To explain this in concrete terms, which the blog post does not:
> 
> 1. Create a small table, but one with enough rows that indexes make
> sense (say 50,000 rows).
> 
> 2. Make this table used in JOINs all over your database.
> 
> 3. To support these JOINs, index most of the columns in the small table.
> 
> 4. Now, update that small table 500 times per second.
> 
> That's a recipe for runaway table bloat; VACUUM can't do much because
> there's always some minutes-old transaction hanging around (and SNAPSHOT
> TOO OLD doesn't really help, we're talking about minutes here), and
> because of all of the indexes HOT isn't effective.  Removing the indexes
> is equally painful because it means less efficient JOINs.
> 
> The Uber guy is right that InnoDB handles this better as long as you
> don't touch the primary key (primary key updates in InnoDB are really bad).
> 
> This is a common problem case we don't have an answer for yet.

Or, basically, we don't have an answer to without making something else
worse.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers




to post comments


Copyright © 2016, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds