Time of Update: 2016-04-06
標籤: 在知乎上看到這樣一個問題:MySQL 查詢 select * from table where id in (幾百或幾千個 id) 如何提高效率?修改電商網站,一個商品屬性工作表,幾十萬條記錄,80M,索引只有主鍵id,做這樣的查詢如何提高效率?select * from table where id in
Time of Update: 2016-04-03
標籤:今天初試開源的PostgreSQL...這個是PostgreSQL官網,可以下載相應的版本http://www.postgresql.org/這裡有一個PostgreSQL 9.3.1 中文手冊http://www.postgres.cn/docs/9.3/index.htmlPostgreSQL 9.3.1中文手冊1.1版發布說明https://github.com/postgres-cn/pgdoc-cn/releases/tag/v9.3.1-1.1這裡有一個PostgreSQL
Time of Update: 2016-04-02
標籤:postgresql提供有強大的Regex系統,可以在資料庫層級實現模糊查詢。Regex匹配操作符:操作符描述例子~匹配Regex,大小寫相關‘thomas‘ ~ ‘.*thomas.*‘~*匹配Regex,大小寫無關‘thomas‘ ~* ‘.*Thomas.*‘!~不匹配Regex,大小寫相關‘thomas‘ !~ ‘.*Thomas.*‘!~*不匹配Regex,大小寫無關‘thomas‘ !~*
Time of Update: 2016-04-02
標籤:項目須要使用gisgraphy,怎奈gisgraphy3.0僅僅支援postgis1.5.因此僅僅能安裝老版本號碼的posgresql和postgis了。從postgis的support
Time of Update: 2016-04-05
標籤:原文 Entity Freamwork 6串連PostgreSql資料庫開發環境VS 2015 Update 1 Postgre Sql
Time of Update: 2016-03-28
標籤:create table k_user ( op_id VARCHAR(36) not null, op_name VARCHAR(100) not null, password VARCHAR(100) not null, real_name VARCHAR(100) not null,
Time of Update: 2016-03-17
標籤:postgresqlmysql轉換postgresql1)時間格式轉換from_unixtime(timestamp,‘%Y-%m-%d‘ ) ==》SELECT to_char(to_timestamp(t.create_time / 1000), ‘YYYY-MM-DD HH24:MI:SS‘)2)欄位拼接GROUP_CONCAT(restaurantid,‘|‘,cityid) ==》select array_to_string(ARRAY(SELECT
Time of Update: 2016-03-07
標籤: 今天在centos6.5下安裝postgresql資料庫,現在整理自己操作步驟。一. Centos6.5 下安裝postgresql9.4 1.1. 顯示所有的有關postgresql安裝包 yum list postgres*1.2. 安裝資料庫 yum install postgresql94-server1.2. 初始化資料庫(初始化資料庫預設路徑在/var/lib/pgsql/9.4/data)service install
Time of Update: 2016-02-19
標籤:Pentaho Data Integration(kettle):一個優秀的抽取、轉換、載入(Extract Transform and Load,ETL)工具Pentaho Report
Time of Update: 2016-02-18
標籤:PostgreSQL Performance Monitoring Toolshttps://github.com/CloudServer/postgresql-perf-toolsThis package includes three useful scripts aimed to help to pinpoint performance issues on systems with PostgreSQL as database backend.All scritps are
Time of Update: 2016-02-07
標籤:該文章轉載自http://blog.chinaunix.net/uid-22920230-id-3493064.html建立資料庫 CREATE DATABASE test WITH OWNER = postgres ENCODING = ‘UTF8‘; 進入控制台方法,在postgreSQL的安裝目的bin下執行命令: psql 資料庫名, 例:/usr/local/pgsql/bin/psql
Time of Update: 2016-01-27
標籤:postgresql 產生列 array_agg array_to_string 如果需要建立一個有99列的表,列名都是有規律的比如s01,s02,s03……也許你會想到如下語句CREATE TABLE tb_sxx ( s01 varchar(10), s02 varchar(10),
Time of Update: 2016-01-27
標籤:原文--http://www.tuicool.com/articles/mMvARf先談談slony的局限性:1. DDL動作是不會被複製到;2. 如果想使用slony來同步資料,表必須是帶有主鍵的內容大家看原文;個人感覺總結的很好!下面是為slony維護;定製的指令碼包括了服務啟動/關閉;以及slony
Time of Update: 2016-01-26
標籤:看PostgreSQL9的官方文檔,我越看越迷糊,這資料表空間,資料庫,模式,表,使用者,角色之間的關係怎麼在PostgreSQL裡這麼混亂呢?經過中午的一個小實驗,我逐漸理清了個中來龍去脈。下面我來還原我的實驗,並循序講清其中關係。 首先,實驗出角色與使用者的關係 在PostgreSQL中,存在兩個容易混淆的概念:角色/使用者。之所以說這兩個概念容易混淆,是因為對於PostgreSQL來說,這是完全相同的兩個對象。唯一的區別是在建立的時候:&
Time of Update: 2016-01-21
標籤:1. 安裝環境 linux版本: CentOS release 6.2 (Final) pg版本 : postgresql-9.5.0 2. pg資料庫 --http://www.postgresql.org/ftp/source/ 3. 安裝依賴包 >yum
Time of Update: 2016-01-24
標籤:遇到一坑:對於如下代碼select * from order_mileagefuel where date > ‘2015-11-1‘ and date< ‘2015-11-5‘ 在PostgreSQL的用戶端中執行時能得到結果,但在Java中執行時(此時時間範圍是參數,類型為String),如date >=#{startDay} and date
Time of Update: 2016-01-22
標籤:1. 簡介說明 我們知道oracle中sqlplus裡面執行dml語句;是需要提交commit;若錯了;也可以復原rollback; 然而在postgresql裡面預設是自動認可;執行完就馬上提交了,不能復原,這樣容易導致誤操作的發生,有沒有什麼辦法避免這個風險呢?當然有,在psql中預設是開啟自動認可的,我們可以關閉自動認可。 2. 操作驗證 [[email protected]
Time of Update: 2016-01-18
標籤:Streaming replication slots are a pending feature in PostgreSQL 9.4, as part of the logical changeset extraction feature.What are they for, what do you need to know, what changes?What are replication slots?Streaming replication slots
Time of Update: 2016-01-08
標籤: Postgresql源碼安裝:從http://www.postgresql.org/download/下載源碼v9.4.5編譯安裝./configuremakesumake install //安裝完成adduser postgresmkdir /usr/local/pgsql/datachown postgres /usr/local/pgsql/datasu - postgres/usr/local/pgsql/bin/initdb -D /usr/local/
Time of Update: 2016-01-11
標籤:??Add postgresql apt repo.. according to your distribution (utopic, trusty, jessie, wheezy and etc):??deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main 9.5??Install postgresql 9.5 wget --quiet -O -