my $hashref = $dbh->selectall_hashref(q/select column1,key_column from mytable/, 'key_column');