Reputation
4,954
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 8 14
Newest
 Yearling
Impact
~572k people reached

1d
awarded  Yearling
May
19
comment Indexing Multiple Possibly Missing Columns
I would be interested to read that reference.
May
19
comment How to get number of locks acquired by my MySQL Query?
If that 'example query' hits one row and store_id is indexed, then the query will be so fast that locks, etc, won't matter. If, on the other hand, it hits a million rows, then let's discuss how to rewrite the query.
May
19
comment Converting MySQL master-master replication to master-standby
Probably both should be STOPped. Then probably need a CHANGE MASTER, not just a START. Do research on how to create the first Slave from a Master. That's effectively what you will be doing.
May
18
comment Converting MySQL master-master replication to master-standby
Suggest you start by investigating how bad the dup key is. (You won't be able to see how many more dup keys there are without skipping past that one and hitting the next.)
May
18
comment Converting MySQL master-master replication to master-standby
The safes way to get them back in sync is to dump db1 and copy onto db2.
May
18
comment Converting MySQL master-master replication to master-standby
You have probably lost data -- same AI used on both Masters. You would need to manually discover the problem(s) and decide whether to 'lose' the data or manually fix it.
May
18
comment Converting MySQL master-master replication to master-standby
After repairing the data, you might get away with thos settings. And they only cover AUTO_INCREMENTs, not other dups.
May
18
comment Converting MySQL master-master replication to master-standby
I dislike writing to both Masters, because of dup-key hassles, etc. I like M-M when used just as Master (read-write) + standby (read-only).
May
18
comment Converting MySQL master-master replication to master-standby
Converting to Master (db1) - Slave (db2) is just STOP SLAVE on db1. But I prefer to leave it M-M, but write to only one Master.
May
18
comment Converting MySQL master-master replication to master-standby
Eh? You want to failover to something that is 3 days old?
May
18
comment Delete and Recreate Indexes in MySQL to reduce table size for copying the db to a new server?
Subtle diff.... (Next time suggest using different string lengths; that would have jarred me into noticing.)
May
18
comment How to get number of locks acquired by my MySQL Query?
And what will you do with the knowledge of the number of locks?
May
18
comment Delete and Recreate Indexes in MySQL to reduce table size for copying the db to a new server?
What's the bandwidth between the servers? If low, compress the file(s) during the transmission.
May
18
comment Delete and Recreate Indexes in MySQL to reduce table size for copying the db to a new server?
Leave out the copy of the .MYI file to save half the transfer time, at the cost of an unknown REPAIR time.
May
18
comment Indexing Multiple Possibly Missing Columns
NOT IN ( SELECT ... ) is very inefficient. Change to LEFT JOIN ... WHERE ... IS NULL.
May
18
comment Indexing Multiple Possibly Missing Columns
WHERE weight < 20 begs for INDEX(weight).
May
18
comment Indexing Multiple Possibly Missing Columns
Whenever you use LIMIT, have an ORDER BY.
May
18
comment How to tackle myPHP Admin localhost error
Not a MySQL issue.
May
18
comment Career Database Design
Formulate the SELECTs that you will need.