Measuring SQL execution time in PostgreSQL?
There isn't a reasonably easy way to do this, but you can:


Log slow queries
Use EXPLAIN ANALYZE to see where the query is actually spending its time.


You could probably store plans in the database somehow but I am not quite sure how this would be done (maybe with a pl/perl function?).  You'd have to roll your own solution though.

Storing plans in the database however is not easy.  One of the huge problems that you will have is getting the recursive structure right so you can query it.  A simple approach might be to take a JSON format and store that, or store XML.