/    Sign up×
Community /Pin to ProfileBookmark

speeding up the creation of tables

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

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@ShrineDesignsJun 01.2004 — use the MYSL_CLIENT_COMPRESS flag, that should speed up your sql queries a bit

ex.<?php
$link = mysql_pconnect('localhost', 'username', 'password', MYSQL_CLIENT_COMPRESS);
?>
×

Success!

Help @davidklonski spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.14,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...