Stephen Richards wrote:
> Thanks for the tips Jochem.  But as I say, I know we can tidy the queries up
> and make them more efficient, but what I don;t know how to do is make CF not
> wait for one query to finish before starting to execute another.  No matter
> what I do to the queries, unless that is fixed we're storing up trouble for
> the future as usage increases.
> 
> One suggestion here was that it was the Unix Postgres ODBC driver that was
> single threaded, and therefore the bottleneck.  Do you have any views on
> that?

It is a possibility. top output would help. Also, you could try the 
following code:
<cftransaction>

<!--- Fake query --->
<cfquery datasource="test">
   SELECT 1;
</cfquery>

<!--- Introduce 10 seconds pauze --->
<cflock name="wait" timeout="12" type="readonly">
   <cflock name="wait" timeout="10" type="exclusive" throwontimeout="no">
   </cflock
</cflock>

<!--- Fake query --->
<cfquery datasource="test">
   SELECT 1;
</cfquery>

</cftransaction>

This will hold on to a connection for 10 seconds. In the mean time, run 
a simple "SELECT 1" in another template and see if that comes back 
before the connection is released.


> Can anyone say for sure that this problem would be solvd if we bought the
> Enterprise edition which has, I beleive, a native postgres driver?

Are you sure it has one? Testing MX & JDBC might be a better idea.

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to