In a PostgreSQL 9 database there is a table that contains a serial field X which is a PK (oid enabled), and other fields.
Using postgres’s pgadmin with that table – a query takes 30 seconds.
If I add a unique index on the same field X – same query in pgadmin takes 3 seconds.
PKs are implicitly indexes:
http://www.postgresql.org/docs/current/static/indexes-unique.html
So why does the explicit index make a difference?
Is this a pgadmin issue?
Do I need an explicit index for the PK field or not?
No difference here (pg 9.1.2), I think it is an artifact (schema, case-insignificance?)
Results: