Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

This question already has an answer here:

if I use

explain (analyze true, verbose true, costs true, buffers true)
select * from mystoredprocedurefunction(arg1, arg2);

I do not get any information about what the server is actually doing inside my sp. Instead I get 5 rows describing that I invoked a function and that it took a long time. How do I look into my stored procedure and see what is going on? I have something very inefficient occurring.

share|improve this question

marked as duplicate by Erwin Brandstetter, dezso, RolandoMySQLDBA, Paul White, Max Vernon May 29 '13 at 21:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 2 down vote accepted

Look into the module auto-explain.

We had a very similar question some time ago, it should be of help:
Postgres query plan of a UDF invocation written in pgpsql

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.