I have a PHP page that's slow whenever it goes to query a MSSQL database. I'm using the latest PHP and the standard SQL odbc drivers to the connect to the database. When accessing the page My sql profiler goes crazy.The query is displayed then
exec sp_cursorfetch 180150003,2,1,1
go
performs about 240 times before finally
exec sp_cursorclose 180150003
go
occurs and the page is displayed.

This is the query causing the headache:
<?php
$con = odbc_connect('Hesk','Trace_user','*******');
$Assets = odbc_exec($con, "SELECT AssetName, AssetID From viewAssets ORDER BY [AssetName];");
?>
<table Border ="0" width="100%">
<tr>
<td style="text-align:right" width="150"><?php echo $hesklang ['asset']; ?>: <font class="important"></font>
</td>
<td width = "80%"><select name ="asset">
<option value=""></option>
<?php
while ($row = odbc_fetch_array($Assets))
{
echo '<option value="' . $row['AssetID'] . '"' . (($_SESSION['c_asset'] == $row['AssetID']) ? ' selected="selected"' : '')
. '>' . $row['AssetName']. '</option>';
}
odbc_close($con);
?>
</select></td>
</tr>
</table>
Any idea how my code is causing this performance holdup?