I'm working on small tool for gathering information about our postgres database and I have been looking at using the postgres Stats Collecter. It seems like there is a lot of info/stats in the table but I am having trouble understanding what exactly it all means.
If someone has used these views before would they be able to point me in the right direction for how to obtain stats such as the number of currently running queries or the slowest query? If these aren't possible from the postgres stats collector is there some other method for obtaining statistics that I could use?
One other thing I was confused about is if the stats collector limits the amount of data: for instance, will it only record the last x server processes?