1

In SQLServer when we have applications for which we do not have source code we could use SQLServer profiler to analyze which queries or procedures are called when we do something in app. Now I have similar situation with .NET third party library and postgre database when it would be very useful to track queries called by that library. I found something similar in pgAdmin, but so far I know it appear to by useful to track only sql queries that are executed in pgAdmin, not queries from external applications. I'm not very fluent in postgre, because this is my first contact with this environment.

So to sum up: Is there a tool that allow me to track queries executed on postgre database from external applications?

marryN
  • 49
  • 1
  • 6
  • See thread... https://stackoverflow.com/questions/2430380/is-there-a-postgresql-equivalent-of-sql-server-profiler – Goran Vukoja Apr 23 '20 at 11:57
  • Does this answer your question? [Is there a PostgreSQL equivalent of SQL Server profiler?](https://stackoverflow.com/questions/2430380/is-there-a-postgresql-equivalent-of-sql-server-profiler) – JGH Apr 23 '20 at 12:07
  • I tried pg_stat_activity, but when I expect to see which stored procedures or sql is executed it prints only "COMMIT" string in "query" column – marryN Apr 23 '20 at 12:43

1 Answers1

0

You should also have a look to pg_stat_statements extension (distributed by default but not installed by default in every database) that gives a "DMV"-like for SQL statements in PostgreSQL.

pifor
  • 7,419
  • 2
  • 8
  • 16