Fields idx_scan and idx_tup_fetch are not changed by an index scan.
=# create table class1 (id integer);
CREATE TABLE
=#
-- Insert 0..9999 into class1
=# create index class1_id_index on class1 (id);
CREATE INDEX
=# vacuum analyze;
VACUUM
=# \x
Expanded display is on.
=# select * from pg_stat_all_tables where relname = 'class1';
-[ RECORD 1 ]-+-------
relid | 17166
schemaname | public
relname | class1
seq_scan | 2
seq_tup_read | 13000
idx_scan | 0
idx_tup_fetch | 0
n_tup_ins | 10000
n_tup_upd | 0
n_tup_del | 0
=# \x
Expanded display is off.
=# explain select * from class1 where id = 1234;
QUERY PLAN
------------------------------------------------------------------------------
Index Scan using class1_id_index on class1 (cost=0.00..3.01 rows=2 width=4)
Index Cond: (id = 1234)
(2 rows)
=# \x
Expanded display is on.
=# select * from pg_stat_all_tables where relname = 'class1';
-[ RECORD 1 ]-+-------
relid | 17166
schemaname | public
relname | class1
seq_scan | 2
seq_tup_read | 13000
idx_scan | 0
idx_tup_fetch | 0
n_tup_ins | 10000
n_tup_upd | 0
n_tup_del | 0
=#
Kenji Sugita
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly