Find query characters in respect of optimizer for develop purpose

Поиск
Список
Период
Сортировка
От Andy Fan
Тема Find query characters in respect of optimizer for develop purpose
Дата
Msg-id CAKU4AWr83NNdjj8hzD4fmJdP5HTxYXFkRt_KbgE0dkojzTJVNw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Find query characters in respect of optimizer for develop purpose  (Melanie Plageman <melanieplageman@gmail.com>)
Список pgsql-hackers
Hello:

Before I want to pay attention to some optimizer features, I want to
estimate how much benefits it can create for customers, at least for our current
running customer. So I want to have some basic idea what kind of the query is
running now in respect of optimizer.  


My basic is we can track it with the below struct(every backend has one global 
variable to record it).

+typedef struct
+{
+       int     subplan_count;
+       int     subquery_count;
+       int join_count;
+       bool hasagg;
+       bool hasgroup;
+} QueryCharacters;

it will be reset at the beginning of standard_planner, and the values are
increased at  make_subplan, set_subquery_pathlist, make_one_rel,
create_grouping_paths. later it can be tracked and viewed in
pg_stat_statements.


What do you think about the requirement and the method I am thinking? Any
kind of feedback is welcome.


--
Best Regards
Andy Fan

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

Предыдущее
От: Greg Nancarrow
Дата:
Сообщение: Re: Libpq support to connect to standby server as priority
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Fix a typo in slot.c