Hey CF Guys,
I have executed a query with CFQuery Tag and then with CF Java
classes. Below is the matrix for performance.
I have executed query for 14 times, Average time for query is as
below.
---With CFQuery Tag = 748.714
--- With Java Classes = 769.14
But the good thing about executing query with Java Objects, It tooks
more seconds for initial 4-5 times and after that it was taking less
time than CFQuery tag.
I want to know your thoughts for this.
-------------- Code ----
<cfset dsn=#application.dsn#>
<cfset value= 1326231>
<!--- executing query with <cfquery> Tag ---->
<cfset tickBegin = GetTickCount()>
<cfquery name="q" datasource="#dsn#">
{CALL myStoredProc (
<cfqueryPARAM value = "#value#" CFSQLType =
"CF_SQL_INTEGER">
)
}
</cfquery>
<cfset tickEnd = GetTickCount()>
<cfset QueryTime = tickEnd - tickBegin>
<cfoutput>
QueryTime : #QueryTime#
</cfoutput>
<br />
---------------------------------------------------------------- <br /
>
<!--- executing query with Java object ---->
<cfset sqlst="">
<cfset sqlst= sqlst & "exec Get_Patient_Header ">
<cfset sqlst= sqlst & "" & value & "">
<cfset tickBegin = GetTickCount()>
<cfscript>
objResults2 = CreateObject(
"java",
"coldfusion.sql.QueryTable"
).Init(
CreateObject(
"java",
"coldfusion.server.ServiceFactory"
).DataSourceService.GetDataSource(
"DSN_DEV"
).GetConnection().PrepareStatement( sqlst).ExecuteQuery()
);
</cfscript>
<cfset tickEnd = GetTickCount()>
<cfset QueryTime = tickEnd - tickBegin>
<cfoutput>
QueryTime : #QueryTime#
</cfoutput>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CFCDev" 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/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---