heterodb / pg-strom

PG-Strom - Master development repository
http://heterodb.github.io/pg-strom/
Other
1.3k stars 162 forks source link

PG17: arrow_fdwの実行計画出力が以前と異なる #849

Closed 0-kaz closed 4 weeks ago

0-kaz commented 1 month ago

Before

EXPLAIN (ANALYZE,COSTS OFF,TIMING OFF,SUMMARY OFF)
SELECT * FROM regtest_arrow_index_temp.regtest_arrow
 WHERE date_num=(SELECT date_num FROM regtest_arrow_index_temp.target_num);
                                              QUERY PLAN                                              
------------------------------------------------------------------------------------------------------
 Gather (actual rows=269 loops=1)
   Workers Planned: 2
   Workers Launched: 2
   InitPlan 1
     ->  Seq Scan on target_num (actual rows=1 loops=1)
   ->  Parallel Foreign Scan on regtest_arrow (actual rows=90 loops=3)
         Filter: (date_num = (InitPlan 1).col1)
         Rows Removed by Filter: 103473
         referenced: id, int_num, float_num, half_num, decimal_num, date_num, time_num, timestamp_num
         Stats-Hint: (date_num = $0)  [loaded: 1, skipped: 3]
         file0: test_arrow_index.data (read: 51.50MB, size: 51.50MB)
(11 rows)

After:

EXPLAIN (ANALYZE,COSTS OFF,TIMING OFF,SUMMARY OFF)
SELECT * FROM regtest_arrow_index_temp.regtest_arrow
 WHERE date_num=(SELECT date_num FROM regtest_arrow_index_temp.target_num);
                                              QUERY PLAN                                              
------------------------------------------------------------------------------------------------------
 Gather (actual rows=269 loops=1)
   Workers Planned: 2
   Params Evaluated: $0
   Workers Launched: 2
   InitPlan 1 (returns $0)
     ->  Seq Scan on target_num (actual rows=1 loops=1)
   ->  Parallel Foreign Scan on regtest_arrow (actual rows=90 loops=3)
         Filter: (date_num = $0)
         Rows Removed by Filter: 103473
         referenced: id, int_num, float_num, half_num, decimal_num, date_num, time_num, timestamp_num
         Stats-Hint: (date_num = $0)  [loaded: 1, skipped: 3]
         file0: test_arrow_index.data (read: 51.50MB, size: 51.50MB)
(12 rows)
kaigai commented 4 weeks ago

これはPostgreSQL 17での変更箇所かな。

という機能で、どのSubPlanを評価したのか表示されるようになっています。

https://www.postgresql.org/docs/17/release-17.html#RELEASE-17-EXPLAIN

0-kaz commented 4 weeks ago

承知しました。仕様ですのでそのままクローズします。 変更後の出力結果をexpectedに格納します。