Here's a patch to add the smart block table query from HEAD to mediawiki 1.4beta. The current implementation is painful when checking if logged in users are on the block list as the query cannot use indexes and has to scan the entire table, which is apparantly causing big pain for en.wikipedia. Please apply.