Обсуждение: pgsql: Change fix_scan_expr() to avoid copying the input node tree in

Поиск
Список
Период
Сортировка

pgsql: Change fix_scan_expr() to avoid copying the input node tree in

От
tgl@postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Change fix_scan_expr() to avoid copying the input node tree in the common case
where rtoffset == 0.  In that case there is no need to change Var nodes,
and since filling in unset opfuncid fields is always safe, scribbling on the
input tree to that extent is not objectionable.  This brings the cost of this
operation back down to what it was in 8.2 for simple queries.  Per
investigation of performance gripe from Guillaume Smet.

Modified Files:
--------------
    pgsql/src/backend/optimizer/plan:
        setrefs.c (r1.139 -> r1.140)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/setrefs.c?r1=1.139&r2=1.140)