Title:
Bug 86824:(Watson Migration Closure)Even very simple querys take a large performance hit (x2 up to x10 times longer to execute) using the Query CFC rather than CFQUERY, basically meaning they can't be used for any frequently accessed si
| View in TrackerStatus/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): Tom Chiverton / Tom Chiverton (Tom Chiverton)
Created: 04/12/2011
Components: Language, CF Component
Versions: 9.0.1
Failure Type: Unspecified
Found In Build/Fixed In Build: 274733 /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Win All
Vote Count: 1
Problem:
Even very simple querys take a large performance hit (x2 up to x10 times longer to execute) using the Query CFC rather than CFQUERY, basically meaning they can't be used for any frequently accessed site areas.
Method:
For example, this simple count and to table join:select count(distinct r.oid) as count from r,o where r.oid = o.id and r.id = ? and o.date > ? and source != 'Test' takes 16ms in CFQUERY tag, but 1.1 *seconds* via the Query CFC. It's *hughly* depdant on the input string format as well. If the SQL string argument to setSQL() is built on one single line (var sql='....'; some performance is regained, but the code is now very hard to read., where as sql ="select count(distinct r.oid) as count from r,o where r.oid = o.id and ";sql&='r.id = :id and ';sql&="o.date > :date ";sql&="and source != 'Test' ";The bottle kneck appears to be the execute() method. The string processing the CFC does could be eliminated if, for instance, Query CFC was built into CF and went directly to bytecode rather than wraping CFQUERY.
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3043735
External Customer Info:
External Company:
External Customer Name: Tom Chiverton
External Customer Email: 179928BE4459CA459920157F
External Test Config: 04/12/2011
Attachments:
Comments: