Michael Fuhr <[EMAIL PROTECTED]> writes: > Excerpt from the 8.1 Release Notes: > * Allow nonconsecutive index columns to be used in a multicolumn > index (Tom)
> For example, this allows an index on columns a,b,c to be used in > a query with WHERE a = 4 and c = 10. > If you're querying only on c then an index on (a,b,c) will probably > be slower than an index on (c), but if you have only (a,b,c) then > the planner will consider using it. Note that if your query doesn't have a constraint on the first index column, it's unlikely that that index will get chosen, because the entire index would have to be scanned. Before 8.1 it was guaranteed not to be chosen. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly