2009-01-09 5 views

Antwort

9

In PostgreSQL 8.3 auf Win32 ist das Profiling-Plugin standardmäßig installiert, aber nicht geladen. Führen Sie einfach diese SQL:

LOAD '$libdir/plugins/plugin_profiler.dll'; 
SET plpgsql.profiler_tablename = 'bazzybar'; 

... und dann, wenn Sie einen Code ein Profil erstellen möchten,

drop table if exists bazzybar; -- reset the profiling stats 
select my_function_here('lala',123); -- this line and variations as many times as you deem fit 
select * from bazzybar; -- show the time spent on each line of your function