在「Parallel Sequential Scan is Committed!」這邊看到 PostgreSQL 9.5 (還沒出) 將會有 Parallel Sequential Scan 的功能。
文章的作者直接拿了一個大家超常用的惡搞來示範,也就是經典的 LIKE '%word%'
:
rhaas=# \timing Timing is on. rhaas=# select * from pgbench_accounts where filler like '%a%'; aid | bid | abalance | filler -----+-----+----------+-------- (0 rows) Time: 743.061 ms rhaas=# set max_parallel_degree = 4; SET Time: 0.270 ms rhaas=# select * from pgbench_accounts where filler like '%a%'; aid | bid | abalance | filler -----+-----+----------+-------- (0 rows) Time: 213.412 ms
這功能真不錯 XD