Steve Rogerson <steve.pg@xxxxxxxxxxxxxxxxx> writes: > Why does the plan come up with 67 rows, when by definition there can be at > most one as we are searching on the pk? The rowcount estimate is made by combining selectivities of the WHERE conditions; what you're seeing is a consequence of not having very good knowledge about cross-column correlations. The actual details of the plan (ie, that the pkey index can be used) are determined much later. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general