Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 12396)
+++ wp-includes/query.php	(working copy)
@@ -1986,10 +1986,11 @@
 				}
 			}
 			$q['author_name'] = sanitize_title($q['author_name']);
-			$q['author'] = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_nicename='".$q['author_name']."'");
 			$q['author'] = get_user_by('slug', $q['author_name']);
 			if ( $q['author'] )
 				$q['author'] = $q['author']->ID;
+			else
+				$q['author'] = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_nicename='".$q['author_name']."'");
 			$whichauthor .= " AND ($wpdb->posts.post_author = ".absint($q['author']).')';
 		}
 
Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 12396)
+++ wp-includes/general-template.php	(working copy)
@@ -458,8 +458,10 @@
 		$title = $title->display_name;
 	}
 	if ( !empty($author_name) ) {
-		// We do a direct query here because we don't cache by nicename.
-		$title = $wpdb->get_var($wpdb->prepare("SELECT display_name FROM $wpdb->users WHERE user_nicename = %s", $author_name));
+		if ( ( $user_id = wp_cache_get($author_name, 'userslugs') ) && ( $user = wp_cache_get($user_id, 'users') ) )
+			$title = $user->display_name;
+		else
+			$title = $wpdb->get_var($wpdb->prepare("SELECT display_name FROM $wpdb->users WHERE user_nicename = %s", $author_name));
 	}
 
 	// If there's a month
