This post has been moved to: http://nonstandardpolitics.com/blog/23
This post has been moved to: http://nonstandardpolitics.com/blog/18
Imagine my dismay and perplexity today when Apache suddenly stopped working on my development PC. Checking the Windows event log revealed this error:
The Apache service named reported the following error:
>>> (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
Aha! Another service [...]
In my quest to understand MySQL’s EXPLAIN statement and to learn more strategies for optimizing queries, I came across this excellent blog post from 20bits by Jesse Farmer:
http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/
In summary:
Benchmark, benchmark, benchmark!
Profile, profile, profile!
Tighten Up Your Schema
Partition Your Tables
Don’t Overuse Artificial Primary Keys
Learn Your Indices
SQL is Not C
Understand your engines
MySQL specific shortcuts
Read Peter Zaitsev’s MySQL Performance [...]
If a MySQL slave encounters an error while replicating commands from the master, the slave will abort.
One way this can happen is if you are using triggers on a table that calls a stored procedure, but the stored procedures are missing on the slave because you forgot to include the –routines option when generating a [...]
Sometimes MySQL doesn’t use the index on a column when performing a query.
Indexes are NOT used if MySQL can calculate that it will probably be faster to scan the whole table. For example if key_part1 is evenly distributed between 1 and 100, it’s not good to use an index in the following query:
SELECT * FROM [...]