Em 05/04/2018 19:39, hmidi slim escreveu:
Hi,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?
I don't know if there are best practices (each scenario requires its own solution), but for plain complex SELECT queries, I do use "WITH" queries... They work really well.
https://www.postgresql.org/docs/9.6/static/queries-with.html Regards, Edson