speeding up the creation of tables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davidklonski
Forum Contributor
Posts: 128
Joined: Mon Mar 22, 2004 4:55 pm

speeding up the creation of tables

Post by davidklonski »

Hello

I have an SQL script which deletes & create tables, create index for tables and so on.
Currently I have written a PHP code which traverse one SQL statement after the other and executes it using mysql_query()

Is there a way to speed this process up?
I am using MySQL 5.0
Would it possible to give MySQL the entire script file and have it perform all the needed statements without having to it manually one after the other?

It needs to be done via PHP though.

thanks in advance
User avatar
xisle
Forum Contributor
Posts: 249
Joined: Wed Jun 25, 2003 1:53 pm

Post by xisle »

Try putting all your queries into one string or file and executing that. You would have to time it. No different than recovering from a Mysql_dump really.
Post Reply