Re: [PERFORM] pg_stats how-to?

2007-05-21 Thread Jim C. Nasby
On Fri, May 18, 2007 at 04:26:05PM -0700, Y Sidhu wrote: To answer your original question, a way to take a look at how bloated your tables are would be to ANALYZE, divide reltuples by relpages from pg_class (gives how many rows per page you have) and compare that to 8k / average row size. The

Re: [PERFORM] pg_stats how-to?

2007-05-21 Thread Y Sidhu
Thanks again! I'll make the change and get those numbers. Yudhvir On 5/21/07, Jim C. Nasby [EMAIL PROTECTED] wrote: On Fri, May 18, 2007 at 04:26:05PM -0700, Y Sidhu wrote: To answer your original question, a way to take a look at how bloated your tables are would be to ANALYZE, divide

Re: [PERFORM] pg_stats how-to?

2007-05-15 Thread Jim C. Nasby
On Mon, May 14, 2007 at 08:20:49PM -0400, Tom Lane wrote: Y Sidhu [EMAIL PROTECTED] writes: it may be table fragmentation. What kind of tables? We have 2 of them which experience lots of adds and deletes only. No updates. So a typical day experiences record adds a few dozen times on the

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Y Sidhu
I am trying to use them. I have set these values in my conf file: stats_start_collector TRUE stats_reset_on_server_start FALSE stats_command_string TRUE now what? Yudhvir == On 5/13/07, Shoaib Mir [EMAIL PROTECTED] wrote: Can you be a little more specific? What exactly are you

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Jim C. Nasby
Have you either re-loaded the config or restarted the server since making those changes? On Mon, May 14, 2007 at 09:16:54AM -0700, Y Sidhu wrote: I am trying to use them. I have set these values in my conf file: stats_start_collector TRUE stats_reset_on_server_start FALSE

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Jim C. Nasby
Please include the list in your replies... Ok, so you've got stats collection turned on. What's the question then? And are stats_block_level and stats_row_level also enabled? On Mon, May 14, 2007 at 09:28:46AM -0700, Y Sidhu wrote: yes Yudhvir === On 5/14/07, Jim C. Nasby [EMAIL

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Y Sidhu
The stats_block_level and stats_row_level are NOT enabled. The question is how to use pg_stats. Do I access/see them via the ANALYZE command? or using SQL. I cannot find any document which will get me started on this. Yudhvir -- On 5/14/07, Jim C. Nasby [EMAIL PROTECTED] wrote:

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Jim C. Nasby
On Mon, May 14, 2007 at 11:09:21AM -0700, Y Sidhu wrote: The stats_block_level and stats_row_level are NOT enabled. The question is how to use pg_stats. Do I access/see them via the ANALYZE command? or using SQL. I cannot find any document which will get me started on this. Ok, we're both

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Y Sidhu
I am sorry about this Jim, please understand that I am a newbie and am trying to solve long vacuum time problems and get a handle on speeding up queries/reports. I was pointed to pg_stats and that's where I am at now. I have added this into my conf file: stats_start_collector TRUE

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Y Sidhu
My immediate problem is to decrease vacuum times. Yudhvir === On 5/14/07, Jim C. Nasby [EMAIL PROTECTED] wrote: On Mon, May 14, 2007 at 12:02:03PM -0700, Y Sidhu wrote: I am sorry about this Jim, please understand that I am a newbie and am trying to solve long vacuum time problems and

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Bill Moran
In response to Y Sidhu [EMAIL PROTECTED]: My immediate problem is to decrease vacuum times. Don't take this as being critical, I'm just trying to point out a slight difference between what you're doing and what you think you're doing: Your problem is not decreasing vacuum times. You _think_

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Y Sidhu
Bill, I suspect it is fragmentation of some sort. Vacuum times sometimes shoot up, it may be table fragmentation. What kind of tables? We have 2 of them which experience lots of adds and deletes only. No updates. So a typical day experiences record adds a few dozen times on the order of 2.5

Re: [PERFORM] pg_stats how-to?

2007-05-14 Thread Tom Lane
Y Sidhu [EMAIL PROTECTED] writes: it may be table fragmentation. What kind of tables? We have 2 of them which experience lots of adds and deletes only. No updates. So a typical day experiences record adds a few dozen times on the order of 2.5 million. And deletes once daily. Each of these

[PERFORM] pg_stats how-to?

2007-05-13 Thread Yudhvir Singh Sidhu
Anyone know of a pg_stats howto? I'd appreciate any direction. Yudhvir ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can

Re: [PERFORM] pg_stats how-to?

2007-05-13 Thread Adam Tauno Williams
Anyone know of a pg_stats howto? I'd appreciate any direction. Let me know if you find one! :) It isn't a HOWTO, but I have collected some notes regarding the performance views in a document - http://docs.opengroupware.org/Members/whitemice/wmogag/file_view - see the chapter on PostgreSQL.