Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group