hey tom and others
look at these....
how is the sum of all tables != database....
////////////////////////
qe18=# SELECT
pg_stat_get_db_blocks_fetched(771773788),pg_stat_get_db_blocks_hit(771773788);
pg_stat_get_db_blocks_fetched |
pg_stat_get_db_blocks_hit
-------------------------------+---------------------------
63787 |
61398
(1 row)
qe18=# SELECT sum(heap_blks_hit),sum(heap_blks_read)
from pg_statio_all_tables;
sum | sum
-------+-----
36200 | 942
(1 row)
////////////////////////////////////////
as far as the code goes both are same....
/*
* Process all table entries in the message.
*/
for (i = 0; i < msg->m_nentries; i++)
{
tabentry = (PgStat_StatTabEntry *)
hash_search(dbentry->tables,
(void *) &(tabmsg[i].t_id),
HASH_ENTER, &found);
if (!found)
{
/*
* If it's a new table entry, initialize counters
to the
* values we just got.
*/
tabentry->numscans = tabmsg[i].t_numscans;
tabentry->tuples_returned =
tabmsg[i].t_tuples_returned;
tabentry->tuples_fetched =
tabmsg[i].t_tuples_fetched;
tabentry->tuples_inserted =
tabmsg[i].t_tuples_inserted;
tabentry->tuples_updated =
tabmsg[i].t_tuples_updated;
tabentry->tuples_deleted =
tabmsg[i].t_tuples_deleted;
tabentry->blocks_fetched =
tabmsg[i].t_blocks_fetched;
tabentry->blocks_hit = tabmsg[i].t_blocks_hit;
tabentry->destroy = 0;
}
else
{
/*
* Otherwise add the values to the existing entry.
*/
tabentry->numscans += tabmsg[i].t_numscans;
tabentry->tuples_returned +=
tabmsg[i].t_tuples_returned;
tabentry->tuples_fetched +=
tabmsg[i].t_tuples_fetched;
tabentry->tuples_inserted +=
tabmsg[i].t_tuples_inserted;
tabentry->tuples_updated +=
tabmsg[i].t_tuples_updated;
tabentry->tuples_deleted +=
tabmsg[i].t_tuples_deleted;
tabentry->blocks_fetched +=
tabmsg[i].t_blocks_fetched;
tabentry->blocks_hit += tabmsg[i].t_blocks_hit;
}
/*
* And add the block IO to the database entry.
*/
dbentry->n_blocks_fetched +=
tabmsg[i].t_blocks_fetched;
dbentry->n_blocks_hit += tabmsg[i].t_blocks_hit;
}
///////////////////////////
any ideas why is this happening...
thx
Himanshu
__________________________________
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]