pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_stat_all_indexes
2+ messages / 2 participants
[nested] [flat]

* pg_stat_all_indexes
@ 2007-11-02 15:17  Campbell, Lance <lance@uiuc.edu>
  0 siblings, 1 reply; 2+ messages in thread

From: Campbell, Lance @ 2007-11-02 15:17 UTC (permalink / raw)
  To: pgsql-admin

PostgreSQL: 8.2.4

 

I did the following query on my database:

 

select * from pg_stat_all_indexes;

 

My hope was to see if my indexes are being used.  The values I got were
all 0's for the columns: idx_scan, idx_tup_read, and idx_tup_fetch.

 

Is there a different query to tell me how often indexes are being used?

 

My postgresql.conf file settings are:

 

#-----------------------------------------------------------------------
----

# RUNTIME STATISTICS

#-----------------------------------------------------------------------
----

 

# - Query/Index Statistics Collector -

 

#stats_command_string = on

#update_process_title = on

 

#stats_start_collector = on             # needed for block or row stats

                                        # (change requires restart)

#stats_block_level = off

#stats_row_level = off

#stats_reset_on_server_start = off      # (change requires restart)

 

 

# - Statistics Monitoring -

 

#log_parser_stats = off

#log_planner_stats = off

#log_executor_stats = off

#log_statement_stats = off

 

Thanks,

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu

 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pg_stat_all_indexes
@ 2007-11-02 15:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Campbell, Lance <lance@uiuc.edu>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2007-11-02 15:26 UTC (permalink / raw)
  To: Campbell, Lance <lance@uiuc.edu>; +Cc: pgsql-admin

"Campbell, Lance" <lance@uiuc.edu> writes:
> select * from pg_stat_all_indexes;
> My hope was to see if my indexes are being used.  The values I got were
> all 0's for the columns: idx_scan, idx_tup_read, and idx_tup_fetch.

You aren't collecting these stats:

> #stats_block_level = off
> #stats_row_level = off

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-11-02 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-11-02 15:17 pg_stat_all_indexes Campbell, Lance <lance@uiuc.edu>
2007-11-02 15:26 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox