To see how long a query will take without actually outputting anything, change the pager in mysql
client to /dev/null
instead of STDOUT
mysql> pager;
Default pager wasn't set, using stdout.
mysql> pager >/dev/null
PAGER set to '>/dev/null'
mysql> select md5sum from table1;
5245618 rows in set (1 min 21.50 sec)
mysql> select md5sum from table1 where md5sum is not NULL and md5sum!='not calculated';
4832676 rows in set (1 min 11.52 sec)
mysql> select md5sum from table1 where md5sum not in ('NULL', '', 'not calculated');
4832078 rows in set (1 min 21.91 sec)