From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: why Sequencial Scan when selecting on primary key of table?
Date: Sat, 31 May 2003 13:02:08 -0400
Message-ID: <20030531170205.GD22469@libertyrms.info> (raw)
In-Reply-To: <004301c32791$f983c710$01000001@trouble>
References: <20030531080716.20944.h004.c001.wm@mail.dilger.cc.criticalpath.net>
<004301c32791$f983c710$01000001@trouble>
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@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: why Sequencial Scan when selecting on primary key of table?
In-Reply-To: <20030531170205.GD22469@libertyrms.info>
References: <20030531080716.20944.h004.c001.wm@mail.dilger.cc.criticalpath.net> <004301c32791$f983c710$01000001@trouble> <20030531170205.GD22469@libertyrms.info>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox