in reply to Impact of module size

  1. It shouldn't. It may have a minimal effect on compile time, but with CGI there's no reason to compile for each request. If you want to save time here, use stored procedures instead of having the database server compile a query plan over and over again.
  2. Exporting is something done *once*, during compile time. See question 1.
  3. Keeping the SQL in each script has the advantage of not having to modify another file if you need to change the query.

Abigail

Replies are listed 'Best First'.
Re: Re: Impact of module size
by dmitri (Priest) on Sep 12, 2003 at 20:54 UTC
    I really have to disagree on no. 3. Keeping all queries in one place is a good practice:
    • it makes it easy to modify queries, since you know where to look for them;
    • other modules are not cluttered with SQL statements, which can be long and messy;
    • it makes it easy to insert a level of APIs to support more than one flavor of SQL.