2) Force PG to drop the merge join via SET ENABLE_MERGEJOIN = FALSE;
Actually, it was 312 milliseconds, so it got worse.
---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings