This document summarizes a lightning talk on pg_reversi, a Reversi game implemented as PostgreSQL functions. Key points:
- Pg_reversi allows playing the game Reversi using only PostgreSQL functions called from psql. It is implemented using PL/pgSQL.
- An Enterprise Edition adds features like concealing SQL logs to prevent the DBA from seeing gameplay, and setting an application name to mask that it is pg_reversi running.
- This allows "lazy employees" to play Reversi at work without bosses knowing, making it a useful tool for "Enterprise companies".
- In conclusion, pg_reversi demonstrates playing games solely within
[db tech showcase Tokyo 2014] D21: Postgres Plus Advanced Serverはここが使える&9.4新機...Insight Technology, Inc.
日本でも徐々に浸透してきたPostgres Plus Advanced Server (PPAS)。PPASが備えている実用的な機能を2014年末にリリース予定の最新版9.4の新機能を交えて、コミュニティ版PostgreSQLと比較しながら解説します。
特に性能面で大きな向上をうたっているパーティショニング機能については実際に検証した結果を紹介します。
Protect Your IoT Data with UbiBot's Private Platform.pptxユビボット 株式会社
Our on-premise IoT platform offers a secure and scalable solution for businesses, with features such as real-time monitoring, customizable alerts and open API support, and can be deployed on your own servers to ensure complete data privacy and control.
19. 19
Parallel execution of sequential scans, joins and
aggregates
Autovacuum no longer performs repetitive scanning of
old data
Synchronous replication now allows multiple standby
servers for increased reliability
Full-text search can now search for phrases (multiple
adjacent words)
postgres_fdw now supports remote joins, sorts,
UPDATEs, and DELETEs
Substantial performance improvements, especially in
the area of scalability on multi-CPU-socket servers
PostgreSQL 9.6 主な新機能
20. 20
PostgreSQL 9.6 主な新機能
Parallel execution of sequential scans, joins and
aggregates
Autovacuum no longer performs repetitive scanning of
old data
Synchronous replication now allows multiple standby
servers for increased reliability
Full-text search can now search for phrases (multiple
adjacent words)
postgres_fdw now supports remote joins, sorts,
UPDATEs, and DELETEs
Substantial performance improvements, especially in
the area of scalability on multi-CPU-socket servers
31. 31
PostgreSQL 9.6 新機能
Parallel execution of sequential scans, joins and
aggregates
Autovacuum no longer performs repetitive scanning of
old data
Synchronous replication now allows multiple standby
servers for increased reliability
Full-text search can now search for phrases (multiple
adjacent words)
postgres_fdw now supports remote joins, sorts,
UPDATEs, and DELETEs
Substantial performance improvements, especially in
the area of scalability on multi-CPU-socket servers
35. 35
PostgreSQL 9.6 新機能
Parallel execution of sequential scans, joins and
aggregates
Autovacuum no longer performs repetitive scanning of
old data
Synchronous replication now allows multiple standby
servers for increased reliability
Full-text search can now search for phrases (multiple
adjacent words)
postgres_fdw now supports remote joins, sorts,
UPDATEs, and DELETEs
Substantial performance improvements, especially in
the area of scalability on multi-CPU-socket servers
40. 40
PostgreSQL 9.6 新機能
Parallel execution of sequential scans, joins and
aggregates
Autovacuum no longer performs repetitive scanning of
old data
Synchronous replication now allows multiple standby
servers for increased reliability
Full-text search can now search for phrases (multiple
adjacent words)
postgres_fdw now supports remote joins, sorts,
UPDATEs, and DELETEs
Substantial performance improvements, especially in
the area of scalability on multi-CPU-socket servers
43. 43
test=# SELECT
test-# data
test-# FROM animal
test-# WHERE to_tsvector('english', data) @@ to_tsquery('english', 'dog');
data
--------------------------------------------------
I like cats and dogs.
In my bed, four dogs and five cats are sleeping.
Miss Magee's dog is very strong.
(3 rows)
test=# SELECT
test-# data
test-# FROM animal
test-# WHERE to_tsvector('english', data) @@ to_tsquery('english', 'dog & cat');
data
--------------------------------------------------
I like cats and dogs.
In my bed, four dogs and five cats are sleeping.
(2 rows)
これまでの全文検索
複数のワードの指定はできたが、語順を意識した検索は不可
(dog, cat の順に出現する文書も cat, dog の順に出現する文書
も両方ヒットしていた )
44. 44
test=# SELECT
data
FROM animal
WHERE
to_tsvector('english', data) @@
tsquery_phrase(
to_tsquery('english', 'dog'), to_tsquery('english', 'cat'), 3);
data
--------------------------------------------------
In my bed, four dogs and five cats are sleeping.
(1 row)
test=# SELECT
data
FROM animal
WHERE
to_tsvector('english', data) @@
tsquery_phrase(
to_tsquery('english', 'cat'), to_tsquery('english', 'dog'), 2);
data
-----------------------
I like cats and dogs.
(1 row)
フレーズ検索
それぞれ、「 dog→cat 」「 cat→dog 」の順序で並んだテキ
ストが検索されている。
フレーズ検索関数 tsquery_phrase() を使う。
45. 45
test=# SELECT
test-# data
test-# FROM animal
test-# WHERE
test-# to_tsvector(data) @@
test-# (to_tsquery('like') <-> to_tsquery('cat'));
data
-----------------------
I like cats and dogs.
(1 row)
<-> 演算子
X <-> Y は
tsquery_phrase( X, Y, 1) と同義です。
全文検索用演算子として、 9.6 では
新たに
<->
という演算子が追加された。
※ 演算子が簡単に追加できるのも PostgreSQL のいいところ。
53. 53
PostgreSQL 9.6 新機能
Parallel execution of sequential scans, joins and
aggregates
Autovacuum no longer performs repetitive scanning of
old data
Synchronous replication now allows multiple standby
servers for increased reliability
Full-text search can now search for phrases (multiple
adjacent words)
postgres_fdw now supports remote joins, sorts,
UPDATEs, and DELETEs
Substantial performance improvements, especially in
the area of scalability on multi-CPU-socket servers
62. 62
PostgreSQL 9.6 新機能
Parallel execution of sequential scans, joins and
aggregates
Autovacuum no longer performs repetitive scanning of
old data
Synchronous replication now allows multiple standby
servers for increased reliability
Full-text search can now search for phrases (multiple
adjacent words)
postgres_fdw now supports remote joins, sorts,
UPDATEs, and DELETEs
Substantial performance improvements, especially in
the area of scalability on multi-CPU-socket servers