PostgreSQL Poor performance ORDER BY / LIMIT

Nic Lin at 
最近研究一個在 Postgres 奇怪的效能問題。 情況是這樣的,我有一個通知系統 (Notifications) 的 table,也有對常用的搜尋打 index index_notifications_on_unread(read_at_unixtimestamp, user_id, id) Notification 的 dataset 大約 500 萬筆。 情況 1, 我確定找的到……