Updated: November 27th, 2009
Alright, I was really excited to get the HTC Hero. REALLY. I had extremely high hopes for the Hero (those are long gone) and Android (which I still do – I even began developing for it) but the Hero has so many ridiculous bugs that I am *this* close to bringing it down to the Pre level (I'm not going to dare though – Pre still leads in the "I Want To Smash This Phone Into A Wall" category).
HTC, first of all, what. the. fuck. The idea of a more attractive UI was great, by all means, but did it really have to come at the expense of lagging down the whole phone? And by that I mean LAGGING. …
A question I recently saw on Stack Overflow titled Faster way to delete matching [database] rows? prompted me to organize my thoughts and observations on the subject and quickly jot them down here.
Here is the brief description of the task: say, you have 2 MySQL tables a and b. The tables contain the same type of data, for example log entries. Now you want to delete all or a subset of the entries in table a that exist in table b.
Solutions Suggested By Others
DELETE FROM a WHERE EXISTS (SELECT b.id FROM b WHERE b.id = a.id);
DELETE a FROM a INNER JOIN b on a.id=b.id;
DELETE FROM a WHERE id IN (SELECT id FROM
Updated: September 16th, 2012
Slave delay can be a nightmare. I battle it every day and know plenty of people who curse the serialization problem of replication. For those who are not familiar with it, replication on MySQL slaves runs commands in series – one by one, while the master may run them in parallel. This fact usually causes bottlenecks. Consider these 2 examples:
- Between 1 and 100 UPDATE queries are constantly running on the master in parallel. If the slave IO is only fast enough to handle 50 of them without lagging, as soon as 51 start running, the slaves starts to lag.
- A more common problem is when one query takes an hour to run (let's say, it's an UPDATE with a