"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> "Joshua D. Drake" <[EMAIL PROTECTED]> writes: >>> Assume the following: >>> index on: (id, adate) >>> constraint CHECK(adate > '01-01-2007' AND adate < '04-01-2007'); >>> The planner will not use the index listed above. >> >> For what?
> select adate from parent where adate = '01-25-2007' That's unsurprising. Searching with only a lower-order index column value seldom wins, 'cause you've got to scan the entire index. The constraint is irrelevant to this. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster