in reply to Re: Re: Re: Re: No Fear: decoupling your application from the database
in thread No Fear: decoupling your application from the database

Personally I don't think the SQL should be dynamically generated. It goes against everything I've learned managing heavily loaded production databases - one bad query plan and things start to look really ugly for the users...

Michael

  • Comment on Re: Re: Re: Re: Re: No Fear: decoupling your application from the database

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: No Fear: decoupling your application from the database
by autarch (Hermit) on Mar 27, 2003 at 00:42 UTC

    If you are offering an interface that allows complex user-defined queries, then not dynamically generating the SQL would mean pre-defining the exploded combination of all possible queries.

    I suppose this could be done programatically, but it's often easier to simply dynamically generate the SQL.

      Agreed. As usual one has to be careful of absolutes, and there are often circumstances where certain techniques are not appropriate.

      Michael