replication of RENAME TABLE d1.t TO d2.t

2010-06-03 Thread Tom Worster
i've a need to change the name of a database and haven't done this before in our live server. while the tables are myisam, i'm not inclined to rename the dirname of d1's datafiles because i'd rather not interrupt service for other databases and i'd prefer if the renaming would replicate. can i

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.

Re: Replication : request DELETE is not executed on slave

2010-04-28 Thread Tom Worster
that you must use mysql 5.1. Greetings, Mattia. 2010/4/28 Tom Worster f...@thefsb.org: 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

Using a join-table twice in one query

2010-04-28 Thread Tom Worster
Say tables a and b each have their own id column (primary key) and sundry other columns. Table j has columns aid and bid to join a and b many-to-many. Now, I want to select the joined a/b rows where the b rows are joined to (a different set of) rows in a that meet condition x (which refers only

Re: Join syntax problem

2010-04-26 Thread Tom Worster
On 4/26/10 7:36 PM, Gary gp...@paulgdesigns.com wrote: I cant seem to get this working. $query=SELECT im.image_id, im.caption, im.where_taken, im.description, im.image_file, im.submitted, kw.fox, kw.wolves, kw.wildlife, kw.american, kw.scenic, kw.birds, kw.africa, kw.eagles, kw.hunter .

Re: More CPU or More RAM?

2010-04-21 Thread Tom Worster
I'd go with the 4G 4-core server. If you're running apache and a sensible OS, the extra cores can be helpful. So, unless you know you have a need for very large key buffers, 4G should leave the OS plenty for FS cache. Not that I actually have a clue. I really just wanted to be the first to answer

Re: Does the order of tuples in a bulk insert impact query performance?

2010-02-07 Thread Tom Worster
On 2/7/10 7:28 AM, Anthony Urso antho...@cs.ucla.edu wrote: Does the order of tuples in a bulk insert impact later query performance? E.g. will sorting the rows before a bulk insert cause queries to perform better for indexed or non-indexed fields? when i load a large body of data (using

Re: 50 things to know before migrating from Oracle to MySQL

2010-01-31 Thread Tom Worster
On 1/29/10 5:03 PM, mos mo...@fastmail.fm wrote: I noticed the article didn't say how much money you'll save by not paying through the nose for Oracle per server licensing, the cost of upgrading your hardware to get some speed out of Oracle, or the cost of having to hire one or more Oracle

RE: auto_increment without primary key in innodb ?

2010-01-25 Thread Tom Worster
it's not an innodb thing: http://dev.mysql.com/doc/refman/5.0/en/create-table.html Note There can be only one AUTO_INCREMENT column per table, it must be indexed, and it cannot have a DEFAULT value. An AUTO_INCREMENT column works properly only if it contains only positive values. Inserting a

Re: upgrading mysql

2010-01-12 Thread Tom Worster
How about: 1 shut down the slave, upgrade it, restart it, let it catch up. 2 shut down the master, upgrade it, restart it, let the slave catch up. ? On 1/12/10 12:34 PM, Lawrence Sorrillo sorri...@jlab.org wrote: Hi: I want to upgrade a master and slave server from mysql 4.1 to mysql

Re: upgrading mysql

2010-01-12 Thread Tom Worster
machine) . I can do what I am proposing in parallel. Do you see it as problematic? ~Lawrence Tom Worster wrote: How about: 1 shut down the slave, upgrade it, restart it, let it catch up. 2 shut down the master, upgrade it, restart it, let the slave catch up. ? On 1

Re: Probability Selects

2010-01-07 Thread Tom Worster
On 1/7/10 3:10 PM, Matt Neimeyer m...@neimeyer.org wrote: I'm trying to select names at random from a table that contains the name and the frequency at which it is actually used in society. The table is defined as follows: CREATE TABLE `MaleNames` ( `Name_ID` int(11) NOT NULL

Re: Aborted_connects is incresing repidly

2009-12-30 Thread Tom Worster
On 12/30/09 1:13 AM, Jeetendra Ranjan jeetendra.ran...@sampatti.com wrote: Hi, My MySQL server Aborted_connects status is showing 8692 and is rapidly increasing. What are reasons and how do i decrease the same? We are using connect() method in PHP code and have tried below command

Re: Help Save MySQL

2009-12-19 Thread Tom Worster
On 12/18/09 12:41 PM, Douglas Nelson douglas.nel...@sun.com wrote: You guys are incredibly naive, Oracle has promised to support MySQL for the next 5 years. thanks. you too. Who better to have stewardship of a database product then the leading database supplier. almost anyone, since you

copying a static table

2009-12-17 Thread Tom Worster
i have a large myisam table (about 3gb) that is updated once a day in the middle of the night. when it is not being updated, is there any reason not to copy it out with rsync without shutting down the server or flush tables with read lock or whatever? -- MySQL General Mailing List For list

Re: Help saving MySQL

2009-12-14 Thread Tom Worster
On 12/14/09 1:49 AM, Claudio Nanni claudio.na...@gmail.com wrote: If he really cared about MySQL he would have not sold it or prevent from selling it to Sun. i don't see the logic in this sentence. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: Help saving MySQL

2009-12-14 Thread Tom Worster
On 12/13/09 11:23 AM, Neil Aggarwal n...@jammconsulting.com wrote: Doug: I do not see anyone willing to put up anything to support mysql... you don't like it... put up a billion dollars an take control or shut the heck up! Assuming MySQL as it stands today is 100% open source, I

Re: Help saving MySQL

2009-12-14 Thread Tom Worster
of switching to Postgres, to a fork, start a new project, or quit dba for other real open source spirit journey. The community and open spirit is important not the product. Thats my view. Thanks Monty, always, for your gift. Claudio On 14 dec 2009 19:36, Tom Worster f...@thefsb.org wrote: On 12

does mysqlhotcopy affect the key buffer?

2009-12-11 Thread Tom Worster
i run mysqlhotcopy on each database once every three hours. i happened to be running my cache warmer this afternoon, which logs timing for a bunch of standard randomized queries, that when the backup script ran, the query times increased by a factor of about 20 from a nice quick pace back down to

Re: Second Request: Challenging Select Statement

2009-12-07 Thread Tom Worster
On 12/7/09 5:26 AM, Victor Subervi victorsube...@gmail.com wrote: Hi; I posted this Saturday. Perhaps it's too challenging for those who read it to answer. I hope someone can. I need to write a select statement that enables me to select column 'ID' from a table where a certain value is

Re: Here's an Idea for Re-Syncing Master and Slave During Production Hours without Interrupting Users (Much)

2009-12-04 Thread Tom Worster
i have two questions. (1) innodb? (2) why delete slave logs when you can restart the slave with --skip-slave and then use CHANGE MASTER TO? tom On 12/4/09 6:34 AM, Robinson, Eric eric.robin...@psmnv.com wrote: Let's face it, sometimes the master and slave get out of sync, even when 'show

Re: Here's an Idea for Re-Syncing Master and Slave During Production Hours without Interrupting Users (Much)

2009-12-04 Thread Tom Worster
On 12/4/09 11:59 AM, Robinson, Eric eric.robin...@psmnv.com wrote: (2) why delete slave logs when you can restart the slave with --skip-slave and then use CHANGE MASTER TO? Well... I guess mainly because I didn't know about that option! I thought I needed to fake out mysql on this, but it

Re: Here's an Idea for Re-Syncing Master and Slave During Production Hours without Interrupting Users (Much)

2009-12-04 Thread Tom Worster
On 12/4/09 3:14 PM, Gavin Towey gto...@ffn.com wrote: I would say that it's very important to know why data is getting out of sync between your master and slave. Fixing those root causes would eliminate the need for this. i very much agree. the only instances of slaves getting out of whack

Re: How can I improve this query?

2009-12-02 Thread Tom Worster
On 12/2/09 11:13 AM, David Shere dsh...@steelerubber.com wrote: Tom Worster wrote: how about using LEFT JOIN: SELECT ... FROM listings a LEFT JOIN Transactions b ON b.PartNumber = a.PartNumber This gives me a result set of 456,567 lines. I'm looking for a result set of 60-70 lines

Re: How can I improve this query?

2009-12-01 Thread Tom Worster
On 12/1/09 2:21 PM, David Shere dsh...@steelerubber.com wrote: select distinct a.PartNumber as 'Part Number', ( select count(1) from Transactions b where b.PartNumber = a.PartNumber) as 'No. Sold' from listings a order by a.PartNumber It currently takes 30 seconds to run.

Re: Is LOAD INDEX INTO CACHE replicated?

2009-11-30 Thread Tom Worster
De Meersman vegiv...@tuxera.be wrote: They're not data modification statements, so no, they're not replicated. On Sun, Nov 29, 2009 at 2:06 AM, Tom Worster f...@thefsb.org wrote: Are SQL statements like CACHE INDEX or LOAD INDEX INTO CACHE replicated? If so, is there a way to prevent

Is LOAD INDEX INTO CACHE replicated?

2009-11-28 Thread Tom Worster
Are SQL statements like CACHE INDEX or LOAD INDEX INTO CACHE replicated? If so, is there a way to prevent that replication? If a slave mysqld restarts, wouldn't it need to execute CACHE INDEX and LOAD INDEX INTO CACHE statements from its --init-file? And if a master mysql restarts, would the