logo头像
Snippet 博客主题

筆記-enable query_stat in pg_hero

Login to DB Server

mini@hqs022.com.tw```
1
2
3
4
5


#### chang to postgres ####

``` sudo su - postgres

create extension in DB , must run after pg_restore

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

postgres=# \c neo

You are now connected to database "neo" as user "postgres".

neo=# CREATE extension pg_stat_statements;

CREATE EXTENSION

neo=# SELECT pg_stat_statements_reset();

pg_stat_statements_reset

--------------------------



(1 row)