I am a newbie in PostgreSQL. Please help me to find this out.
I have a table
company (
id bigint primary key,
name text,
age integer,
address character(50),
salary real,
gender character(1))
then i do simple query :
select * from company where address='texas' and salary=10000
select * from company where address='texas' and salary=15000
select * from company where address='houston' and salary=10000
select * from company where address='texas' and salary=85000
select * from company where address='norway' and salary=100
how can i get details of the executed query, example the query, variable of input WHERE and the total executing time. so i can compare each executed query to know which type of input make long running.
Thank you,
log_statement(Sets the type of statements logged)log_duration(Logs the duration of each completed SQL statement),log_min_duration_statement(Sets the minimum execution time above which statements will be logged) and so on.