a note on leveraging mysql query optimizer