123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- drop table if exists ob_admin.public.query_stats;
- drop table if exists ob_admin.public.client_query_stats;
- drop table if exists ob_admin.public.insert_stats;
- create table if not exists ob_admin.public.query_stats
- (
- agg_begin_at timestamp not null,
- agg_end_at timestamp not null,
- created_at timestamp not null,
- cnt bigint not null,
- query text not null,
- avg_read_rows bigint default -1,
- max_read_rows bigint default -1,
- avg_read_bytes bigint default -1,
- max_read_bytes bigint default -1,
- avg_result_rows bigint default -1,
- max_result_rows bigint default -1,
- avg_result_bytes bigint default -1,
- max_result_bytes bigint default -1,
- avg_du bigint default -1,
- max_du bigint default -1,
- db varchar(64) [],
- client varchar(128) default '',
- query_hash decimal(20, 0) not null
- );
- create table if not exists ob_admin.public.insert_stats
- (
- agg_begin_at timestamp not null,
- agg_end_at timestamp not null,
- created_at timestamp not null,
- cnt bigint not null,
- query text not null,
- avg_wrows bigint default -1,
- max_wrows bigint default -1,
- avg_wbytes bigint default -1,
- max_wbytes bigint default -1,
- avg_du bigint default -1,
- max_du bigint default -1,
- client varchar(128) default '',
- query_hash decimal(20, 0) not null
- );
- create table if not exists ob_admin.public.client_query_stats
- (
- agg_begin_at timestamp not null,
- agg_end_at timestamp not null,
- created_at timestamp not null,
- cnt bigint not null,
- query text not null,
- avg_rrows bigint default -1,
- max_rrows bigint default -1,
- avg_rbytes bigint default -1,
- max_rbytes bigint default -1,
- avg_du bigint default -1,
- max_du bigint default -1,
- client varchar(128) default ''
- );
- truncate table ob_admin.public.query_stats;
- truncate table ob_admin.public.client_query_stats;
- truncate table ob_admin.public.insert_stats;
- truncate table ob_admin.public.error_count;
|