SQL explain plan: what is Materialize?

后端 未结 5 632
轮回少年
轮回少年 2020-12-25 11:07

I asked PostgreSQL to explain my query. Part of the explanation was:

table_name --> Materialize

What does materialize do? I\'m joining t

5条回答
  •  难免孤独
    2020-12-25 11:27

    From a more empirical point of view, you can do your EXPLAIN ANALYZE and keep those results, then change the flag:

    set enable_material=off;
    

    Go and run the same EXPLAIN ANALYZE again to compare the results line by line and you will see exactly what changes, whether the query time is better or worse, etc. Tinker around with the long list of query config flags and observe the effects.

    https://www.postgresql.org/docs/current/runtime-config-query.html

提交回复
热议问题