slow of retrive data when using ODBC

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

slow of retrive data when using ODBC

Post by valen53 »

i got a system that need to connect 2 DB , one is mysql , another is ODBC.
when i retrive data from ODBC, it will turn to very slow. And i feel trouble each time retrive data from ODBC, b'cos need to connect again, then close
any method can making faster ? thank's for any reply

$dw = odbc_connect("dw","dd","dd")

$query = "SELECT * FROM DW.dw_emp WHERE DEPT_ID >= '$dept_From' and DEPT_ID <= '$dept_To' ";

$result = odbc_exec($dw, $query);
while($row = odbc_fetch_array($result))

odbc_close($dw);
Post Reply