"Dan Langille" <dan(at)langille(dot)org> writes:
> I've found that adding another field to the ORDER BY clause, times go
> through the roof.
Why does that surprise you? The original query is using an index to
achieve the required ordering, so it can give you the first 100 rows
without bothering to compute the remainder. The modified query has to
actually compute all the rows, and sort them, before it knows which are
the first 100.
If you had an index matching the second ORDER BY clause, you'd probably
get a plan similar to the first case.
regards, tom lane