Status/Resolution/Reason: Closed/Won't Fix/
Reporter/Name(from Bugbase): Travis Walters / Travis Walters (Travis Walters)
Created: 03/09/2016
Components: Security Analyzer
Versions: 2016
Failure Type: Unspecified
Found In Build/Fixed In Build: Alpha_v31 /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Win All
Vote Count: 0
I love the "Security Analyzer" and it sort of gave me an idea for a new feature in Blizzard - a "CFQuery Analyzer" to find common performance pitfalls.
#1 - I have seen some inexperienced ColdFusion programming code where the programmer used SELECT * instead of selecting only the columns that are actually needed. The analyzer could return chunks of code (page name, line number, cfquery name) where there are SELECT * statements.
#2 - We could encourage programmers to use the "maxrows" parameter in cfquery statements instead of SELECT TOP 100 or other database dependent row-limiting operations.
#3 - It is already in the "Security Analyzer" but if the programmer is not using cfqueryparam and should be, show a warning here as well.
#4 - If a server is defined in Blizzard, perhaps Bilzzard could interact with the server and the cfdbinfo tag to analyze the tables being used in those cfquery statements. Check to see if there is a primary key, indexes, etc defined.
#5 - If a cfquery is found that includes sql in the form of update or insert into and the cfquery is within some sort of cfloop, then perhaps there is a way to update multiple records at once, etc
#6 - Check to make sure cfquery tag sql statements use table names (and perhaps even schemas) along with the column names like select schema.table.column1 from schema.table, etc
I am sure there are other ways to improve cfquery performance and usage so please feel free to add on.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4126711
External Customer Info:
External Company:
External Customer Name: Travis Walters
External Customer Email: TWALTERS84@HOTMAIL.COM
External Test Config:
Attachments:
Comments: