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

index not used

From: Enrico Weigelt <weigelt(at)metux(dot)de>
To: postgresql performance list <pgsql-performance(at)postgresql(dot)org>
Subject: index not used
Date: 2005-04-21 19:05:44
Message-ID: 20050421190543.GA16548@nibiru.borg.metux.de (view raw or flat)
Thread:
Lists: pgsql-performance
Hi folks,


I'm doing a simple lookup in a small table by an unique id, and I'm
wondering, why explains tells me seqscan is used instead the key.

The table looks like:

    id	bigint		primary key,
    a	varchar,
    b	varchar,
    c 	varchar
    
and I'm quering: select * from foo where id = 2;

I've got only 15 records in this table, but I wanna have it as 
fast as possible since its used (as a map between IDs and names) 
for larger queries.


thx
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact(at)metux(dot)de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------

Responses

pgsql-performance by date

Next:From: Alex TurnerDate: 2005-04-21 19:12:09
Subject: Re: Index bloat problem?
Previous:From: Bill ChandlerDate: 2005-04-21 19:03:18
Subject: Re: Index bloat problem?

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