Thread: Help in Postgresql
Hi ,I am a PhD student searching in query optimization. I want to access the information about queries and statistics. Especially, I am interested in finding out how I can collect the history information (user, when, query, query_plan) from postgreqsl. Also, I wonder if there is a plan-table in postgresql than I can access, and I can access it?. I appreciate if you guide me in getting the mentioned information that are necessary for my research.
Best,
Moohanad
On Tue, May 22, 2018 at 8:58 AM, mooh Rash <moohrash@yahoo.com> wrote:
Hi ,I am a PhD student searching in query optimization. I want to access the information about queries and statistics. Especially, I am interested in finding out how I can collect the history information (user, when, query, query_plan) from postgreqsl. Also, I wonder if there is a plan-table in postgresql than I can access, and I can access it?. I appreciate if you guide me in getting the mentioned information that are necessary for my research.Best,Moohanad
> I want to access the information about queries and statistics
I strongly recommend you install PgBadger, which analyzes the log file to provide you the information you need.
--
Melvin Davidson
Maj. Database & Exploration Specialist
Universe Exploration Command – UXC
Employment by invitation only!
Maj. Database & Exploration Specialist
Universe Exploration Command – UXC
Employment by invitation only!
Hello Moohanad, Did you check for pg_stat_statements https://www.postgresql.org/docs/10/static/pgstatstatements.html ? This is based on postgres hooks and will give you: db,user,query id, query text There are many developments trying to add start /end time, planid, plan text as described in http://www.postgresql-archive.org/Poc-pg-stat-statements-with-planid-td6014027.html remark: this extension doen't care about statements finished in error or timeout Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html