Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TYvLh-0008H6-Ir for pgsql-performance@postgresql.org; Thu, 15 Nov 2012 09:03:01 +0000 Received: from nm8-vm1.bullet.mail.ne1.yahoo.com ([98.138.91.65]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TYvLe-0008Eo-QJ for pgsql-performance@postgresql.org; Thu, 15 Nov 2012 09:03:00 +0000 Received: from [98.138.90.54] by nm8.bullet.mail.ne1.yahoo.com with NNFMP; 15 Nov 2012 09:02:58 -0000 Received: from [98.138.89.196] by tm7.bullet.mail.ne1.yahoo.com with NNFMP; 15 Nov 2012 09:02:58 -0000 Received: from [127.0.0.1] by omp1054.mail.ne1.yahoo.com with NNFMP; 15 Nov 2012 09:02:58 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 167283.35374.bm@omp1054.mail.ne1.yahoo.com Received: (qmail 15533 invoked by uid 60001); 15 Nov 2012 09:02:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1352970177; bh=A6BWNGLT5fTQWGvi1Js4G3L+UmC8lQtGp1vN6h858c8=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=LUx5PX2ocVTBsChFEs28MbRts/C57MNku65hB15AhXgxh5vFnvdui0BXGAfjrfKXTw/hildCI8+WK255hioMngzr2z1mfn7CgH3XRvM3EHwnqQNEfmLEJIWtCu5e9eJ5SjUbQMtvrslK4+1IyDFMEly9Wli1kdCl+0NGBgl4f6Q= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=nm0eudzD5FTRSV6hD2P87UeJx7PSMRM6o1IfInoJ3XbdbvzDZ3XRb3WFbUV90EBoWdVTY3g0wlXfv8LMf3GQzbOB6LjxLQUNuOZlHcphygnIYtUI7U59+qCwUA5eGKbwm3FqdT1ts4QIV8TUJGfYRlfBWVyRlxMtOKWRixnN4pc=; X-YMail-OSG: sygvwsUVM1m27MSh1aYk0loEq94jwxIDh2qRfvL.O8Dk0q0 N5SsoLadRQrwmJpkepZSeQ7vOBKyknId8asCLCQbtsXfXjs8qTWtPosZD2b7 HvMf.j8gYCk9dOcGBBTJMtwRR1b_b9NT5kfjij0yKAzHedUvEj8YoC5NHagl Kf66UR9b1O9AXGQugGfv.sUwE2nfG.utq7SlxoTlUD73iFALd90reihKOiGo buq5CGjM9ShetfKqd.MJ2NnKRumcdWfQpuLtL5c_jef_t6OmWdppjCyp4_0t OcXv3ggohnbRSohYGkDOot1CAeyKWLgo_WdmCjqWRxhJgTFKr25GRRKQ1QsC 1Kx6ii8jzvCUtrjmnm9wunyU12rJbTvGW8RnncxFf.aOhgGjAl6o322Jz7Mr 7GF8O5ASZPzM7y0Q2pPOZMAhbJnoU7vV7SM89x4CNJoVdAPHvuhoy7HXOmlR jb.8CL.AiKLK2Y0EWIUBL9yBoBdkSIADQFsDGxpKbBOA5_OVov_EF Received: from [145.253.157.4] by web39302.mail.mud.yahoo.com via HTTP; Thu, 15 Nov 2012 01:02:57 PST X-Rocket-MIMEInfo: 001.001, SGksCgppIGFtIHJ1bm5pbmcgc29tZSB0ZXN0cyB0byBjaGVjayBwZXJmb3JtYW5jZSBiZXR3ZWVuIHBvc3RncmVzcWwgYW5kIG15c3FsLgoKb25lIGltcG9ydGFudCBpc3N1ZSBpcyBQUWNvbm5lY3RkYiAoUFFjb25uZWN0U3RhcnQvUFFjb25uZWN0UG9sbCkgYWdhaW5zdCBteXNxbF9pbml0L215c3FsX3JlYWxfY29ubmVjdCBmdW5jdGlvbnMuIChkZWJpYW4gcGxhdGZvcm0vQyBhcHBsaWNhdGlvbikuCgpQUWNvbm5lY3RkYigiaG9zdD1sb2NhbGhvc3QgZGJuYW1lPW15X2RiIHVzZXI9bXlfdXNlciBwYXNzd28BMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.460 Message-ID: <1352970177.10135.YahooMailNeo@web39302.mail.mud.yahoo.com> Date: Thu, 15 Nov 2012 01:02:57 -0800 (PST) From: Sergio Mayoral Reply-To: Sergio Mayoral Subject: PQconnectStart/PQconnectPoll To: postgresql-perf MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="916410903-97848912-1352970177=:10135" X-Pg-Spam-Score: 0.7 (/) X-Archive-Number: 201211/194 X-Sequence-Number: 48560 --916410903-97848912-1352970177=:10135 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=0A=0Ai am running some tests to check performance between postgresql an= d mysql.=0A=0Aone important issue is PQconnectdb (PQconnectStart/PQconnectP= oll) against mysql_init/mysql_real_connect functions. (debian platform/C ap= plication).=0A=0APQconnectdb("host=3Dlocalhost dbname=3Dmy_db user=3Dmy_use= r password=3D'' sslmode=3Ddisable");=A0=0A=0Aco =3D mysql_init(NULL)=0Amysq= l_real_connect(co, "127.0.0.1", "my_user", "", "my_db", 0, NULL, 0)=0A=0APQ= connectdb 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/w= riting=0Abut this behaviour is not seen in mysql.=0A=0AI cannot use persist= ent connections. I must open/close a connection anytime I want to insert so= mething new.=0A=0Ado i have to configure something different? Am i missing = something?=0A=0Athis problem gets even worse under PHP.=0A=0ARegards, --916410903-97848912-1352970177=:10135 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

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

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

PQconnectdb("host=3Dlocalhost = dbname=3Dmy_db user=3Dmy_user password=3D'' sslmode=3Ddisable"); 

co =3D mysql_init(NULL)=
my= sql_real_connect(co, "127.0.0.1", "my_user", "", "my_db", 0, NULL, 0)

PQconn= ectdb is taking too long comparing to mysql and i found out the time is con= sumed by PQconnectPoll waiting for the socket to be ready for reading/writi= ng
= 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?

<= /font>
thi= s problem gets even worse under PHP.

Regards,
--916410903-97848912-1352970177=:10135--