Thread: Stats not getting updated....

Stats not getting updated....

From
Himanshu Baweja
Date:
i am trying to identify which tables should be moved to diff drives.... i first identified the most used tables... by looking at the data in pg_statio_user_tables.....
and then i did sampling of the io-usage of these tables every 2 mins... to identify which are getting used when....
 
but the problem is my stats are not getting updated.... they first get updated around 20% done... and then once more at around 70% done.... why is the stats not getting updated more frequently.....
 
the test application i am using has a 33 min test with lots of read and write....
 
thx
Himanshu


Discover Yahoo!
Find restaurants, movies, travel & more fun for the weekend. Check it out!

Re: Stats not getting updated....

From
Himanshu Baweja
Date:
i also noted one more thing... the stats are getting updated only when i do vacuum.... is that wht is supposed to happen... or something is wrong....
 
thx
Himanshu

Himanshu Baweja <himanshubaweja@yahoo.com> wrote:
i am trying to identify which tables should be moved to diff drives.... i first identified the most used tables... by looking at the data in pg_statio_user_tables.....
and then i did sampling of the io-usage of these tables every 2 mins... to identify which are getting used when....
 
but the problem is my stats are not getting updated.... they first get updated around 20% done... and then once more at around 70% done.... why is the stats not getting updated more frequently.....
 
the test application i am using has a 33 min test with lots of read and write....
 
thx
Himanshu


Discover Yahoo!
Have fun online with music videos, cool games, IM & more. Check it out!

Re: Stats not getting updated....

From
Richard Huxton
Date:
Himanshu Baweja wrote:
> i also noted one more thing... the stats are getting updated only
> when i do vacuum.... is that wht is supposed to happen... or
> something is wrong....

Hmm - there's something strange going on certainly. Try a couple of
simple queries on a table and see whether the stats get updated.

It is possible that during very busy periods the stats don't get
recorded - that's part of the design.

--
   Richard Huxton
   Archonet Ltd

Re: Stats not getting updated....

From
Tom Lane
Date:
Richard Huxton <dev@archonet.com> writes:
> It is possible that during very busy periods the stats don't get
> recorded - that's part of the design.

IIRC, backends only ship stats to the collector at transaction commit.
Or maybe it's at the end of processing a client command.  It's certainly
not continuous.

            regards, tom lane

Re: Stats not getting updated....

From
Himanshu Baweja
Date:
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> backends only ship stats to the collector at transaction commit.
> Or maybe it's at the end of processing a client command. It's certainly
> not continuous.
 
yup that i already know....
but is there any way to make it do the update more frequently.... 4 times in 30 mins... which makes the stats useless....
 
or there is any way to identify the usage of tables... wht i am trying to do is check the table heap_blks_read time to time.... so that i can know how much io is getting used for each table... and during which time... i am doing sampling every 2 min....
 
now after i have identified which tables are getting used and when... we can move them to diff partitions for better preformance.....
 
is there any way to know the table usage....
 
thx
Himanshu


Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.