Re: Global read lock on delete

2015-12-09 Thread Laurynas Biveinis
ema metadata lockspur The global read lock is in MDL_INTENTION_EXCLUSIVE mode, as an intention lock it's not an actual global read lock in effect, but rather something to prevent another thread to take GRL while GRL-incompatible statements (DELETE, LOCK TABLES) are still running. -- Laurynas

Re: Global read lock on delete

2015-12-09 Thread shawn l.green
MDL_EXPLICITSchema metadata lock spru 270022 MDL_INTENTION_EXCLUSIVE MDL_TRANSACTION Schema metadata lock spru You gave the answer in your last statement: "All tables are myisam" . The MyISAM storage engine is not transactional and it does not do row-level locking. All UPDATE and DELETE

Re: Global read lock on delete

2015-12-09 Thread shawn l.green
rrent UPDATE or DELETE with an INSERT. The UPDATE or DELETE will always ask for a full table lock. It only allows for concurrent SELECT and INSERT commands to happen at the same time to the same MyISAM table. http://dev.mysql.com/doc/refman/5.6/en/concurrent-inserts.html -- Shawn Green MySQL S

Re: Global read lock on delete

2015-12-09 Thread Artem Kuchin
09.12.2015 19:35, shawn l.green пишет: INSERT operations are special as you can enable a mode to allow INSERTs to happen only at the end of the file and not be blocked while one of the other two operations are in progress. Cannot find anything about that. Can you be a little more specific

Re: Global read lock on delete

2015-12-09 Thread Artem Kuchin
MDL_INTENTION_EXCLUSIVE MDL_TRANSACTION Schema metadata lock spru You gave the answer in your last statement: "All tables are myisam" . The MyISAM storage engine is not transactional and it does not do row-level locking. All UPDATE and DELETE operations require a full table lock to perform

Re: Global read lock on delete

2015-12-09 Thread shawn l.green
COMMAND:Query STATE:Waiting for table metadata lock USER:spru DB:spru LOCK TABLES searchsobjects WRITE, searches WRITE ID: 268871 TIME:3 COMMAND:Query STATE:updating USER:spru DB:spru DELETE FROM searchsobjects WHERE search_id IN

Global read lock on delete

2015-12-09 Thread Artem Kuchin
metadata lock USER:spru DB:spru LOCK TABLES searchsobjects WRITE, searches WRITE ID: 268871 TIME:3 COMMAND:Query STATE:updating USER:spru DB:spru DELETE FROM searchsobjects WHERE search_id IN

Possible bug with event and delete...limit ?

2014-09-23 Thread Johan De Meersman
9-19 19:14:21' ON COMPLETION PRESERVE DISABLE COMMENT 'Cleanup to not kill the disk' DO delete from syslog where logtime < "2014-07-20" limit 1 character_set_client: latin1 collation_connection: latin1_swedish_ci Database Collation: latin1_swe

RE: Performance of delete using in

2013-04-30 Thread Rick James
Please provide SHOW CREATE TABLE cdsem_event_message_idx \G EXPLAIN SELECT * FROM cdsem_event_message_idx where event_id in () \G SHOW VARIABLES LIKE 'autocommit'; These can impact DELETE speed: * secondary indexes * whether event_id is indexed. * disk type

Re: Performance of delete using in

2013-04-24 Thread Denis Jedig
Larry, Am 25.04.2013 02:19, schrieb Larry Martell: delete from cdsem_event_message_idx where event_id in () The in clause has around 1,500 items in it. Consider creating a temporary table, filling it with your "IN" values and joining it to cdsem_event_message_idx ON ev

Re: Performance of delete using in

2013-04-24 Thread Larry Martell
I changed it to delete one row at a time and it's taking 3 minutes. On Wed, Apr 24, 2013 at 6:52 PM, Larry Martell wrote: > That is the entire sql statement - I didn't think I needed to list the > 1500 ints that are in the in clause. > > Also want to mention that I ran ex

Re: Performance of delete using in

2013-04-24 Thread Larry Martell
on rows and 9 columns that are all >> int except for 2 varchar(255) - i.e. not that big of a table. I am >> executing a delete from that table like this: >> >> delete from cdsem_event_message_idx where event_id in () >> >> The in clause has around 1,500 items i

Re: Inaccurate return value from DELETE query

2012-02-11 Thread luckyx_cool_boy
Khan Date: Sat, 11 Feb 2012 22:03:45 To: Subject: Inaccurate return value from DELETE query CREATE TABLE `People` ( `friday_id` bigint(20) NOT NULL, `parent_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`friday_id`), KEY `parent_id` (`parent_id`), CONSTRAINT `People_ibfk_1` FOREIGN

Inaccurate return value from DELETE query

2012-02-11 Thread Fayaz Yusuf Khan
CREATE TABLE `People` ( `friday_id` bigint(20) NOT NULL, `parent_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`friday_id`), KEY `parent_id` (`parent_id`), CONSTRAINT `People_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `People` (`friday_id`) ON DELETE CASCADE ) ENGINE=InnoDB; INSERT INTO

Re: Delete from another table on update.

2012-02-06 Thread Hal�sz S�ndor
>>>> 2012/02/06 11:33 -0400, Paul Halliday >>>> Is it possible to wrap a DELETE statement in an ON DUPLICATE KEY UPDATE? Something like: ON DUPLICATE KEY UPDATE host="b1" (DELETE FROM another_table WHERE host="b1") ? <<<<<<<< No;

Delete from another table on update.

2012-02-06 Thread Paul Halliday
Is it possible to wrap a DELETE statement in an ON DUPLICATE KEY UPDATE? Something like: ON DUPLICATE KEY UPDATE host="b1" (DELETE FROM another_table WHERE host="b1") ? Thanks. -- Paul Halliday http://www.squertproject.org/ -- MySQL General Mailing List For

Re: delete all hosts using a wildcard

2012-01-16 Thread Govinda
> > I think what Paul (who wrote a book on MySQL, by the way) was getting at was > that you risk what database folk call "referential integrity issues" if you > mess with *any* data without knowing where else it is used. > [snip]... that was really an important post, excellently written! -Govi

Re: delete all hosts using a wildcard

2012-01-16 Thread Jan Steinman
> From: Tim Dunphy > > ... this is just a test environment so getting rid of those users won't have > any meaningful impact... I think what Paul (who wrote a book on MySQL, by the way) was getting at was that you risk what database folk call "referential integrity issues" if you mess with *an

Re: delete all hosts using a wildcard

2012-01-16 Thread Claudio Nanni
;t have any meaningful impact. Also previewing what you > will be deleting by using a select is great advice I intend to use. > > Best > tim > > - Original Message - > From: "Paul DuBois" > To: "Tim Dunphy" > Cc: mysql@lists.mysql.com > Sen

Re: delete all hosts using a wildcard

2012-01-14 Thread Tim Dunphy
ice I intend to use. Best tim - Original Message - From: "Paul DuBois" To: "Tim Dunphy" Cc: mysql@lists.mysql.com Sent: Saturday, January 14, 2012 6:46:38 PM Subject: Re: delete all hosts using a wildcard On Jan 14, 2012, at 5:23 PM, Tim Dunphy wrote: > hello l

Re: delete all hosts using a wildcard

2012-01-14 Thread Paul DuBois
On Jan 14, 2012, at 5:23 PM, Tim Dunphy wrote: > hello list, > > I have a number of hosts that I would like to delete using a wildcard (%) > symbol. > > Here is the query I am using: > > mysql> delete from mysql.user where user='%.summitnjhome.com

Re: delete syntax

2011-12-02 Thread Govinda
>> >>> well, i am using delete/insert-statements since 10 years to maintain >>> users since you only have to know the tables in the database "mysql" >>> and use "flush privileges" after changes >>> >>> The privileges should b

Re: delete syntax

2011-12-02 Thread Reindl Harald
Am 02.12.2011 21:59, schrieb Claudio Nanni: > 2011/12/2 Reindl Harald > >> well, i am using delete/insert-statements since 10 years to maintain >> users since you only have to know the tables in the database "mysql" >> and use "flush privileges"

Re: delete syntax

2011-12-02 Thread Claudio Nanni
2011/12/2 Reindl Harald > well, i am using delete/insert-statements since 10 years to maintain > users since you only have to know the tables in the database "mysql" > and use "flush privileges" after changes > > The privileges should be maintained only using

Re: delete syntax

2011-12-01 Thread Reindl Harald
well, i am using delete/insert-statements since 10 years to maintain users since you only have to know the tables in the database "mysql" and use "flush privileges" after changes DROP USER is the only SINGLE COMMAND as long as you do not use table/column-privileges there are

Re: delete syntax

2011-12-01 Thread Stdranwl
t; > and look what records are affected to make sure the were-statement works as > expected and then use "CURSOR UP" and edit the last command to "delete > from" > > not only doing this while unsure with escapes protects you against logical > mistakes like f

Re: delete syntax

2011-12-01 Thread Reindl Harald
ALWAYS start with "select * from mysql.user where user='mail_admin' and host like '\%';" and look what records are affected to make sure the were-statement works as expected and then use "CURSOR UP" and edit the last command to "delete from&qu

Re: delete syntax

2011-12-01 Thread Shiva
You can try delete from mysql.user where user='mail_admin' and host like '\%' ; Note: I haven't tested it and since % is a wildcard you need to escape it. Best, Shiv On Thu, Dec 1, 2011 at 6:09 PM, Tim Dunphy wrote: > Hello Krishna, > > > Thanks but I p

Re: delete syntax

2011-12-01 Thread Keith Keller
On 2011-12-02, Tim Dunphy wrote: > > Thanks but I probably should have noted that I only want to delete the > wildcard user. There are other users I would prefer to not delete. > > mysql> select user,host from mysql.user where user='mail_admin'; > ++-

Re: delete syntax

2011-12-01 Thread Tim Dunphy
Hello Krishna, Thanks but I probably should have noted that I only want to delete the wildcard user. There are other users I would prefer to not delete. mysql> select user,host from mysql.user where user='mail_admin'; ++---+ | user

Re: delete syntax

2011-12-01 Thread Krishna Chandra Prajapati
delete from mysql.user where user='mail_admin'; Krishna On Fri, Dec 2, 2011 at 7:23 AM, Tim Dunphy wrote: > hello list, > > I am attempting to delete a user from the mysql.user table without > success. > > mysql> delete from mysql.user where user='mail_a

delete syntax

2011-12-01 Thread Tim Dunphy
hello list, I am attempting to delete a user from the mysql.user table without success. mysql> delete from mysql.user where user='mail_admin@%'; Query OK, 0 rows affected (0.00 sec) mysql> select user,host from mysql.user where

cascade delete question

2011-06-17 Thread Derek Knapp
I have the following 3 tables.. If I have a contact with just notes (no tasks), then I can simply do delete from contacts where id = ; but if the contact has a task, then I get the following error, ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails

Re: Kill DELETE Query

2010-12-21 Thread 杨涛涛
Yeah. The "Delete from tablename " will remove the record one by one. So you can cancel it whenever you don't need to continue. David Yeung, In China, Beijing. My First Blog:http://yueliangdao0608.cublog.cn My Second Blog:http://yueliangdao0608.blog.51cto.com 2010/12/1

Re: Kill DELETE Query

2010-12-17 Thread Willy Mularto
ure approach. Another question > is if I kill the process will it crash the table? Thanks. > > > > sangprabv > sangpr...@gmail.com > http://www.petitiononline.com/froyo/ > > > On Dec 17, 2010, at 12:06 PM, Ananda Kumar wrote: > >> If u have used a sto

Re: Kill DELETE Query

2010-12-16 Thread Ananda Kumar
petitiononline.com/froyo/ > > > On Dec 17, 2010, at 12:06 PM, Ananda Kumar wrote: > > If u have used a stored proc to delete the rows, and commting freqently, > then the kill will happen faster. > If you have just used "delete from table_name where , then it > would ta

Re: Kill DELETE Query

2010-12-16 Thread Willy Mularto
to delete the rows, and commting freqently, then > the kill will happen faster. > If you have just used "delete from table_name where , then it > would take toot much time to rollback all the deleted but not commited rows. > > Regards > anandkl > > On Fri, Dec 17, 2010

Re: Kill DELETE Query

2010-12-16 Thread Ananda Kumar
If u have used a stored proc to delete the rows, and commting freqently, then the kill will happen faster. If you have just used "delete from table_name where , then it would take toot much time to rollback all the deleted but not commited rows. Regards anandkl On Fri, Dec 17, 2010 at 8:

Kill DELETE Query

2010-12-16 Thread Willy Mularto
Hi List, I run a delete query to delete around 1 million rows in innodb table, It's been hours and still unfinish. Is it safe to kill that delete query process while the table is also inserting and updating other rows? Thanks. sangprabv sangpr...@gmail.com http://www.petitiononline.com/

Re: Does putting a LIMIT on a DELETE clause make any difference?

2010-09-09 Thread Johan De Meersman
Correct. To verify this, simply create a select with the same structure as your delete - the execution plan will be similar. I do not believe limit will help you, however, as it is only applied after execution, when the full dataset is known. On Thu, Sep 9, 2010 at 8:06 AM, Ananda Kumar wrote

Re: Does putting a LIMIT on a DELETE clause make any difference?

2010-09-08 Thread Ananda Kumar
Vincent, Since the column is indexed, it would use the index during the delete. regards anandkl On Thu, Sep 9, 2010 at 5:47 AM, Daevid Vincent wrote: > I am curious about something. > > I have a "glue" or "hanging" table like so: > > CREATE TABLE `f

