Re: Where is the filter?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Where is the filter?
Дата
Msg-id CA+TgmoZwdiRZDQbFp+=LHWKz7e-2Pb-+R8eb0tvBUnPxWVfRmg@mail.gmail.com
обсуждение исходный текст
Ответ на Where is the filter?  ("jacktby@gmail.com" <jacktby@gmail.com>)
Список pgsql-hackers
On Sat, Feb 4, 2023 at 11:29 PM jacktby@gmail.com <jacktby@gmail.com> wrote:
> When I use 'select * from t where a = 1'; And I debug to find where the 'a = 1' is used,
> when I arrive ExecScan in src/backend/executor/execScan.c, line 158, where this 'a = 1' is
> stored in?

It depends somewhat on what query plan you got. For instance if it was
a Seq Scan then it will be a filter-condition, or "qual", and the call
to ExecQual() later in ExecScan() will be responsible for evaluating
it. But if you are using an index scan, then it will probably become
an index qual, and those are passed down into the index machinery and
internally handled by the index AM. It's a good idea when you're
debugging this sort of thing to start by looking at the EXPLAIN or
EXPLAIN ANALYZE output, and perhaps also the output with
debug_print_plan = true.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: when the startup process doesn't (logging startup delays)
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: make_ctags: use -I option to ignore pg_node_attr macro