pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brian Tarbox <btarbox@theworld.com>
To: pgsql-performance@postgresql.org
Subject: why Sequencial Scan when selecting on primary key of table?
Date: Sat, 31 May 2003 12:30:40 -0400
Message-ID: <004301c32791$f983c710$01000001@trouble> (raw)
In-Reply-To: <20030531080716.20944.h004.c001.wm@mail.dilger.cc.criticalpath.net>

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




view thread (8+ messages)  latest in thread

Message-ID: <004301c32791$f983c710$01000001@trouble>
Permalink:  ../004301c32791$f983c710$01000001@trouble/
Also on:    postgresql.org/message-id/004301c32791$f983c710$01000001@trouble

 · 

reply

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: btarbox@theworld.com
  Subject: Re: why Sequencial Scan when selecting on primary key of table?
  In-Reply-To: <004301c32791$f983c710$01000001@trouble>
  References: <20030531080716.20944.h004.c001.wm@mail.dilger.cc.criticalpath.net> <004301c32791$f983c710$01000001@trouble>

* 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