I executed the query directly on the database. It took around 3 seconds to execute the query.
Here is a JSON for the result, when the query is executed with addition of EXPLAIN before it.
{
“id”: 1,
“select_type”: “SIMPLE”,
“table”: “wp_postmeta”,
“partitions”: null,
“type”: “range”,
“possible_keys”: “post_id”,
“key”: “post_id”,
“key_len”: “8”,
“ref”: null,
“rows”: 191841,
“filtered”: 100.00,
“Extra”: “Using index condition; Using filesort”
}