原创 AWS - Redshift -跨賬號導入 S3 數據

Redshift 跨賬號導入 S3 數據 在 S3 桶賬戶中, 創建可讀取S3的 策略。 建一個關聯其他賬號的role,並將(1)中建的策略附給role。 在redshift賬號中 創建策略,將以下內容輸入到json選項卡

原创 MySQL - 在InnoDB 中 Troubleshooting Row size too large (」 8126)

解決報錯 遇到報錯: ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORM

原创 greenplum - 簡單常用查看gp狀態命令

啓動/關閉 gpstart gpstop -M fast gpstop -m gpstop --host sdw1 # 只關一個節點 查看狀態 gpstate -b # brief status gpstate -c

原创 greenplum - 在Amazon Linux 2 (EC2)中安裝 gp6.8

Pre-安裝 安裝依賴包(ALL Node) # requires the following software packages on RHEL/CentOS 6/7 yum install -y apr apr-util ba

原创 greenplum - Add Mirror of segment

生成配置 gpaddmirrors -o /usr/local/greenplum-db/gpmirrors_config 查看生成配置文件 vim gpmirrors_config 0|chen-es02|7000|/data

原创 greenplum - 爲 master 增加 standby 節點

增加 standby 進standby 目錄下創建目錄並授權 cd /data/greenplum/data1 mkdir master chown -R gpadmin:gpadmin master 在master節點執行 g

原创 greenplum - 創建表並查看錶數據分佈情況

隨機分佈 testdb=# create table test01 (id int, col1 varchar(100)) distributed RANDOMLY; CREATE TABLE testdb=# insert in

原创 Postgresql - 錯誤解決 - 9.3 - database is not accepting commands to avoid wraparound data......

數據庫日誌和程序日誌中都有報錯 ERROR: database is not accepting commands to avoid wraparound data loss in database "template1" HI

原创 AWS - Redshift - Unload 數據到S3產生的文件名

當 Redshift Unload 數據時,文件名稱會根據表的分配方式及數據分佈有關。 實驗一: 表分配方式爲 ALL,數據存在在多個節點,無法預計從哪個節點導出數據。默認情況下,表數據量小時,按ALL分配,變大之後改爲EVEN

原创 Cassandra - 鍵空間keyspace 操作

1. 創建鍵空間 CREATE KEYSPACE <identifier> WITH <properties> cqlsh> CREATE KEYSPACE test01 WITH replication = {'class': 'Si

原创 MySQL - 系統表 - information_schema

INFORMATION_SCHEMA provides access to database metadata, information about the MySQL server such as the name of a d

原创 RDS - MS SQL Server - 遷移導入數據庫

從本地服務器創建完整備份,將該備份存儲到 S3 上。 https://docs.amazonaws.cn/AmazonS3/latest/gsg/CreatingABucket.html https://docs.amazon

原创 Cassandra - Consistency Levels

WRITE Consistency Levels: ALL DESC: 必須被寫入到集羣內所有節點的 commit log和 memtable USAGE: 提供任何其他級別的最高一致性和最低可用性。 EACH_QUORU

原创 Postgresql - extension - auto_explain

auto_explain module 提供了在不需要手動執行explain時,自動記錄慢SQL的功能。 針對跟蹤 優化SQL非常有幫助。 加載方式: 在postgresql.conf中配置(需要重啓) shared_prel

原创 MySQL - 分區

如果有主鍵,分區鍵必須是主鍵 查詢分區表統計信息 SELECT PARTITION_NAME,SUBPARTITION_NAME,TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS W