From: Reindl Harald Date: May 31 2012 8:23am Subject: Re: Best practice to minimize DB server performance effect (large query) List-Archive: http://lists.mysql.com/mysql/227565 Message-Id: <4FC72A98.40207@thelounge.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig9437F1093C94F897B9403B41" --------------enig9437F1093C94F897B9403B41 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 31.05.2012 09:13, schrieb Roland RoLaNd: > Dear all,I have a task to anonymize data in 82000 =20 > record (for the time being)i've tested my script against=20 > about 30 of them, and it takes about 2.4 sec for each=20 > query to be executed. provide table structure and query example sounds like a bad design without key how can 30 updates take 2.4 seconds? > i'm seeking help with the following: > - what's the best way to run such a script without affecting the DB ser= ver performance?=20 > Should i limit the script to implement N number of records at a time?= =20 > and then sleep or is there a better way? > - What's the best practice of handling errors and warnings in such a si= tuation? > - How can i prevent the runtime errors and mysql locks? wrong question [--] Data in InnoDB tables: 6G (Tables: 49) [--] Up for: 5d 11h 17m 15s (493M q [1K qps], 43K conn, TX: 38B, RX: 14B)= [--] Reads / Writes: 89% / 11% as you can see 30 queries or even 88.000 queries must not make any trouble if you table-design is OK --------------enig9437F1093C94F897B9403B41 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/HKpgACgkQhmBjz394Ank2UwCfbVN7KwP0VDyQL07Gp7fW25VI hOkAn3uRIxtWZtW8EEsOEJIghtFO5oWX =7CDd -----END PGP SIGNATURE----- --------------enig9437F1093C94F897B9403B41--