When dealing with multi-million row tables, there are times where I have to write queries that could return wrong results (due to wrong JOIN or bad sql practice).
What would be the best way to test such queries before running them on the server? I see sometimes a wrong query can jam the whole database server. Even "EXPLAIN query" can jam the server.
Does it make a difference to run the queries from out of phpmyadmin? For example in Putty?
Anyways, tips would be very appreciated.