Browser freeze - How to handle or optimize 50,000 rows in one HTML select element more than several times? I have an increasing table which already has records of 50,000+. 
So in a combo box I have to load it, so that it shows which one is selected and its a main record which need to be selected and based on that it spread other relational records. But when I load it the whole web browser freeze.

How do you handle it?

My controllers:

$sql = "select name,name from countryCity";
$secondResult = $this-&gt;db-&gt;fetchPairs($sql);
$this-&gt;view-&gt;selectitems = array(''=&gt;'') + $secondResult;


My view file:

&lt;?for($i=0; $i&lt;10; $i++):?&gt;
&lt;?=$this-&gt;formSelect("a", 
                     "select one", 
                     array('class'=&gt;'largetosmall'),
                     $this-&gt;selectitems)?&gt;

&lt;?endfor;?&gt;


Output:

&lt;select class=largetosmall id=a&gt;
 &lt;option&gt;...&lt;/option&gt;
 &lt;option&gt;50,000+++... records&lt;/option&gt;
&lt;/select&gt;


More than 10 times I have a huge select element in one page. Never working.
50k is simply too many for a drop-down list. Use AJAX-based autocomplete input boxes or split the list to smaller parts, for example by state. I think the users also don't like it, it's really hard to scroll or search in a so huge drop-down list.