Re: [GENERAL] explain and index scan

2012-02-27 Thread Tom Lane
"Albe Laurenz" writes: > Andreas wrote: >> Both select where shown as 'Index Scan'. But the second select is not > a real index scan, > A full scan of the index is also an index scan. Yes. In particular it won't visit the heap for rows that don't satisfy the index condition. So as long as the

Re: [GENERAL] explain and index scan

2012-02-27 Thread Albe Laurenz
Andreas wrote: > PostgreSQL 9.1.2 on i686-pc-linux-gnu, compiled by gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 32-bit > > id | integer | not null Vorgabewert nextval('a_id_seq'::regclass) > a | integer | not null > b | integer | not null > Indexe: > "a_pkey" PRIMARY KEY, btree (id) > "a_a_k

[GENERAL] explain and index scan

2012-02-24 Thread psql
Hi all. PostgreSQL 9.1.2 on i686-pc-linux-gnu, compiled by gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 32-bit id | integer | not null Vorgabewert nextval('a_id_seq'::regclass) a | integer | not null b | integer | not null Indexe: "a_pkey" PRIMARY KEY, btree (id) "a_a_key" UNIQUE CONSTRAINT