Re: question about ODBC and PHP
| From: | salamander | Date: | Fri, 19 Jul 2002 13:39:35 +0000 |
| Subject: | Re: question about ODBC and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108499@lists.php.net to get a copy of this message | ||
Sylvain,
This isn't really an ODBC question, but more of an application architecture one, I believe :)
The reason you are spending so much "time" is that you have to bring your data across the wire to your temp table, and then back into MySQL, if I understand you correctly.
I suggest you read the MySQL docs on "Temp Tables" - this is a table that you create briefly in your script, and then use MySQL's limited subquery syntax to perform an insert per these docs: http://www.mysql.com/doc/I/N/INSERT_SELECT.html
Be aware that temp tables created by PHP do not persist in MySQL beyond the execution of a single script - e.g. within a single database session.
An even quicker way is to use a database that supports VIEWS, and then simply create a View that represents your required data.
If you want a full-featured database to work with in PHP and ODBC, check out http://www.openlinksw.com/virtuoso
It not only supports all of the SQL:92 and most SQL:1999 features, but can execute and serve PHP from inside of the database without using Apache.
Let me know if you have any questions about Virtuoso or ODBC in PHP.
Cheers,
Andrew
On Friday, July 19, 2002, at 09:03 AM, Nasse, Sylvain wrote:
I am new to PHP, and I have got to download huge quantity of data from an oracle server. The ODBC cnnection works fine, and I found a useful "odbc_fetch_array()" function on this site. Until now I store the data row after row into a temporrary file, and with it i fill MySQL tables. The construction of the file takes nearly 50 minutes each , I have 10-12 tables to search in, and joins to make to integrate data in a final table.... ( !!! ) Is there a quicker method to get data in an odbc result resource?? thx ! N.B.: op (de inhoud van) deze e-mail is een DISCLAIMER met belangrijke VOORBEHOUDEN van toepassing: zie http://www.ben.nl/disclaimer This e-mail and its contents are subject to a DISCLAIMER with important RESERVATIONS: see http://www.ben.nl/disclaimer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php