Jump to content

BULK query help.


ToonMariner

Recommended Posts

Hi people - I could do with some input on this please.

I have query heavy app and wondered if it would be possible to store all the query strings into a file and then simply use that file as teh query (just like importing in phpmyadmin - but with updates and inserts etc etc.)

1. Will it only count as one query?

2. Is it feasible - if so how can I achieve it.

Thanks people...
Link to comment
Share on other sites

Multiple queries never count as one query in mysql, when using MyISAM tables.  So the main risk of the approach you're suggesting is that if one query fails for whatever reason, recovery can be difficult.

This approach would be fine for a situation where you can recover by simply dropping a table used for importing, for example.

As for achieving it, I'm sketchy on the details, but you should be able to use the mysql command line client something like this:

[code=php:0]mysql database < commands.sql[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.