Re: why Sequencial Scan when selecting on primary key of table?

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: why Sequencial Scan when selecting on primary key of table?
Date: 2003-05-31 17:02:08
Message-ID: 20030531170205.GD22469@libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sat, May 31, 2003 at 12:30:40PM -0400, Brian Tarbox wrote:
> 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?

Usual questions: have you vacuumed? EXPLAIN ANALYSE output, schema,
&c.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-05-31 17:13:47 Re: why Sequencial Scan when selecting on primary key of table?
Previous Message Brian Tarbox 2003-05-31 16:30:40 why Sequencial Scan when selecting on primary key of table?