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

Re: MySQL HandlerSocket - Is this possible in PG?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Michael Ben-Nes <michael(at)epoch(dot)co(dot)il>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: MySQL HandlerSocket - Is this possible in PG?
Date: 2010-12-21 21:07:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Tue, Dec 21, 2010 at 10:50 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> 2010/12/21 Michael Ben-Nes <michael(at)epoch(dot)co(dot)il>:
>> Hi Pavel,
>> Thanks for your quick answer. Can you please elaborate a bit more about the
>> points bellow.
>> On Tue, Dec 21, 2010 at 1:31 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
>> wrote:
>>> Hello
>>> you can emulate it now.
>>> a) try to do a simple stored procedure, where you can wrap your query
>> Do you mean I should use PREPARE?
> yes
>>> b) use a FAST CALL API to call this procedure
>> Currently I use PHP to access the DB which use libpq. Is that cosidered a
>> fast call API ? if not, can you please refer me to the right info.
> sorry it is a fast-path interface
> but php hasn't a adequate API :(

I don't think fastpath interface is going to get you there.  What they
are doing with mysql is bypassing both the parser and the protocol.
As soon as you use libpq, you've lost the can't see
anywhere close to to that performance before you become network

If you want to see postgres doing this in action, you could fire up
the database in single user mode and run raw queries against the
backend.   Another way to do it is to hack tcop/postgres.c and inject
protocol messages manually.  Right now, the only way to get that close
to the metal using standard techniques is via SPI (plpgsql, etc).  A
proper transaction free stored procedure implementation would open a
lot of doors for fast query execution.


In response to


pgsql-performance by date

Next:From: Mladen GogalaDate: 2010-12-21 22:46:54
Subject: Re: Performance of PostgreSQL over NFS
Previous:From: RichDate: 2010-12-21 20:31:37
Subject: Re: Performance of PostgreSQL over NFS

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group