I have an issue with my dropdown field that is populated dynamically by a large query. Since the query returns a very large value when users access the form the form freezes. It's like it's waiting for the dropdown to be populated. In the meantime all the form formatting gets messed up, the dropdown disappear. When I limit my query to a smaller number of records everything is working just fine. This query returns over 26K records. Is there a work around to fix this issue in ColdFusion? I don't believe ColdFusion cannot handle this type of situation. I'm using ColdFusion2016 and back-end Oracle 11g.
Here is the query and the dropdown:
<cfquery name="xCodes" datasource="#application.DSN#">
select xcode, desc, xcode || ' ---- ' || desc as FullDesc
from x_header
<cfif IsDefined("url.codes")>
<cfif url.codes EQ "y">
order by xcode
<cfelse>
order by desc
</cfif>
</cfif>
</cfquery>
<select name="xcode" id="xcode" class="RegSelect" required="TRUE">
<option value="">--- Select a code ---</option>
<cfoutput query="xCodes">
<option value="#xcode#">#FullDesc#</option>
</cfoutput>
</select>