pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergio Mayoral <mayoralstuttgart@yahoo.com>
To: postgresql-perf <pgsql-performance@postgresql.org>
Subject: PQconnectStart/PQconnectPoll
Date: Thu, 15 Nov 2012 01:02:57 -0800 (PST)
Message-ID: <1352970177.10135.YahooMailNeo@web39302.mail.mud.yahoo.com> (raw)

Hi,

i am running some tests to check performance between postgresql and mysql.

one important issue is PQconnectdb (PQconnectStart/PQconnectPoll) against mysql_init/mysql_real_connect functions. (debian platform/C application).

PQconnectdb("host=localhost dbname=my_db user=my_user password='' sslmode=disable"); 

co = mysql_init(NULL)
mysql_real_connect(co, "127.0.0.1", "my_user", "", "my_db", 0, NULL, 0)

PQconnectdb is taking too long comparing to mysql and i found out the time is consumed by PQconnectPoll waiting for the socket to be ready for reading/writing
but this behaviour is not seen in mysql.

I cannot use persistent connections. I must open/close a connection anytime I want to insert something new.

do i have to configure something different? Am i missing something?

this problem gets even worse under PHP.

Regards,

view thread (3+ messages)  latest in thread

Message-ID: <1352970177.10135.YahooMailNeo@web39302.mail.mud.yahoo.com>
Permalink:  ../1352970177.10135.YahooMailNeo@web39302.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/1352970177.10135.YahooMailNeo@web39302.mail.mud.yahoo.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mayoralstuttgart@yahoo.com
  Subject: Re: PQconnectStart/PQconnectPoll
  In-Reply-To: <1352970177.10135.YahooMailNeo@web39302.mail.mud.yahoo.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