From: | Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Cc: | satoshi(dot)nagayasu(at)gmail(dot)com |
Subject: | monitoring sort activities |
Date: | 2005-09-24 06:07:12 |
Message-ID: | 4334ED10.5060808@nttdata.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Hi folks,
I've created a patch to get following TODO item.
> * %Add ability to monitor the use of temporary sort files
This patch provides one system view (pg_stat_sorts) and
one utility function (pg_stat_get_prev_sort_size).
> snaga=# SELECT * from pg_stat_sorts;
> heap_all | index_all | datum_all | heap_tape | datum_tape | max_size
> ----------+-----------+-----------+-----------+------------+----------
> 4 | 6 | 0 | 4 | 0 | 26400000
> (1 row)
>
> snaga=# select aid from accounts where aid % 2 = 1 order by filler
desc limit 10;
>
> [...snip...]
>
> (10 rows)
>
> snaga=# SELECT pg_stat_get_prev_sort_size();
> pg_stat_get_prev_sort_size
> ----------------------------
> 13200000
> (1 row)
Yeah, I don't forget previous discussion with Tom. We also have to
monitor temp files, but I think these view and function will benefit
DBAs on performance tuning.
Any comments or suggestion?
--
NAGAYASU Satoshi <nagayasus(at)nttdata(dot)co(dot)jp>
Attachment | Content-Type | Size |
---|---|---|
pg_stat_sorts.81b2.diff | text/plain | 16.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-09-24 17:13:00 | Re: Proposed patch to clean up signed-ness warnings |
Previous Message | Michael Fuhr | 2005-09-24 03:02:54 | Re: PL/Python error checking |