[thelist] Included files

Bob Davis bobd at members.evolt.org
Wed Feb 28 20:21:40 CST 2001


on 2/28/01 8:15 PM, Asif Suria at asifsuria at yahoo.com wrote:

> I had a question about included files as well. Almost
> all my ASP files have SQL statements and some of them
> use the same SQL statements. Would it be a good idea
> to put all the SQL statements into a single file and
> then include this file in all the ASP files? Would
> this cause a lot of overhead?

If the queries are, in fact, the same (meaning that they don't take any form
or url variables that make them specific for the page) then you should try
to cache the query results.  That'll reduce the server overhead.

This is something I did for an intranet using ColdFusion.  I came into a
site that worked, but was showing signs of stress.  There were something
like 6 queries per page, being hit by a couple hundred people at lunch (and
it was running on Access...). Caching the query results made a huge
difference.

I don't know if that works in ASP - I don't really have much experience with
it.

You could also check out http://www.fusebox.org/ for a coding methodology
that does just what you suggest.  You build modules or 'fuses' that are
included as needed in a requested page.  It works very well, and makes for
very maintainable sites.

bob

-- 

bob davis
bobd at members.evolt.org





More information about the thelist mailing list