[freetds] Memory Overflow on apache using freetds and php

Frank M. Kromann frank at kromann.info
Sat May 31 10:03:59 EDT 2003


The native MSSQL extension supports a slightly different method for this.
You can specify the Batch size before quearying the database and use
mssql_fetch_batch() to fetch each batch.

This method reduces the network overhead you would get by fetching one row
at the time from the server.

- Frank

> Aliet Santiesteban Sifontes wrote:
> > 
> > The tables have 42539 records, and ASSNS_Almacen has
> > 61 records, I'm doing the query to return all of
> > them...
> For really large result sets, you may want to try using an unbuffered
> call, which avoids storing the entire query result in memory. (This
> you are processing result rows in order.)
> PHP 4.3.0 added sybase_unbuffered_query() to the sybase_ct extension,
> solve the memory usage problem, and also the latency problem (normally
> first row won't be available to your script until the entire result set
> is returned). Unfortunately, this is poorly documented and I don't know
> if it really works. The latest manual mentions but does not show the
> parameter to the call: sybase_unbuffered_query($query, $link_id,
> If $store is FALSE, the query result won't be stored in memory. At
> that's how it should work. If you can try it, tell us if it works.
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds

More information about the FreeTDS mailing list