This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
table_name, | |
pg_size_pretty(table_size) AS table_size, | |
pg_size_pretty(indexes_size) AS indexes_size, | |
pg_size_pretty(total_size) AS total_size | |
FROM ( | |
SELECT | |
table_name, | |
pg_table_size(table_name) AS table_size, | |
pg_indexes_size(table_name) AS indexes_size, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
tablename as table_name, | |
ROUND(CASE WHEN otta=0 THEN 0.0 ELSE sml.relpages/otta::numeric END,1) AS table_bloat, | |
CASE WHEN relpages < otta THEN '0' ELSE pg_size_pretty((bs*(sml.relpages-otta)::bigint)::bigint) END AS table_waste, | |
iname as index_name, | |
ROUND(CASE WHEN iotta=0 OR ipages=0 THEN 0.0 ELSE ipages/iotta::numeric END,1) AS index_bloat, | |
CASE WHEN ipages < iotta THEN '0' ELSE pg_size_pretty((bs*(ipages-iotta))::bigint) END AS index_waste | |
FROM | |
( | |
SELECT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do | |
$$ | |
declare var_sql character varying(8000); | |
begin | |
for var_sql in | |
select | |
'alter table '|| t1.table_schema||'."'||t1.table_name||'" set unlogged' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
do | |
$$ | |
DECLARE var_table_name character varying(1000); | |
var_cnt bigint; | |
begin | |
drop table if exists temp_tables;-- ( character varying(1000), bigint); | |
create temp table if not exists temp_tables (table_name character varying(1000), cnt bigint); | |
truncate table tt_tables; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
n.nspname TableSchema, | |
c.relname as TableName, | |
a.relname as IndexName, | |
b.indisunique IsUnique | |
from | |
pg_class a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; | |
do | |
$$ | |
DECLARE var_table_name character varying(1000); | |
var_table_schema character varying(1000); | |
var_index_name character varying(1000); | |
var_query character varying(1000); | |
var_is_debug boolean = false; | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These instructions shows installation steps for bottlewater-pg and apache kafka by www.confluent.io on CentOS 7 | |
used links | |
https://github.com/confluentinc/bottledwater-pg | |
https://www.confluent.io/ | |
everything were installed on clean CentOS 7.0 | |
After sucsessfully finishing all steps you can populate changes from PG to Apache Kafka server | |
1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This text: | |
ETZzz Hostel 2 звезд | |
Номер бронирования: 1343489307 Пин-код: 4776 Отдых | |
5 639 руб. THB 3 420 | |
ЗАЕЗД | |
11 | |
ФЕВ 2017 | |
суббота | |
ОТЪЕЗД |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alter role root with SUPERUSER; | |
alter role root with login; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pentaho BA 7.0 Install with PostgreSQL repo DB | |
INSTALL POSTGRES | |
https://wiki.postgresql.org/wiki/YUM_Installation | |
1) find | |
/etc/yum.repos.d/CentOS-Base.repo | |
vi /etc/yum.repos.d/CentOS-Base.repo | |
remove | |
add |
OlderNewer