[Sqlrelay-discussion] RE : RE : Oracle : Prefetch ?
Brought to you by:
mused
|
From: Sylvain G. <S.G...@fo...> - 2006-10-12 07:45:07
|
OK, Thanks.
I do not know what I have done but it is working.
Thanks a lot for your explanation, it will help me.
Regards
_____ =20
Sylvain Gourvil
D=E9veloppeur Php/MySQL
s.g...@fo...
FOTOVISTA
43-47 avenue de la Grande Arm=E9e 75016
-----Message d'origine-----
De=A0: sql...@li... =
[mailto:sql...@li...] De la part de =
David Muse
Envoy=E9=A0: mercredi 11 octobre 2006 16:07
=C0=A0: Discussion of topics related to SQL Relay
Objet=A0: Re: [Sqlrelay-discussion] RE : Oracle : Prefetch ?
On the server side, SQL Relay's oracle connection daemon prefetches 10
rows from the database by default. You can tune this by setting the
fetchatonce connectstring parameter in sqlrelay.conf:
<instance id=3D"oracle8test" ...>
...
<connections>
<connection connectionid=3D"db"
string=3D"user=3Dtestuser;password=3Dtestpassword;oracle_home=3D/u01/app/=
oracle/product/10.2.0;oracle_sid=3Dora1:fetchatonce=3D20" metric=3D"6"/>
</connections>
</instance>
The SQL Relay client fetches all rows of the result set from the SQL
Relay server by default. To conserve RAM, you can limit the number of
rows that are fetched at once using setResultSetBufferSize. It
shouldn't limit the result set. The code you're using should work fine.
I'll run a few tests to see what's I get and let you know what I find.
David Muse
dav...@fi...
On Tue, 2006-10-10 at 16:52 +0200, Sylvain Gourvil wrote:
> =20
>=20
> I have used the example code from the sourceforge documentation.
>=20
> =20
>=20
> The result is a "limit-like".
>=20
> =20
>=20
> <?
> dl("sql_relay.so");
> =20
> $con=3Dsqlrcon_alloc("host",9000,"","user","password",0,1);
> $cur=3Dsqlrcur_alloc($con);
> =20
> sqlrcur_setResultSetBufferSize($cur,5);
> =20
> sqlrcur_sendQuery($cur,"select * from my_table");
> =20
> while (!done) {
> for ($col=3D0; $col<sqlrcur_colCount($cur); $col++) {
> if ($field=3Dsqlrcur_getField($cur,$row,$col)) {
> echo $field;
> echo ",";
> } else {
> done=3D1;
> }
> }
> echo "\n";
> $row++;
> }
>=20
> ?>
>=20
> =20
>=20
> If somebody has a good code for using buffer and prefetch with sql
> relay, could he show me ?
>=20
> =20
>=20
> Thanks.
>=20
> =20
>=20
> Regards
>=20
> =20
>=20
> =20
>=20
> -----Message d'origine-----
> De : sql...@li...
> [mailto:sql...@li...] De la part
> de Sylvain Gourvil=20
> Envoy=E9 : mardi 10 octobre 2006 15:26
> =C0 : sql...@li...
> Objet : [Sqlrelay-discussion] Oracle : Prefetch ?
>=20
> =20
>=20
> =20
>=20
> Hi everybody ?
>=20
> =20
>=20
> I am trying to put SQL Relay in a framework ans I need to deal with
> prefetch (Oracle).
>=20
> I can not find any subject about it;
>=20
> =20
>=20
> Does SQL Relay deal with prefetch?
>=20
> IF yes, could you help me?
>=20
> =20
>=20
> Thanks in advance.
>=20
> =20
>=20
> Regards.
>=20
> =20
>=20
>=20
> =
-------------------------------------------------------------------------=
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to =
share your
> opinions on IT & business topics through brief surveys -- and earn =
cash
> =
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________ Sqlrelay-discussion =
mailing list Sql...@li... =
https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
-------------------------------------------------------------------------=
Using Tomcat but need to do more? Need to support web services, =
security?
Get stuff done quickly with pre-integrated technology to make your job =
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache =
Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D=
121642
_______________________________________________
Sqlrelay-discussion mailing list
Sql...@li...
https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
|