Well, I haven't tested anything, but it looks like you
basically grab an XML file (not sure how it is generated) then put
the data into a query object by looping it. If there are 1000 lines
of data then your query object will be 1000 lines (of course). Then
your invoking a function passing the query object as an argument.
The function then seems to grab any data that has the last name of
Smith. You are getting all of the columns with * but only getting
two records for smith because your WHERE clause is filtering it. So
in a word, YES, the query only returns / gets two records based on
your criteria. If you didn't have the WHERE clause I imagine it
would get everything (1000).
Basically, your code grabs a file with 1000 lines and then
puts this into a query object. All your CFC does is grab a subset
of this data using SQL. Your query object is still 1000 lines
though. The query will be fast, but if you're getting performance
issues, it will be because of the XML files size itself.
Mikey.