Re: decompose big queries

2018-04-27 Thread Steven Lembark
> 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? The main problem with SP's is that they can really screw up optimization. Most of the time

Re: decompose big queries

2018-04-06 Thread Melvin Davidson
On Fri, Apr 6, 2018 at 9:35 AM, pinker wrote: > Edson Carlos Ericksson Richter wrote > > 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. > > Be

Re: decompose big queries

2018-04-06 Thread pinker
Edson Carlos Ericksson Richter wrote > 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. Be cautious with CTE's. They weren't meant to be an alternative to subqueries

Re: decompose big queries

2018-04-06 Thread Edson Carlos Ericksson Richter
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

Re: decompose big queries

2018-04-05 Thread David G. Johnston
On Thu, Apr 5, 2018 at 3:39 PM, hmidi slim 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