Hi Andrew,

thanks a lot for your help. Today we discovered what
our real problem was:

After "playing" a little bit with the php-scripts that try
to connect to the IBM DB2, we set the optional parameter
Cursortype when calling odbc_pconnect(....).

And the exciting thing: When we set the cursor type
to SQL_CUR_USE_ODBC Cursor Type, then
the whole query speed up from 1 till 10 seconds
to 0.2 till 0.3 seconds for 100 records. Amazing!!!

Therfore, PHP is just almost fast as calling the DB2
from Servlets using JDBC (don't take too much care
about the speed at whole: the database was on a
completely other location, so the whole connection
was made over a slow network connection).

I hope this helps when other encounter the same
problem when trying to connect to DB2 from
PHP.

Kind regards,
Christian Szardenings


"Andrew Hill" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Christian,
>
> Are you using an ODBC driver or just the unified-ODBC functions?
> If a driver, then I suggest changing vendors - that performance is in no
way
> representative of ODBC in general.
> In addition, to improve performance even more when using similar queries,
> first use odbc_prepare to prepare a parameter-bound query and then use
> odbc_execute to create the result set for specific parameter values.
>
> You may wish to try our Multi-Tier drivers at http://www.openlinksw.com.
> Multi-Tier UDA is exceptionally fast and secure, and downloads with a
free,
> non-expiring 2 user license.
> In addition, free support is available at
> http://www.openlinksw.com/support/suppindx.htm
>
> Please let me know if you require assistance.
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software  http://www.openlinksw.com
> Universal Data Access & Data Integration Technology Providers




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to