RE: primary key scans in sequence

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема RE: primary key scans in sequence
Дата
Msg-id Pine.BSF.4.21.0105301044300.6432-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на RE: primary key scans in sequence  ("Koen Antonissen" <Koen@Cee-Kay.net>)
Список pgsql-sql
On Wed, 30 May 2001, Koen Antonissen wrote:

> Now this one doesn't:
>                              Table "teams"
>  Attribute |  Type   |                     Modifier                     
> -----------+---------+--------------------------------------------------
>  id        | integer | not null default nextval('teams_id_seq'::text)
>  name      | text    | not null
>  mgr_name  | text    | 
>  address   | text    | 
>  zipcode   | text    | 
>  city      | text    | 
>  country   | text    | 
>  email     | text    | 
>  telnr     | text    | 
>  mobnr     | text    | 
>  faxnr     | text    | 
>  logo      | text    | not null default 'images/teams/logo_default.gif'
>  movie     | text    | 
>  url       | text    | 
>  qoute     | text    | 
>  active    | boolean | default 't'::bool
> Indices: index_teams_id, <=!!! 'my own' index
>          index_teams_name,
>          teams_pkey,    <=normal pkey index
>          unq_teams_name
> 
> NOTICE:  QUERY PLAN:
> 
> Seq Scan on teams  (cost=0.00..1.09 rows=1 width=173)

Looking at that cost, I have to wonder, how many rows are in the table
and has vacuum analyze been run on it?  If the number of rows in the
table is small, the seq scan is definately better than having to read
from both the index and heap.



В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Case Insensitive Queries
Следующее
От: "Richard Huxton"
Дата:
Сообщение: Re: bpchar compares (was Re: Case Insensitive Queries)