Re: decompose big queries

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: decompose big queries
Дата
Msg-id CAKFQuwZfJL=WfTK_9wO4gNbY=6KgX-0_JKnLSVK9XW_ww5N2vQ@mail.gmail.com
обсуждение исходный текст
Ответ на decompose big queries  (hmidi slim <hmidi.slim2@gmail.com>)
Список pgsql-general
On Thu, Apr 5, 2018 at 3:39 PM, hmidi slim <hmidi.slim2@gmail.com> wrote:
I want to know what are the best practice to use in order to decompose a big query which contains so many joins.Is it recommended to use stored procedures ? or is there any other solution?

Views are another solution.


Though while "building views upon views" is not uncommon, and it does increase the readability of each individual view, it add update fragility to the system.

Encapsulating high-level API concepts in functions and then writing queries within those functions with the benefit of views is one possibility.  Your client access needs and general data model are necessary to choose a preferred design.

David J.

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

Предыдущее
От: hmidi slim
Дата:
Сообщение: decompose big queries
Следующее
От: Alexandre Arruda
Дата:
Сообщение: ERROR: found multixact from before relminmxid