| From: | Kenji Sugita <sugita(at)srapc1327(dot)sra(dot)co(dot)jp> | 
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Index counters of statistics collector does not work on 7.4devel | 
| Date: | 2003-07-20 13:12:39 | 
| Message-ID: | 20030720.221239.74732899.sugita@srapc1327.sra.co.jp | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mendola Gaetano | 2003-07-20 13:42:29 | Re: Index counters of statistics collector does not work on 7.4devel | 
| Previous Message | Sean Chittenden | 2003-07-20 10:53:26 | Re: [GENERAL] Urgent: 10K or more connections |