Re: eviscerating the parser

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Joshua Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: eviscerating the parser
Date: 2011-05-22 22:10:54
Message-ID: BANLkTimM_J1THXm_yskF--7QQxyhi4WioQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 22, 2011 at 1:38 PM, Joshua Berkus <josh(at)agliodbs(dot)com> wrote:
>> Another point is that parsing overhead is quite obviously not the
>> reason for the massive performance gap between one core running simple
>> selects on PostgreSQL and one core running simple selects on MySQL.
>> Even if I had (further) eviscerated the parser to cover only the
>> syntax those queries actually use, it wasn't going to buy more than a
>> couple points.
>
> I don't know if you say Jignesh's presentation, but there seems to be a lot of reason to believe that we are lock-bound on large numbers of concurrent read-only queries.

I didn't see Jignesh's presentation, but I'd come to the same
conclusion (with some help from Jeff Janes and others):

http://archives.postgresql.org/pgsql-hackers/2010-11/msg01643.php
http://archives.postgresql.org/pgsql-hackers/2010-11/msg01665.php

We did also recently discuss how we might improve the behavior in this case:

http://archives.postgresql.org/pgsql-hackers/2011-05/msg00787.php

...and ensuing discussion.

However, in this case, there was only one client, so that's not the
problem. I don't really see how to get a big win here. If we want to
be 4x faster, we'd need to cut time per query by 75%. That might
require 75 different optimizations averaging 1% a piece, most likely
none of them trivial. I do confess I'm a bit confused as to why
prepared statements help so much. That is increasing the throughput
by 80%, which is equivalent to decreasing time per query by 45%. That
is a surprisingly big number, and I'd like to better understand where
all that time is going.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tim Uckun 2011-05-22 23:48:28 BUG #6034: pg_upgrade fails when it should not.
Previous Message Robert Haas 2011-05-22 22:00:19 Re: Some PGCon quotes