On May 02 06:13, Reed Loefgren wrote:
> I've been trying to run a nested query via a browser using a php script.
> The script looks at a table with a couple years worth of data (6M rows).
> If I constrain the search to five or six days of the data it works fine
> and displays the result set in the browser, but if I have it parse the
> entire table it errors out with this message:
> server closed the connection unexpectedly This probably means the server
> terminated abnormally before or while processing the request.
Just making rhetoric: You removed script execution time limits via
I'll suggest turning error_reporting() to E_ALL and using asynchronous
query execution functions, instead of synchron ones. For instance:
$query_cmd = "SELECT ...";
$res = pg_send_query($conn, $query_cmd);
/* Error handling stuff... */
* Sorry, no clue about connection socket in here.
* We're waiting without select() or poll().
* (I know, I know... PHP sucks.)
usleep(100000); /* 0.1 seconds. */
/* Seems like result is ready now. */
$res = pg_get_result($conn);
/* Error handling. */
IMHO, this method can output more verbose (and accurate?) query status
when compared to an odd pg_query() call.
In response to
pgsql-php by date
|Next:||From: chris smith||Date: 2006-05-03 12:45:45|
|Subject: Re: Select and order by question|
|Previous:||From: kmh496||Date: 2006-05-03 09:14:45|
|Subject: Re: server dropping connection|