• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
PostgreSQL Query Cache - "pqc"
 

PostgreSQL Query Cache - "pqc"

on

  • 5,287 views

PostgreSQL Query ...

PostgreSQL Query Cacheは、PostgreSQLへの問い合わせをメモリ内にキャッシングすることで、SQL問い合わせのパフォーマンスを「劇的に(10~100倍)」改善します。

Statistics

Views

Total Views
5,287
Views on SlideShare
4,822
Embed Views
465

Actions

Likes
0
Downloads
0
Comments
0

6 Embeds 465

http://www.uptime.jp 458
https://twitter.com 2
http://www.slashdocs.com 2
http://paper.li 1
http://translate.googleusercontent.com 1
https://web.tweetdeck.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • [snaga@devwa02 src]$ /opt/pgsql/901/bin/psql -p 9999 -h localhost -U uptime testdb psql (9.0.1, server 8.3.6) WARNING: psql version 9.0, server version 8.3. Some psql features might not work. Type "help" for help. testdb=# \\timing Timing is on. testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 617.948 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 3.236 ms testdb=# /* cache:off */SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 455.847 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 2.916 ms testdb=# DELETE FROM pgbench_accounts; DELETE 1000000 Time: 11798.786 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 2.485 ms testdb=# /* cache:off */SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 2039.547 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 1.870 ms testdb=# /* cache:refresh */SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 128.099 ms testdb=# SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 2.491 ms testdb=#
  • [snaga@devwa02 src]$ /opt/pgsql/901/bin/psql -p 9999 -h localhost -U uptime testdb psql (9.0.1, server 8.3.6) WARNING: psql version 9.0, server version 8.3. Some psql features might not work. Type "help" for help. testdb=# \\timing Timing is on. testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 617.948 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 3.236 ms testdb=# /* cache:off */SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 455.847 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 2.916 ms testdb=# DELETE FROM pgbench_accounts; DELETE 1000000 Time: 11798.786 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 2.485 ms testdb=# /* cache:off */SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 2039.547 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 1.870 ms testdb=# /* cache:refresh */SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 128.099 ms testdb=# SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 2.491 ms testdb=#
  • [snaga@devwa02 src]$ /opt/pgsql/901/bin/psql -p 9999 -h localhost -U uptime testdb psql (9.0.1, server 8.3.6) WARNING: psql version 9.0, server version 8.3. Some psql features might not work. Type "help" for help. testdb=# \\timing Timing is on. testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 617.948 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 3.236 ms testdb=# /* cache:off */SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 455.847 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 2.916 ms testdb=# DELETE FROM pgbench_accounts; DELETE 1000000 Time: 11798.786 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 2.485 ms testdb=# /* cache:off */SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 2039.547 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 1.870 ms testdb=# /* cache:refresh */SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 128.099 ms testdb=# SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 2.491 ms testdb=#
  • [snaga@devwa02 src]$ /opt/pgsql/901/bin/psql -p 9999 -h localhost -U uptime testdb psql (9.0.1, server 8.3.6) WARNING: psql version 9.0, server version 8.3. Some psql features might not work. Type "help" for help. testdb=# \\timing Timing is on. testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 617.948 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 3.236 ms testdb=# /* cache:off */SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 455.847 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 2.916 ms testdb=# DELETE FROM pgbench_accounts; DELETE 1000000 Time: 11798.786 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 2.485 ms testdb=# /* cache:off */SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 2039.547 ms testdb=# SELECT count(*) FROM pgbench_accounts; count --------- 1000000 (1 row) Time: 1.870 ms testdb=# /* cache:refresh */SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 128.099 ms testdb=# SELECT count(*) FROM pgbench_accounts; count ------- 0 (1 row) Time: 2.491 ms testdb=#

PostgreSQL Query Cache - "pqc" PostgreSQL Query Cache - "pqc" Presentation Transcript