X-Original-To: pgsql-php-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id C9D0A9FB30A for ; Thu, 31 Aug 2006 16:34:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 83866-05-5 for ; Thu, 31 Aug 2006 19:34:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tetra.ehpg.net (tetra2.ehpg.net [65.19.161.8]) by postgresql.org (Postfix) with ESMTP id 1A8059FB42C for ; Thu, 31 Aug 2006 16:33:59 -0300 (ADT) Received: from dsl081-087-203.lax1.dsl.speakeasy.net ([64.81.87.203]) by tetra.ehpg.net with esmtpa (Exim 4.60) (envelope-from ) id 1GIsIW-00054z-3w; Thu, 31 Aug 2006 12:33:58 -0700 In-Reply-To: <20060831162910.97360.qmail@web55214.mail.re4.yahoo.com> References: <20060831162910.97360.qmail@web55214.mail.re4.yahoo.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/alternative; boundary=Apple-Mail-3-504461470 Message-Id: <1410D5D8-73A1-43F3-92B3-36F7AFAAE092@ehpg.net> Cc: pgsql-php@postgresql.org From: "Gavin M. Roy" Subject: Re: Postgres 8.1.4 + PHP, hangs when querying more than 16 records! Date: Thu, 31 Aug 2006 12:33:24 -0700 To: babak badaei X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/25 X-Sequence-Number: 3596 --Apple-Mail-3-504461470 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Wow I'd say that something is terribly wrong with your machine, or it's install of pgsql, other than running fedora ;-). Out of curiosity what's the row size? how many fields and what's the schema look like? On Aug 31, 2006, at 9:29 AM, babak badaei wrote: > Hello again; I just finished trying the method below with the same > results. 16 records work, more than that it hangs!! Thanks for your > help. 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 > > --Apple-Mail-3-504461470 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Wow I'd say that something is = terribly wrong with your machine, or it's install of pgsql, other than = running fedora ;-).=A0 Out of curiosity what's the row size?=A0 how many = fields and what's the schema look like?




On Aug 31, = 2006, at 9:29 AM, babak badaei wrote:

Hello again; I just finished trying the method = below with the same results. 16 records work, more than that it hangs!! = Thanks for your help. Babak.

----- Original Message ----
From: Gavin M. Roy <gmr@ehpg.net>
To: babak badaei <badaei@yahoo.com>
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 =3D new = PDO('pgsql:host=3Dlocalhost;dbname=3Ddatabase','web');
$query =3D $pdo->query('SELECT * FROM = foobar;');
$query->execute();
$data =3D = $query->fetchAll(PDO::FETCH_OBJ);

And have you tried not using other peoples = packages but downloading=A0=A0
the source and = compiling it?=A0=A0I run PHP 5.1.4 and work with very=A0=A0
large data sets, though I've not upgraded to 5.1.6 = yet.
Hope this helps,


On Aug 31, 2006, at 12:42 AM, babak badaei = wrote:
> Hi Chris, Run through the native client = everything works fine. I=A0=A0
> know, its = really strange. Any ideas?
>
> ----- Original Message ----
> From: Chris <dmagick@gmail.com>
> To: babak badaei <badaei@yahoo.com>
> 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=A0=A0

> than 16 = records!
>
> babak = badaei wrote:
>> OS: Fedora Core 5
>> PHP: PHP 5.1.4, PHP 5.1.6, and=A0=A0PHP = 4.4.4 (compiled with --with-
>> pgsql = and install as binaries using YUM)
>> = Postgres 8.1.4
>>
>> This scripts works:
>> = --------------------------------------------------------------------- =
>> ------------

>> <?php
>> // = Connecting, selecting database
>> = $dbconn =3D pg_connect("host=3Dlocalhost dbname=3Ddatabase = user=3Dweb")
>>=A0=A0=A0=A0or die('Could not connect: = ' . pg_last_error());
>>
>> // Performing SQL query
>> $query =3D 'SELECT * FROM foobar limit = 16';
>

> = <snip>
>
>>=A0=A0//= Performing SQL query
>>=A0=A0$query =3D 'SELECT * = FROM foobar limit 17';
>
> That = seems really weird.
>
> If you = run those through psql natively what happens?
>
> --
> Postgresql & php tutorials
> >
>
>
>
> ---------------------------(end of=A0=A0> 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
=A0=A0=A0=A0=A0=A0 choose an index scan if your = joining column's datatypes do not
=A0=A0=A0=A0=A0=A0= match

= --Apple-Mail-3-504461470--