Quantcast
Channel: Microsoft Drivers for PHP for SQL Server forum
Viewing all articles
Browse latest Browse all 391

Best way to handle large result set (+400 000 rows)

$
0
0

Hi,

I started to migrate our old components from the old php_mssql.dll driver to SQLSRV 3.

I've a lot of large result set (~400 000 rows output to CSV file). With the old driver I was using the batch_size parameter of mssql_query function to improve the query speed. This procedure takes 49s with the old driver.

With the new driver, this parameter is not available anymore. I tried both PDO and non-PDO versions and here are my conclusion. The faster way to get my 400 000 rows is to prepare, execute and fetch my rows as object (using the default stdClass). It takes approximately 52 second.

Am I right ? Is there any better solution to improve speed ? is there any hidden parameter to improve speed ?  (buffer size or something else)



Viewing all articles
Browse latest Browse all 391

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>