Does putting a LIMIT on a DELETE clause make any difference?

2010-09-08 Thread Daevid Vincent
y` (`id_fault_impact`,`id_fault_system_impact`), KEY `id_fault_system_impact` (`id_fault_system_impact`), CONSTRAINT `fault_impact_has_fault_system_impact_ibfk_1` FOREIGN KEY (`id_fault_impact`) REFERENCES `fault_impact` (`id_fault_impact`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fault_impact_has_fault_

Re: AFTER Delete Trigger question

2010-06-18 Thread João Cândido de Souza Neto
As far as I know, you can´t change data on the same table in triggers. "Kevin Labecot" escreveu na mensagem news:4d2ce38b-d169-478b-aebf-c19f20dce...@labecot.fr... Hi, Is there a way to update the same table on a delete trigger ? I need to call an UPDATE statement when a del

AFTER Delete Trigger question

2010-06-18 Thread Kevin Labecot
Hi,Is there a way to update the same table on a delete trigger ?I need to call an UPDATE statement when a delete occurs.Best regards -- Kevin Labecot, Innovanticwww.innovantic.frTél. : 05.56.45.60.54

Re: Replication : request DELETE is not executed on slave

2010-04-28 Thread Tom Worster
> David. > > -Message d'origine- > De : Mattia Merzi [mailto:mattia.me...@gmail.com] > Envoyé : mercredi 28 avril 2010 17:54 > À : mysql@lists.mysql.com > Objet : Re: Replication : request DELETE is not executed on slave > > AFAIR you can use LIMIT with rep

RE: Replication : request DELETE is not executed on slave

2010-04-28 Thread David Florella
Hi, Thanks to you and everyone. I will test the same request with the ORDER BY clause. Regards, David. -Message d'origine- De : Mattia Merzi [mailto:mattia.me...@gmail.com] Envoyé : mercredi 28 avril 2010 17:54 À : mysql@lists.mysql.com Objet : Re: Replication : request D

Re: Replication : request DELETE is not executed on slave

2010-04-28 Thread Mattia Merzi
AFAIR you can use LIMIT with replication only if you use row-based replication (or mixed), that means that you must use mysql 5.1. Greetings, Mattia. 2010/4/28 Tom Worster : > 16.3.1.9. Replication and LIMIT > Replication of LIMIT clauses in DELETE, UPDATE, and INSERT ... SELECT > s

Re: Replication : request DELETE is not executed on slave

2010-04-28 Thread Tom Worster
16.3.1.9. Replication and LIMIT Replication of LIMIT clauses in DELETE, UPDATE, and INSERT ... SELECT statements is not guaranteed, since the order of the rows affected is not defined. Such statements can be replicated correctly only if they also contain an ORDER BY clause. http://dev.mysql.com

RE: Replication : request DELETE is not executed on slave

2010-04-28 Thread Jerry Schwartz
>-Original Message- >From: David Florella [mailto:dflore...@legos.fr] >Sent: Wednesday, April 28, 2010 10:51 AM >To: mysql@lists.mysql.com >Cc: 'Krishna Chandra Prajapati' >Subject: RE: Replication : request DELETE is not executed on slave > >Hi, &g

RE: Replication : request DELETE is not executed on slave

2010-04-28 Thread David Florella
Hi, In the MySQL documentation, it is written that the two versions are compatible to make a replication. It seems that if I make a DELETE without the 'LIMIT 7500', the query is replicated to the slave. Regards, David. -Message d'origine- De : Krishna Ch

Re: Replication : request DELETE is not executed on slave

2010-04-28 Thread Krishna Chandra Prajapati
or some thing else. Does the delete command exits in binlog. Regards, Krishna On Wed, Apr 28, 2010 at 2:37 PM, David Florella wrote: > Hi, > > > > I am using MySQL replication : > > > > - The version of the master is 4.1.12-log > > - T

Replication : request DELETE is not executed on slave

2010-04-28 Thread David Florella
Hi, I am using MySQL replication : - The version of the master is 4.1.12-log - The version of the slave is 5.0.41 When I use the query '' DELETE QUICK FROM [TABLE] WHERE [field] < 'xx' LIMIT 7500", the query is executed on the

RE: Make delete requests without impact on a database

2010-04-15 Thread David Florella
? Regards, David. -Message d'origine- De : phark...@gmail.com [mailto:phark...@gmail.com] De la part de Perrin Harkins Envoyé : jeudi 15 avril 2010 02:36 À : Dan Nelson Cc : David Florella; mysql@lists.mysql.com Objet : Re: Make delete requests without impact on a database On Wed

Re: Make delete requests without impact on a database

2010-04-14 Thread Perrin Harkins
On Wed, Apr 14, 2010 at 10:22 AM, Dan Nelson wrote: > Switch to InnoDB :) Seconded. No need to complicate your life with MyISAM workarounds when InnoDB solves this problem already. - Perrin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http:/

RE: Make delete requests without impact on a database

2010-04-14 Thread Daevid Vincent
> -Original Message- > From: Dan Nelson [mailto:dnel...@allantgroup.com] > Sent: Wednesday, April 14, 2010 7:23 AM > To: David Florella > Cc: mysql@lists.mysql.com > Subject: Re: Make delete requests without impact on a database > > In the last episode (Apr

Re: Make delete requests without impact on a database

2010-04-14 Thread Carsten Pedersen
mos skrev: At 01:20 PM 4/14/2010, Carsten Pedersen wrote: Been there, done that. It's a maintenance nightmare. Why is it a maintenance nightmare? I've been using this technique for a couple of years to store large amounts of data and it has been working just fine. In a previous reply, you

Re: Make delete requests without impact on a database

2010-04-14 Thread mos
eleted and then deleting them later requires more work for the database and there needs to be a lull in order to delete the data. He will also have to optimize the table to get rid of the deleted rows and this requires the table to be locked. Like I said, both methods will work. It depends on

Re: Make delete requests without impact on a database

2010-04-14 Thread Carsten Pedersen
Been there, done that. It's a maintenance nightmare. Another idea: Have a separate "deleted" table with the IDs of the rows that you consider deleted. Re-write your queries to do a left-join-not-in-the-other-table agains the "delete" table. Then, either wait for a mai

Re: Make delete requests without impact on a database

2010-04-14 Thread mos
It looks like you only want to keep the current data, perhaps the current day's worth, and delete the old data. I would store the data in separate MySIAM tables, each table would represent a date, like D20100413 and D20100414. Your program will decide which table to insert the data in

Re: Make delete requests without impact on a database

2010-04-14 Thread Dan Nelson
In the last episode (Apr 14), David Florella said: > I am using MySQL version 4.1.12-log. All the databases on it are using > MyISAM database engine. > > Every day, I delete almost 9 rows on a table of 3 153 916 rows. > > To delete the rows, I use a request like this :

Make delete requests without impact on a database

2010-04-14 Thread David Florella
Hi, I am using MySQL version 4.1.12-log. All the databases on it are using MyISAM database engine. Every day, I delete almost 9 rows on a table of 3 153 916 rows. To delete the rows, I use a request like this : "DELETE QUICK FROM [table] WHERE [column] < '2010-0

Re: DELETE CASCADE

2010-04-06 Thread muhammad subair
B DEFAULT CHARSET=latin1 > > > CREATE TABLE `cfg_cluster_info` ( > `cluster` varbinary(128) NOT NULL, > `admin` varbinary(128) NOT NULL, > PRIMARY KEY (`cluster`), > CONSTRAINT `cfg_cluster_info_ibfk_1` FOREIGN KEY (`cluster`) REFERENCES > `cfg_tags` (`cluster`) ON DELETE

DELETE CASCADE

2010-04-05 Thread Aveek Misra
) NOT NULL, `admin` varbinary(128) NOT NULL, PRIMARY KEY (`cluster`), CONSTRAINT `cfg_cluster_info_ibfk_1` FOREIGN KEY (`cluster`) REFERENCES `cfg_tags` (`cluster`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 mysql> select * from cfg_tags; +---+--++ | clus

RE: Question about DELETE

2010-03-18 Thread Price, Randall
Would wrapping the DELETE in a TRANSACTION improve the performance any? Also, when you say to "after each mass delete, rebuilt the indexes..." would running OPTIMIZE TABLE tablename; be the way to do this, or how? Thanks, -Randall Price From: Ananda Kumar [mailto:anan...@gmail

Re: Question about DELETE

2010-03-18 Thread Ananda Kumar
delete will also cause the undo(before image) to be generated, in case u want to rollback. This will also add up to the delete completion time. After each mass delete, rebuild indexes to remove gaps in indexes(remove fragmentatio in the index). This will improve next delete or select. regards

RE: Question about DELETE

2010-03-18 Thread Price, Randall
I have the MySQL Administrator running and on the Server Connections menu on the Threads tab I can see the thread running (i.e., DELETE FROM table WHERE ...). I refresh this tab periodically to see what stage the process is in. It does not display any information about rebuilding indexes

RE: Question about DELETE

2010-03-18 Thread Ian Simpson
y all the rows it needs to delete. On Thu, 2010-03-18 at 10:03 -0400, Price, Randall wrote: > Thanks for your responses on this. > > However, I suspect that the indexes are being rebuilt over and over during > the mass delete operation. > > If I delete a small number of rec

RE: Question about DELETE

2010-03-18 Thread Price, Randall
Thanks for your responses on this. However, I suspect that the indexes are being rebuilt over and over during the mass delete operation. If I delete a small number of records (i.e., DELETE FROM table WHERE id BETWEEN 1 AND 5) it may only take a minute or so. If I delete a large number of

Re: Question about DELETE

2010-03-18 Thread Johan De Meersman
Given that OP is talking about a single delete statement, I'm gonna be very surprised if he manages to squeeze an intermediate commit in there :-) For a single-statement delete on a single table, the indexes will be rebuilt only once. I'm not entirely sure what happens to cascaded delet

Re: Question about DELETE

2010-03-17 Thread Ananda Kumar
AM, Price, Randall wrote: > Hello, > > I have a simple question about deleting records from INNODB tables. I have > a master table with a few child tables linked via Foreign Key constraints. > Each table has several indexes as well. > > My question is: if I delete man

Question about DELETE

2010-03-17 Thread Price, Randall
Hello, I have a simple question about deleting records from INNODB tables. I have a master table with a few child tables linked via Foreign Key constraints. Each table has several indexes as well. My question is: if I delete many records in a single delete statement (i.e., DELETE FROM

RE: Very slow delete for Master / Child tables with millions of rows

2010-03-11 Thread Daevid Vincent
This isn't surprising, especially if you have foreign keys or indexes, as each DELETE will cascade and require a rebuild of the indexes (just as an INSERT does). Make sure that for each DELETE you are using LIMIT 1; if it's in a loop (and you're not deleting via PK, but it's

Very slow delete for Master / Child tables with millions of rows

2010-03-11 Thread Price, Randall
ts.mysql.com Subject: Re: Very slow delete for Master / Child tables with millions of rows Hi Randall, How much memory is allocated to innodb_buffer_pool_size. Please send your mysql configuration file (my.cnf) Thanks, Krishna On Thu, Mar 11, 2010 at 8:57 PM, Price, Randall mailto:rand

Re: Very slow delete for Master / Child tables with millions of rows

2010-03-11 Thread Krishna Chandra Prajapati
Hi Randall, How much memory is allocated to innodb_buffer_pool_size. Please send your mysql configuration file (my.cnf) Thanks, Krishna On Thu, Mar 11, 2010 at 8:57 PM, Price, Randall wrote: > I am experiencing very slow deletes when I delete a record from a master > table and have cas

Re: Very slow delete for Master / Child tables with millions of rows

2010-03-11 Thread Johan De Meersman
If you really have to loop through the entire set deleting record by record, I'm not surprised it's slow. Could you change your application to loop through the records doing "stuff" without deleting (maybe even "do stuff" en masse), and afterwards do a mass d

Very slow delete for Master / Child tables with millions of rows

2010-03-11 Thread Price, Randall
I am experiencing very slow deletes when I delete a record from a master table and have cascading deletes on two detail tables. I have an application that looks for records in the master table that are older than "X" days and delete them. The cascasing deletes then handles deletin

Re: ERROR 1442 (HY000) when delete inside trigger statement

2010-02-19 Thread viraj
> > That is correct. There is as far as I know no way in a MySQL trigger to > neither to do operations on the table the trigger belongs to (obviously > except the row that the trigger is operating on through the NEW variables) > nor reject an insert, update, or delete. > than

Re: ERROR 1442 (HY000) when delete inside trigger statement

2010-02-18 Thread Jesper Wisborg Krogh
--- Original Message --- > From: viraj > To: mysql@lists.mysql.com > Sent: 19/2/10, 05:48:41 > Subject: ERROR 1442 (HY000) when delete > inside trigger statement > issue: ERROR 1442 (HY000): Can't update table 'T1' in stored > function/trigger becau

ERROR 1442 (HY000) when delete inside trigger statement

2010-02-18 Thread viraj
i have two table, T1, T2. and 1 trigger. trigger is before update on T1 and it updates some values in T2. once it's done, the trigger tries to delete the subject row of T1 (delete from T1 where id = new.id) i tried with second trigger on T2 (after/before update) and with a procedure inside

Re: MySQL Replication Delete is not gettting replicated

2010-01-18 Thread Suresh Kuna
user=mysql >> > >> > [mysqld_safe] >> > err-log=/var/var/lib/mysql/mysql.log >> > pid-file=/var/lib/mysql/mysql.privatedns.com.pid >> > >> > Please let me know if I need to add any parameter to enable this >> > replication. &

Re: MySQL Replication Delete is not gettting replicated

2010-01-18 Thread Carlos Proal
Hi Manasi Yes, you only need the repl_slave_priv, the show grants should give you something like: GRANT REPLICATION SLAVE ON *.* TO 'replication'@'%' IDENTIFIED BY PASSWORD '...' If thats ok, have check your binlog and relay binlog to see if them contain the

Re: MySQL Replication Delete is not gettting replicated

2010-01-18 Thread Manasi Save
uoting Anand kumar : > > can you give us the configuration(.cnf) file from both the masters ? > --Anand > On Sat, Jan 16, 2010 at 3:06 PM, Manasi Save > <mailto:manasi.s...@artificialmachines.com>> wrote: > > Hi All, > > > I

Re: MySQL Replication Delete is not gettting replicated

2010-01-18 Thread Carlos Proal
table the data is getting replicated. But When I am doing delete on that same table. the data is only getting deleted only on the server where I am doing delete. but it is not getting replicated on its slave. Even if I am doing truncate it is not getting r

Re: MySQL Replication Delete is not gettting replicated

2010-01-17 Thread Manasi Save
ervers. When I am inserting or updating any data in a regular table the data is getting replicated. But When I am doing delete on that same table. the data is only getting deleted only on the server where I am doing delete. but it is not getting replicated on its slave. Even if I am doing truncate

MySQL Replication Delete is not gettting replicated

2010-01-16 Thread Manasi Save
Hi All,I have configured MySQL Master-Master Replication on my servers. When I am inserting or updating any data in a regular table the data is getting replicated.But When I am doing delete on that same table. the data is only getting deleted only on the server where I am doing delete. but it is

Re: High Overhead On Active Insert And Delete Table

2010-01-03 Thread sureshkumarilu
My first impression after looking at the table structure is 1 the number of indexes present are very huge and each insert or delete will act as an extra insert or delete of each and every index created. 2 what type of select stmts are going to hit this table. 3 if it is a primary key select, drop

Re: High Overhead On Active Insert And Delete Table

2010-01-03 Thread Willy Mularto
sh Kuna --Original Message-- From: Willy Mularto To: mysql@lists.mysql.com Subject: High Overhead On Active Insert And Delete Table Sent: Jan 3, 2010 4:22 PM Hi list, I have a table which is very active in operation INSERT INTO and DELETE, approximately there will be around 2millions INSER

Re: High Overhead On Active Insert And Delete Table

2010-01-03 Thread sureshkumarilu
Hi Willy, What is the engine you are using for the table? Paste the table structure. Thanks, Suresh Kuna --Original Message-- From: Willy Mularto To: mysql@lists.mysql.com Subject: High Overhead On Active Insert And Delete Table Sent: Jan 3, 2010 4:22 PM Hi list, I have a table which is

High Overhead On Active Insert And Delete Table

2010-01-03 Thread Willy Mularto
Hi list, I have a table which is very active in operation INSERT INTO and DELETE, approximately there will be around 2millions INSERT and DELETE operation per day. And I see the overhead is getting very high, I must do OPTIMIZE TABLE query every time. Is there any other option to solve

Re: Delete table definition without .frm files.

2009-12-14 Thread Johan De Meersman
:13 PM, Manasi Save < manasi.s...@artificialmachines.com> wrote: > Thanks Johan, > > I tried doing this. When I try to delete that empty table it is giving me > an error saying Unknow table 'tblename'. > I have created empty .frm file at folder level. can I creat

Re: Delete table definition without .frm files.

2009-12-14 Thread Manasi Save
Thanks Johan, I tried doing this. When I try to delete that empty table it is giving me an error saying Unknow table 'tblename'. I have created empty .frm file at folder level. can I create one from mysql. Thanks in advance. -- Regards, Manasi Save Quoting Johan De Meers

Re: Delete table definition without .frm files.

2009-12-14 Thread Johan De Meersman
uite > strange- > > > I have deleted .frm files but not by issuing Drop table command I deleted > the folder from backend at folder level as there was some problem. > > > Is there any way I can delete this definition from innodb datafile? > > > Thanks in advance. &g

Delete table definition without .frm files.

2009-12-13 Thread Manasi Save
Hi All,I really don't know how to elaborate this problem because it is quite strange-I have deleted .frm files but not by issuing Drop table command I deleted the folder from backend at folder level as there was some problem.Is there any way I can delete this definition from innodb dat

RE: DELETE DATA FROM TABLE

2009-11-19 Thread Gavin Towey
Hi Krishna, Drop partition should be very quick - much faster than doing a DELETE on the same amount of data. Internally, it will be the same as doing a drop table for that partition. Regards, Gavin Towey From: Krishna Chandra Prajapati [mailto:prajapat...@gmail.com] Sent: Thursday, November

Re: DELETE DATA FROM TABLE

2009-11-19 Thread Krishna Chandra Prajapati
reclaim disk space. > > If you're using innodb with a single tablespace currently, then > unfortunately, you would have to export all your data, shutdown mysql, > change you're my.cnf & delete the tablespace & ib_log files, then restart > and re-import all your da

RE: DELETE DATA FROM TABLE

2009-11-19 Thread Gavin Towey
your data, shutdown mysql, change you're my.cnf & delete the tablespace & ib_log files, then restart and re-import all your data. If you need to do this, you should probably seek a bit more information about from this list or other sources. Regards, Gavin Towey -Original Mes

Re: DELETE DATA FROM TABLE

2009-11-19 Thread Jay Ess
Krishna Chandra Prajapati wrote: Hi Experts, I have a crm table where 12 millions records inserted/day. We are running report queries on this table and using partitioning features for faster results. we have to maintain 45 days data means 540million records. As per my calculation 540 records wil

DELETE DATA FROM TABLE

2009-11-19 Thread Krishna Chandra Prajapati
Hi Experts, I have a crm table where 12 millions records inserted/day. We are running report queries on this table and using partitioning features for faster results. we have to maintain 45 days data means 540million records. As per my calculation 540 records will use 1.8 TB of disk space. Total d

Re: Multiple Rows DELETE Fails on Replication

2009-06-26 Thread sangprabv
DELETE FROM table WHERE key LIKE '%100%' Also I tried to continously insert big numbers of new records (around 50 millions new records) and tried to delete 1 record on master, I checked the slave not synchronized. Is it just a lag? Willy On Fri, 2009-06-26 at 16:14 +0800, Moon'

Re: Multiple Rows DELETE Fails on Replication

2009-06-26 Thread Moon's Father
Could you tell me your detail statements? On Wed, Jun 24, 2009 at 9:46 AM, sangprabv wrote: > Hi, > I found every time I try to do multiple rows delete on replicated MySQL > is always failed. Is there any explanation regarding this issue and how > to solve it? TIA. > > > >

  1   2   3   4   5   6   7   8   9   10   >