"Steinar H. Gunderson" <[EMAIL PROTECTED]> writes: > To me, it looks like he'll get 88 rows, not 3.2M. Surely we must be able to > do something better than a full sequential scan in this case?
Not really. There's been some speculation about implementing index "skip search" --- once you've verified there's at least one visible row of a given index value, tell the index to skip to the next different value instead of handing back any of the remaining entries of the current value. But it'd be a lot of work and AFAICS not useful for very many kinds of queries besides this. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend