Thread: profiling store procedure

profiling store procedure

From
Geek Matter
Date:
what tool is suitable for profiling store procedure in postgresql? sql server has sql profiles, how about postgresql?

Re: profiling store procedure

From
Sergey Konoplev
Date:
On Fri, Mar 23, 2012 at 11:16 AM, Geek Matter <geekmatter@yahoo.com> wrote:
> what tool is suitable for profiling store procedure in postgresql? sql
> server has sql profiles, how about postgresql?

You can use the pg_stat_statements
(http://www.postgresql.org/docs/9.1/interactive/pgstatstatements.html)
extension to do profiling. Turn track_utility to on to collect DDL and
set track to all to collect queries inside functions.

--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com
LinkedIn: http://ru.linkedin.com/in/grayhemp
JID/GTalk: gray.ru@gmail.com Skype: gray-hemp

Re: profiling store procedure

From
Guillaume Lelarge
Date:
On Fri, 2012-03-23 at 00:16 -0700, Geek Matter wrote:
> what tool is suitable for profiling store procedure in postgresql? sql server has sql profiles, how about postgresql?

The EDB PL/pgsql profiler tool is probably the easier tool to work with
if you want to profile PL/pgsql functions. That's also the only
available automatic tool I know.

You can also use the manual way, but it isn't easy. See this great post
from Hubert Lubaczewski (aka Depesz):
http://www.depesz.com/2010/03/18/profiling-stored-proceduresfunctions/


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com