This is the error I get in the apache log:
WordPress database error Out of sort memory, consider increasing server sort buffer size for query \r\n\t\t\t SELECT
IDAS id, 'post' AS post_type,
post_titleAS title,
post_modifiedAS modified\r\n\t\t\t\t FROM kv5zet1n_3_posts\r\n\t\t\t\tWHERE
post_status= 'trash'\r\n\t\t\tUNION ALL\r\n\t\t\t SELECT
comment_IDAS id, 'comment' AS post_type,
comment_author_IPAS title,
comment_dateAS modified\r\n\t\t\t\t FROM kv5zet1n_3_comments\r\n\t\t\t\tWHERE
comment_approved= 'trash'\r\n\t\t\t ORDER BY post_type, UCASE(title)\t\t\r\n\t\t\t made by require_once('C:\\UniServerZ\\www\\kcwww\\wordpress\\wp-admin\\admin.php'), do_action('tools_page_rvg-optimize-db'), call_user_func_array, rvg_optimize_db, rvg_get_trash, referer: https://www.mysite.com/wp-admin/tools.php?page=rvg-optimize-db.php
I’ve upped the sort buffer size to 256K but it still falls over.