why Sequencial Scan when selecting on primary key of table?

From: "Brian Tarbox" <btarbox(at)theworld(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: why Sequencial Scan when selecting on primary key of table?
Date: 2003-05-31 16:30:40
Message-ID: 004301c32791$f983c710$01000001@trouble
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I have a simple table with a dozen integer fields and a primary key.

When I say "explain select * from Patient where Patient_primary_key = 100"

I get sequential scan.

I've just converted my application from MySQL and am seeing everything run
about 3X slower. What do I have to do to get postgres to use indexes?

Brian Tarbox

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Sullivan 2003-05-31 17:02:08 Re: why Sequencial Scan when selecting on primary key of table?
Previous Message Tom Lane 2003-05-31 16:13:12 Re: db growing out of proportion