Dmitry Tkach <dmitry(at)openratings(dot)com> writes:
>> tradestyle.duns is not really unique by itself, is it?
> No. The (duns,type) combination is unique (type is 0 through 5).
Well, if there are at most six of any duns value, then it's close enough
to unique for planning purposes. So that's not the problem.
> - it DOES choose the name index sometimes (for some of the values for
> the name in the criteria), but it just doesn't seem to make any
> difference. Here is an example:
The plan's not very intelligible when you don't show us the query ...
regards, tom lane