pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: simple select-statement takes more than 25 sec
Date: Wed, 10 Nov 2004 11:17:47 +0100
Message-ID: <20041110101747.GB22780@uio.no> (raw)
In-Reply-To: <1100079350.3980.18.camel@Knoppix>
References: <1100079350.3980.18.camel@Knoppix>

On Wed, Nov 10, 2004 at 10:35:50AM +0100, Cao Duy wrote:
> here is my simple select-statement:
> SELECT * FROM CUSTOMER WHERE CUSTOMER_ID=5

It seems like you're missing an index on customer_id. Set it to PRIMARY KEY
or do an explicit CREATE INDEX (followed by an ANALYZE) and it should be a
lot faster.

/* Steinar */
-- 
Homepage: http://www.sesse.net/



view thread (5+ messages)  latest in thread

Message-ID: <20041110101747.GB22780@uio.no>
Permalink:  ../20041110101747.GB22780@uio.no/
Also on:    postgresql.org/message-id/20041110101747.GB22780@uio.no

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sgunderson@bigfoot.com
  Subject: Re: simple select-statement takes more than 25 sec
  In-Reply-To: <20041110101747.GB22780@uio.no>

* 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