X-Original-To: pgsql-php-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C5F619FB40E for ; Thu, 31 Aug 2006 13:16:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 12104-01-2 for ; Thu, 31 Aug 2006 13:16:30 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web55213.mail.re4.yahoo.com (web55213.mail.re4.yahoo.com [206.190.58.177]) by postgresql.org (Postfix) with SMTP id 0885E9FB3EC for ; Thu, 31 Aug 2006 13:15:28 -0300 (ADT) Received: (qmail 39809 invoked by uid 60001); 31 Aug 2006 16:15:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=aTp0ulk8fDL1aYtwAp8NLBFN05ZdWLrTmsR02gb2111YXp8tGmg8lo637FHbhJwoDmSzRQ8mr0vYNSong2QmIALOp3mEMOSBCGNqlNvK5vNJ0fBrS16An+8DF3Xk/NqS+HfogNiHscgcL7RXlcRUryMFhg5PyIHXMQ7JcSksNxA= ; Message-ID: <20060831161527.39807.qmail@web55213.mail.re4.yahoo.com> Received: from [72.134.0.217] by web55213.mail.re4.yahoo.com via HTTP; Thu, 31 Aug 2006 09:15:27 PDT Date: Thu, 31 Aug 2006 09:15:27 -0700 (PDT) From: babak badaei Reply-To: babak badaei Subject: Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records! To: "Gavin M. Roy" Cc: pgsql-php@postgresql.org In-Reply-To: <5807B3E2-F486-47CB-B8AB-5D20ABD6FD65@ehpg.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.389 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS X-Spam-Level: ** X-Archive-Number: 200608/23 X-Sequence-Number: 3594 Hi Gavid, Thanks, no I have not tried PDO but I have compiled 3 different versions of PHP from source with similar results as the 3 different versions from binary distribution. Same for Postgres (compiled from source and dropped-in binary stuff) for two different versions. Thanks again! Babak. ----- Original Message ---- From: Gavin M. Roy To: babak badaei Cc: pgsql-php@postgresql.org Sent: Thursday, August 31, 2006 8:55:01 AM Subject: Re: [PHP] Postgres 8.1.4 + PHP, hangs when querying more than 16 records! Have you tried with pdo? $pdo = new PDO('pgsql:host=localhost;dbname=database','web'); $query = $pdo->query('SELECT * FROM foobar;'); $query->execute(); $data = $query->fetchAll(PDO::FETCH_OBJ); print_r($data); And have you tried not using other peoples packages but downloading the source and compiling it? I run PHP 5.1.4 and work with very large data sets, though I've not upgraded to 5.1.6 yet. Hope this helps, Gavin On Aug 31, 2006, at 12:42 AM, babak badaei wrote: > Hi Chris, Run through the native client everything works fine. I > know, its really strange. Any ideas? > > ----- Original Message ---- > From: Chris > To: babak badaei > Cc: pgsql-php@postgresql.org > Sent: Wednesday, August 30, 2006 11:42:01 PM > Subject: Re: [PHP] Postgres 8.1.4 + PHP, hangs when querying more > than 16 records! > > babak badaei wrote: >> OS: Fedora Core 5 >> PHP: PHP 5.1.4, PHP 5.1.6, and PHP 4.4.4 (compiled with --with- >> pgsql and install as binaries using YUM) >> Postgres 8.1.4 >> >> This scripts works: >> --------------------------------------------------------------------- >> ------------ >> > // Connecting, selecting database >> $dbconn = pg_connect("host=localhost dbname=database user=web") >> or die('Could not connect: ' . pg_last_error()); >> >> // Performing SQL query >> $query = 'SELECT * FROM foobar limit 16'; > > > >> // Performing SQL query >> $query = 'SELECT * FROM foobar limit 17'; > > That seems really weird. > > If you run those through psql natively what happens? > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match