pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Least and most accessed tables in a database..
4+ messages / 3 participants
[nested] [flat]

* Least and most accessed tables in a database..
@ 2003-03-19 11:08  Rajesh Kumar Mallah <mallah@trade-india.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Rajesh Kumar Mallah @ 2003-03-19 11:08 UTC (permalink / raw)
  To: pgsql-admin


Hi ,

Is there anyway to know which tables are least/most  accessed 
in a database?

My original problem is that there are too my stray tables in my database 
which i want to get rid of. i thought the tables which are least accessed
may be a good candidate for deletion.

just a thought does pg_statio_user_tables help ?

regds
mallah.




-- 
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.



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

* Re: Least and most accessed tables in a database..
@ 2003-03-19 12:11  Rajesh Kumar Mallah <mallah@trade-india.com>
  parent: Rajesh Kumar Mallah <mallah@trade-india.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Rajesh Kumar Mallah @ 2003-03-19 12:11 UTC (permalink / raw)
  To: pgsql-admin



my GUC is configured like this:

#
#       Access statistics collection
#
stats_start_collector = true
stats_reset_on_server_start = true
stats_command_string = true
stats_row_level = true
#stats_block_level = false

how come there is not a single row in pg_statio_user_tables 
any of the stat is having a non zero value ?

tradein_clients=#  SELECT schemaname,relname,heap_blks_read,heap_blks_hit  
from  pg_statio_user_tables where ( heap_blks_read > 0 or heap_blks_hit >0 or 
idx_blks_read >0 or idx_blks_hit > 0 or toast_blks_read > 0 or toast_blks_hit 
> 0 or tidx_blks_read > 0 or tidx_blks_hit > 0 );

+------------+---------+----------------+---------------+
| schemaname | relname | heap_blks_read | heap_blks_hit |
+------------+---------+----------------+---------------+
+------------+---------+----------------+---------------+
(0 rows)


Regds
Mallah.


On Wednesday 19 Mar 2003 4:38 pm, Rajesh Kumar Mallah wrote:
> Hi ,
> 
> Is there anyway to know which tables are least/most  accessed 
> in a database?
> 
> My original problem is that there are too my stray tables in my database 
> which i want to get rid of. i thought the tables which are least accessed
> may be a good candidate for deletion.
> 
> just a thought does pg_statio_user_tables help ?
> 
> regds
> mallah.
> 
> 
> 
> 
> -- 
> Rajesh Kumar Mallah,
> Project Manager (Development)
> Infocom Network Limited, New Delhi
> phone: +91(11)6152172 (221) (L) ,9811255597 (M)
> 
> Visit http://www.trade-india.com ,
> India's Leading B2B eMarketplace.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/docs/faqs/FAQ.html
> 
> 

-- 
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.



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

* Re: Least and most accessed tables in a database..
@ 2003-03-19 14:39  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Rajesh Kumar Mallah <mallah@trade-india.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2003-03-19 14:39 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah@trade-india.com>; +Cc: pgsql-admin

Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> #stats_block_level = false

> how come there is not a single row in pg_statio_user_tables 
> any of the stat is having a non zero value ?

statio is block-level statistics, no?

			regards, tom lane



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

* Re: Least and most accessed tables in a database..
@ 2003-03-19 15:10  mallah@trade-india.com
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: mallah@trade-india.com @ 2003-03-19 15:10 UTC (permalink / raw)
  To: tgl@sss.pgh.pa.us; +Cc: mallah@trade-india.com; pgsql-admin


yes it does work after making it true.
but am i in the right track in solving my problem?

regds
mallah.


> Rajesh Kumar Mallah <mallah@trade-india.com> writes:
>> #stats_block_level = false
>
>> how come there is not a single row in pg_statio_user_tables
>> any of the stat is having a non zero value ?
>
> statio is block-level statistics, no?
>
> 			regards, tom lane
>
> ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9'
> the postmaster



-----------------------------------------
Get your free web based email at trade-india.com.
   "India's Leading B2B eMarketplace.!"
http://www.trade-india.com/





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


end of thread, other threads:[~2003-03-19 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-19 11:08 Least and most accessed tables in a database.. Rajesh Kumar Mallah <mallah@trade-india.com>
2003-03-19 12:11 ` Rajesh Kumar Mallah <mallah@trade-india.com>
2003-03-19 14:39   ` Tom Lane <tgl@sss.pgh.pa.us>
2003-03-19 15:10     ` mallah@trade-india.com

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