От: Enrico Weigelt
Тема: index not used
Дата: ,
Msg-id: 20050421190543.GA16548@nibiru.borg.metux.de
(см: обсуждение, исходный текст)
Ответы: Re: index not used  (Darcy Buskermolen)
Re: index not used  (Stephan Szabo)
Список: pgsql-performance

Скрыть дерево обсуждения

index not used  (Enrico Weigelt, )
 Re: index not used  (Darcy Buskermolen, )
 Re: index not used  (Litao Wu, )
 Re: index not used  (Stephan Szabo, )

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:     
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------


В списке pgsql-performance по дате сообщения:

От: Enrico Weigelt
Дата:
Сообщение: foreign key performance
От: "Shoaib Burq (VPAC)"
Дата:
Сообщение: Re: two queries and dual cpu (perplexed)