0

在为 MADLib 中的 ML 查询执行 postgresql explan 分析时,我得到如下输出。 查询&查询计划

[询问]

解释(详细,分析)选择计数(linregr.linregr_predict)FROM(选择madlib.linregr_predict(数组[c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14, c15,c16,c17,c18,c19,c20,c21,c22,c23,c24,c25,c26,c27,c28], 阵列[f1,f2,f3,f4,f5,f6,f7,f8,f9,f10 ,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24,f25,f26,f27,f28]) FROM higgs_50_linregr_model_coef, higgs_1k_test WHERE higgs_1k_test.f1 >0.7) AS林雷格;

【查询计划】

聚合(成本=19158.81..19158.82 行=1 宽度=8)(实际时间=4.607..4.610 行=1 循环=1)

-> 嵌套循环(成本=0.00..1497.81 行=117740 宽度=224)(实际时间=0.056..1.827 行=204 循环=1)

     ->  Seq Scan on higgs_50_linregr_model_coef  (cost=0.00..15.80 rows=580 width=112) (actual time=0.017..0.019 rows=1 loops=1)

     ->  Materialize  (cost=0.00..10.77 rows=203 width=112) (actual time=0.028..1.388 rows=204 loops=1)

           ->  Seq Scan on higgs_1k_test  (cost=0.00..9.75 rows=203 width=112) (actual time=0.018..0.531 rows=204 loops=1)
                 Filter: (f1 > '0.7'::double precision)
                 Rows Removed by Filter: 96

计划时间:0.624 ms 执行时间:4.826 ms

看来查询的ML操作并没有包含在整体查询计划中。

我想知道它是正确的,如果是这样,postgresql 在执行时如何使用 madlib 查询?

4

0 回答 0