Sounds like the person who wrote it didn't know anything about joins. I'd
rewrite those queries in a heartbeat. Keep them at the top of the page so
that you can easily adjust them while you work. Once you're getting the
expected results, abstract them into a CFC that can be stored in the
APPLICATION scope or something, thereby saving even more processing. 

-----Original Message-----
From: Peter Tanswell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 30, 2007 1:05 PM
To: CF-Talk
Subject: Checking on an approach

Hi all

I have a program that I have been asked to modify and enhance.

This is easily done (well relatively easy) but I would like to get some
feedback re the way the program is currently structured.

The application uses a MSSQL database to store information.  Currently
Stored Procedures are not used at all in the entire application.  The
application runs on a CF7 standard platform and IIS.  There are no CFCs used
in the application.  All queries are used "inline"

Now for the interesting part.

Lets say the program is supposed to display a list of salesmen and their
sales for Jan, Feb & Mar

So in the program there is a header line to list what each column of the
display is.

Then the detail lines there are

<tr>
<td>query get salesman</td>
<td>query get salesman and jan figures</td> <td>query get salesman and feb
figures</td> <td>query get salesman and mar figures</td> </tr>

then a total line

So basically everytime a line is produced for a salesman then the queries
are run.  This to me seems would be one reason why the program takes a long
period of time to run.

Queries are being run multiple times which seems very inefficient.

Just wondering what others think.

Regards




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287483
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to