Stats not getting updated....

Started by Himanshu Bawejaalmost 21 years ago5 messagesgeneral
Jump to latest
#1Himanshu Baweja
himanshubaweja@yahoo.com

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!

#2Himanshu Baweja
himanshubaweja@yahoo.com
In reply to: Himanshu Baweja (#1)
Re: Stats not getting updated....

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!

#3Richard Huxton
dev@archonet.com
In reply to: Himanshu Baweja (#2)
Re: Stats not getting updated....

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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Richard Huxton (#3)
Re: Stats not getting updated....

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

#5Himanshu Baweja
himanshubaweja@yahoo.com
In reply to: Tom Lane (#4)
Re: Stats not getting updated....

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.