473,837 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

slow restore

Mysql 4.1.15 on Win2k. Using InnoDB.

Using the mysql administrator gui to create a backup, everything goes
fine, and restores quickly.

Using the command line:

mysqldump %dbname% --single-transaction > %dbname%.sql

creates a file about 15% smaller than the gui produces, and is
EXTREMELY slow to restore. I have tried adding locks, skip opt,
everything. What does the gui use for a command to create this dump?

Mar 7 '06 #1
5 6115
<pa*****@digita l-horizons.com> wrote in message
news:11******** **************@ j33g2000cwa.goo glegroups.com.. .
mysqldump %dbname% --single-transaction > %dbname%.sql
I believe the --single-transaction executes the backup in a single
transaction; it doesn't create a script to execute the restore in a single
transaction.
creates a file about 15% smaller than the gui produces, and is
EXTREMELY slow to restore. I have tried adding locks, skip opt,
everything.


I think you _want_ the --opt option! Did you read the description of --opt?
http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html

There are a large number of tips for InnoDB performance here:
http://dev.mysql.com/doc/refman/4.1/...db-tuning.html

For example, following the tips on that page, I'd do the following (sorry, I
am using UNIX/Linux shell syntax, writing the Windows equivalent is left as
an exercise for the reader):

(
echo "SET AUTOCOMMIT=0;"
echo "SET UNIQUE_CHECKS=0 ;"
echo "SET FOREIGN_KEY_CHE CKS=0;"
cat mydumpfile.sql
echo "SET FOREIGN_KEY_CHE CKS=1;"
echo "UNIQUE_CHECKS= 1;"
echo "COMMIT;"
) | mysql -u username -p mydatabase

Regards,
Bill K.
Mar 7 '06 #2
Thanks. I was able to do that from a redhat box I have sitting next to
it. I was under the impression that I need single transaction with
InnoDB. Anyway, thank you.

Mar 7 '06 #3
pa*****@digital-horizons.com wrote:
Mysql 4.1.15 on Win2k. Using InnoDB.

Using the mysql administrator gui to create a backup, everything goes
fine, and restores quickly.

Using the command line:

mysqldump %dbname% --single-transaction > %dbname%.sql

creates a file about 15% smaller than the gui produces, and is
EXTREMELY slow to restore. I have tried adding locks, skip opt,
everything. What does the gui use for a command to create this dump?

The GUI backup has a new INSERT line about every 21 rows, which makes
the file larger but much quicker to restore. I have not been able to get
mysqldump to mimic this behaviour. I only seems to output a single INSERT.
Mar 9 '06 #4
"Ian Pawson" <ia*@ipawson.co m> wrote in message
news:OD******** ***********@new sfe7-win.ntli.net...
pa*****@digital-horizons.com wrote:
The GUI backup has a new INSERT line about every 21 rows, which makes
the file larger but much quicker to restore. I have not been able to get
mysqldump to mimic this behaviour. I only seems to output a single INSERT.


I wonder if this optimization is related to the bulk_insert_buf fer_size
server parameter? You may be able to make very long INSERTs run faster if
you increase that buffer. See
http://dev.mysql.com/doc/refman/5.0/...variables.html

Regards,
Bill K.
Mar 9 '06 #5
Bill Karwin wrote:
"Ian Pawson" <ia*@ipawson.co m> wrote in message
news:OD******** ***********@new sfe7-win.ntli.net...
pa*****@digital-horizons.com wrote:
The GUI backup has a new INSERT line about every 21 rows, which makes
the file larger but much quicker to restore. I have not been able to get
mysqldump to mimic this behaviour. I only seems to output a single INSERT.


I wonder if this optimization is related to the bulk_insert_buf fer_size
server parameter? You may be able to make very long INSERTs run faster if
you increase that buffer. See
http://dev.mysql.com/doc/refman/5.0/...variables.html

Regards,
Bill K.

Thanks for the info. I will give it a try.
Mar 9 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3635
by: Thomi Baechler | last post by:
Hello Everybody I run the following query against to identical databases. Execution time on the first DB is 0 seconds, on the other 6 seconds! SELECT dbo.HRMABZ.EMPKEY , dbo.HRMABZ.CONNUMB , dbo.HRM_CALENDER.Datum, dbo.HRMABZ.ABZTXT FROM dbo.HRM_CALENDER INNER JOIN dbo.HRMABZ ON dbo.HRM_CALENDER.Datum >= dbo.HRMABZ.ABZDATF
12
2649
by: Neil | last post by:
I previously posted re. this, but thought I'd try again with a summary of facts. I have an Access 2000 MDB with a SQL Server 7 back end. There is a view that is linked to the database via ODBC and has been in place for several years without any performance problems. Recently I added a couple of fields to the output of the view, and it became very slow when scrolling. When just opened in the database window, the linked view takes about...
0
1323
by: aaronk321 | last post by:
I'm restoring a 14 gig db into a new database. The restore process took 3 hours to complete. How can I make the restore faster and How can I determine the progress of the restore. thanks
7
2863
by: Jim Lawton | last post by:
I'm not sure where my problem lies, but someone here might have a suggestion. I'm developing a .NET web application, (but I don't really) think that's relevant. I'm running MySQL 4.1.7-nt on my laptop, and I'm accessing it through ODBC (MyODBC-3.51.10-x86-win-32bit). I already had the application running OK on my desktop, and when I created the same environment on the laptop, retrieving trivial amounts of data (5 rows) from
6
11330
by: Soeren Gerlach | last post by:
Hi, some weeks ago I started to develop an application using Postgresql the first time. I'm running 7.4.3 on a Linux box with a plain 2.6.7 kernel, the storage is handled by 5 SATA disks, managed by a 3ware controller and using a xfs filesystem. The DB server is a 3 Ghz P4 with 4 Gig of Ram, so the machine is quite fast for most purposes I need it; the DB server is a pure DB server, theres no application running on it. I dump and...
4
2464
by: Ray | last post by:
Does anyone out there have experience with using Db2 8.2 with a program called MISys (also known as ACCPAC). I am having some problems with the application running exteremly slow on workstations throughout my office. One of the more accessed tables, which only has 3000 rows, take almost 30 seconds to open through their application. MISys insists that it is a db2 tweaking problem and to check my configuration settings. When I select the...
3
5039
by: jku | last post by:
Hello, after installing DB2 V8.2.3 on OpenSuse 10.1 (in vmware) we have created a database instance with the restore command: db2 "restore database $OLD_DB user db2inst1 using db2inst1 from $BACKUP_DIRECTORY taken at $TS into $DB". We have activated the database but the first connection is still slow. db2 connect to <db_name>
4
13859
by: bluepete | last post by:
I have migrated to Vista Business and installed IIS 7.0. I moved some classic ASP pages from my old XP box running IIS to the new box. I've made no changes to the code, which worked fine on the old machine. They also run fine on a remote server. On the new machine, the ASP pages are running extremely slow and timing out with the error "cannot display the web page." I've verified that I'm making connections to my Access database (which is...
6
1275
by: Cirene | last post by:
I have VS2008 and the IDE is super slow. I updated to the latest version. Is there a way to find out why it's acting so slow?
0
9842
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9682
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10271
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7806
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7000
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5668
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5848
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3124
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.