Time of Update: 2016-06-28
標籤:pgbench是PostgreSQL內建的一個資料庫壓力測試工具,支援TPC-B測試模型, 或自訂測試模型.自訂測試模型支援元命令, 調用shell指令碼, 設定隨機數, 變數等等.支援3種非同步介面[simple|extended|prepared] 參數詳解列表// TPC-B測試模型的初始化資料參數.Initialization options:-i invokes initialization mode
Time of Update: 2016-06-21
標籤: 使用INHERITS建立的新表會繼承一個或多個父表,子表只會繼承父表的表結構和NOT NULL,DEFAULT,CHECK三種約束,主鍵,外鍵和唯一鍵以及索引不會被繼承,所以修改父表的結構(增刪欄位),NOT NULL,DEFAULT和CHECK約束會自動同步子表修改。樣本1.create table tbl_inherits_parent(a int not null,b varchar(32) not null default ‘Got u‘,c int check (c
Time of Update: 2016-06-16
標籤:安裝環境: Ubuntu 10.04-desktop-i386 PostgreSQL 8.4 1. 安裝PostgreSQL 輸入如下命令 sudo apt-get install postgresql 系統會提示安裝所需磁碟空間,輸入"y",安裝程式會自動完成。
Time of Update: 2016-05-15
標籤:1. 環境準備:a) 安裝PowerDesigner,以PowerDesigner15.1為例b) 安裝java jdk,以jdk-7-windows-i586為例c) 下載postgressql
Time of Update: 2016-05-09
標籤:在資料庫postgresql中,一個用戶端到伺服器串連實際上是一個tcp socket串連,tcp串連是虛串連,一方非正常退出(如斷電),另一方會繼續維持這個串連。 舉個例子,一個用戶端電腦正常連上伺服器後,強行拔掉電源造成人為斷電,重新啟動電腦,再此連上伺服器。用SQL語句select * from pg_stat_activily
Time of Update: 2016-05-06
標籤:源端要開通目標的相關存取權限目標端:1.建立遠端資料表的視圖create view v_bill_tbl_version_update_control_info as SELECT * FROM dblink(‘hostaddr=10.10.10.8 port=4321 dbname=postgres user=postgres password=postgres‘, ‘SELECT
Time of Update: 2016-04-11
標籤:--對於分區表constraint_exclusion 這個參數需要配置為partition或onpostgres=# show constraint_exclusion ; constraint_exclusion ---------------------- partition --建立父子表, 用於儲存分區資料create table t(id int primary key);create table t1(like t including all)
Time of Update: 2016-02-16
標籤:最近看到PostgreSQL話題比較多,就搜尋了一下它與mysql的對比知了連結:http://www.zhihu.com/question/20010554/answer/74037965來源:知乎一、PG相對於MySQL的優勢:1、在SQL的標準實現上要比MySQL完善,而且功能實現比較嚴謹;2、預存程序的功能支援要比MySQL好,具備本機快取執行計畫的能力;3、對錶串連支援較完整,最佳化器的功能較完整,支援的索引類型很多,複雜查詢能力較強;4、PG主表採用堆表存放,MySQL採用索引
Time of Update: 2016-01-19
標籤:參考:https://hub.docker.com/_/postgres/https://docs.docker.com/engine/installation/debian/ 利用Docker進行多執行個體的安裝,相對於源碼安裝更簡單,更方便,隔離性也更好 。安裝Docker更新安裝源sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C07
Time of Update: 2015-12-14
標籤:There are several ways to determine the effect of a command. The first method is to use the GETDIAGNOSTICS command, which has the form:GET [ CURRENT ] DIAGNOSTICS variable { = | := } item [ , ... ];This command allows retrieval of system status
Time of Update: 2015-09-14
標籤:介紹:barman是postgresql備份還原的管理工具。官網: http://www.pgbarman.org/本文環境:系統: centos6.6PostgreSQL
Time of Update: 2015-09-07
標籤:一、
Time of Update: 2015-08-28
標籤:postgresql 資料庫 最大串連數 資料庫連接數 最近監控系統的資料庫監控總是延遲,查看日誌報錯:2015-08-27 10:20:19,534 ERROR Traceback (most recent call last): File "oracle_mon.py", line 306, in <module>
Time of Update: 2015-08-27
標籤:官方文檔:http://www.postgresql.org/docs/9.4/interactive/datatype-net-types.html一、cidrpostgres=# create table test (id int, name text);CREATE TABLEpostgres=# \d test T
Time of Update: 2015-08-19
標籤:4.7
Time of Update: 2015-08-16
標籤:postgresql因為最近要做個資料研究,需要把資料入庫,開來源資料庫中,同學們一般可能都會選擇mysql,不過mysql 的一些函數能是在太累,因此我這邊換成使用起來與oracle
Time of Update: 2015-08-10
標籤: 在postgresql中我們在執行預存程序中往往會使用select 預存程序,但是如果預存程序中再調用 預存程序時,就不能這樣用了,應該用perform 預存程序,來看看官方文檔的說明 ===================================================================== 執行一個沒有結果的運算式或者命令 有時候我們希望計算一個運算式或者一個命令,但是卻丟棄其結果(通常因為我們經常調用一些存在有用的副作用但是不存在有用結果值的函數)。
Time of Update: 2015-07-20
標籤:一、PostGIS中的幾何類型PostGIS支援所有OGC規範的“Simple Features”類型,同時在此基礎上擴充了對3DZ、3DM、4D座標的支援。1. OGC的WKB和WKT格式OGC定義了兩種描述幾何對象的格式,分別是WKB(Well-Known Binary)和WKT(Well-Known Text)。在SQL語句中,用以下的方式可以使用WKT格式定義幾何對象:POINT(0 0) ——點LINESTRING(0 0,1 1,
Time of Update: 2015-07-21
標籤:安裝: sudo apt-get install postgresql設定密碼sudo -u postgres psql postgres=# ALTER USER postgres WITH PASSWORD ‘postgres’;postgres=# \qsudo passwd -d
Time of Update: 2015-07-03
標籤: 環境;psql (9.3.6)輸入 "help" 來擷取協助資訊.root=# \d change_me 資料表 "public.change_me" 欄位 | &n