Jeff Davis <pgsql@xxxxxxxxxxx> writes: > On Wed, 2007-08-01 at 15:56 -0500, Mason Hale wrote: >> SELECT * >> FROM topic_feed >> WHERE topic_id = 106947234 >> ORDER BY score DESC >> LIMIT 25 > In plan 1, the planner thinks that it will find 25 tuples matching that > topic_id quickly during the backwards index scan on > topic_feed_score_index. Instead, it looks like it has to go through a > lot of tuples before it finds the necessary 25. Yeah. An index on (topic_id, score) would perhaps be helpful. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq