Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B6F972E003C for ; Tue, 25 Mar 2008 01:20:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 88685-04 for ; Tue, 25 Mar 2008 01:20:19 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.228]) by postgresql.org (Postfix) with ESMTP id EA2E62E002C for ; Tue, 25 Mar 2008 01:20:18 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 76so2378982wra.10 for ; Mon, 24 Mar 2008 21:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=i1HGqCNf2euD1O2DCiiLXYgVSm0BNH4vUI77B5ABD08=; b=s0Q0h6Bg7l9MedVLlJwcqx2srZE6IvATXFqvwJrh3BjTczks76yg023d8NM4n5PgNfFN7GhzCCrqSfjOYJcAYTmiG5NGeVLeJV5P2nxnABD8Sg7TeTIl5E9pZ1Atsi59VMsyhCp8o0Fi5H9XC8EYPKBiBmi/kcT6OxX1xW4ujVk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=NOtkJ62QRiRQIn5PqO3dPsY7QmKCxJaBDF+pYEWoQUHCYReKOIeFoxf2CpocKdGnBARf8/B967C3HJaMaoEmBiM0IwnxVdq5RpBvKs84jzovHN+qXLYofm3ZPbbdyTAbYWgaxIyRgkfWzp/IXDzmRxbV1csEWASiUhY+QFY+m38= Received: by 10.114.102.1 with SMTP id z1mr13301764wab.56.1206418817893; Mon, 24 Mar 2008 21:20:17 -0700 (PDT) Received: from ?10.1.1.5? ( [203.206.174.100]) by mx.google.com with ESMTPS id m25sm14038765waf.46.2008.03.24.21.20.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 Mar 2008 21:20:17 -0700 (PDT) Message-ID: <47E87CF8.9020407@gmail.com> Date: Tue, 25 Mar 2008 15:18:00 +1100 From: Chris User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: thomas.pundt@rp-online.de CC: firerox@centrum.cz, pgsql-performance@postgresql.org Subject: Re: slow pg_connect() References: <200803240840.8128@centrum.cz> <47E7A10F.5060805@rp-online.de> In-Reply-To: <47E7A10F.5060805@rp-online.de> Content-Type: text/plain; charset=windows-1250; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/456 X-Sequence-Number: 29410 > * Read about configuring and using persistent database connections > (http://www.php.net/manual/en/function.pg-pconnect.php) with PHP Though make sure you understand the ramifications of using persistent connections. You can quickly exhaust your connections by using this and also cause other issues for your server. If you do this you'll probably have to adjust postgres to allow more connections, which usually means lowering the amount of shared memory each connection can use which can also cause performance issues. I'd probably use pgpool-II and have it handle the connection stuff for you rather than doing it through php. -- Postgresql & php tutorials http://www.designmagick.com/