2009-01-09 8 views

Répondre

9

Sur PostgreSQL 8.3 sous Win32, le plugin de profilage est installé par défaut, mais pas chargé. Il suffit d'exécuter ce SQL:

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

... et puis quand vous voulez profiler un code,

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 
Questions connexes