Depending on what you're expecting you can code around it.

 

For example if you have an instance at the session level there are no
issues. As a user will only be executing one execute at a time.

 

Plus if you wanted doing it in a cfc means you could cache queries and do
all sorts of other stuff.

 

So I think long term an investment in an object model would be of benefit.

 

Regards
Dale Fraser

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Monday, 29 January 2007 7:26 PM
To: [email protected]
Subject: [cfaussie] Re: putting queries in cfcs or not....

 

Hi Dale,

 

That looks good, but how would that work with race conditions?

 

On 1/29/07, Dale Fraser <[EMAIL PROTECTED]> wrote: 

You could try it, but your probably right creating a new instance every time
might be slower.

 

However if you create an instance of the SQL object at application level,
this might be even quicker than inline as it's already in the server's
memory. 

 

<cfset application.sql = createObject('component', 'com.company.sql.Sql') />

 

 

Then from any page you could do something like

 

<cfset resultQuery = application.sql.executeSp('spName') />

 

etc

 

Regards
Dale Fraser

 

  _____  

From: [email protected] [mailto: <mailto:[email protected]>
[EMAIL PROTECTED] On Behalf Of Taco Fleur
Sent: Monday, 29 January 2007 6:18 PM
To: [email protected]
Subject: [cfaussie] putting queries in cfcs or not.... 

 

We are working on an application that will receive high traffic.

 

All queries are Stored Procedures (MS SQL 2005) and I was thinking of
putting all the calls to those SPs in a CFC, only to keep all the SQL in one
place. But since I am more concerned about speed than anything else, I am
thinking this might not be the best way to go. 

 

I am leaning more towards putting the calls to the stored procedures inline
the code now. Any input on this is much appreciated.

-- 
Taco Fleur - http://www.pacificfox.com.au <http://www.pacificfox.com.au/>  
Web Design, Web development, Graphic Design and Complete Internet Solutions 
an industry leader with commercial IT experience since 1994 . 

 


http://www.pacificfox.com.au 
Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 . 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to