Bug #81564 [Opn->Fbk]: Extreme ODBC performance degradation after Windows PHP 7.3 to 7.4 upgrade
Edit report at https://bugs.php.net/bug.php?id=81564&edit=1
ID: 81564
Updated by: cmb@php.net
Reported by: ckieffer at gmail dot com
Summary: Extreme ODBC performance degradation after Windows
PHP 7.3 to 7.4 upgrade
-Status: Open
+Status: Feedback
Type: Bug
Package: ODBC related
Operating System: Windows Server 2019
PHP Version: 7.4.25
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> I may have to rewrite to use PDO or migrate to a DB stored
> procedure but I'd like to understand the cause.
Me too! Maybe you can try with some PHP 7.4.x from the archives[1]
to narrow down the exact version where the performance regression
has been introduced?
Anyhow, you should consider to use sqlsrv[2] or pdo_sqlsrv[3]
instead of the general ODBC or PDO_ODBC extensions when dealing
with SQLServer.
[1] <https://windows.php.net/downloads/releases/archives/>
[2] <http://pecl.php.net/sqlsrv>
[3] <https://pecl.php.net/pdo_sqlsrv>
Previous Comments:
------------------------------------------------------------------------
[2021-10-28 23:00:28] ckieffer at gmail dot com
Description:
------------
Have a batch processing PHP script that runs thousands of individual odbc_exec() SELECTS and INSERTS
against a SQL Server 2019 database. After upgrade from PHP 7.3 to 7.4 the process runs 7x slower (20
minutes before upgrade, 180 minutes after). This process maps lots of relatively small database
records (no big nvarchar fields, etc).
I haven't found any similar problem/bug reports. The process does complete eventually, so I
understand that this isn't necessarily a bug. I may have to rewrite to use PDO or migrate to a
DB stored procedure but I'd like to understand the cause.
Environment and Testing Notes
System: Windows NT 10.0 build 17763 (Windows Server 2016) AMD64
Configure: cscript /nologo /e:jscript configure.js "--enable-snapshot-build"
"--enable-debug-pack"
"--with-pdo-oci=c:\php-snap-build\deps_aux\oracle\x64\instantclient_12_1\sdk,shared"
"--with-oci8-12c=c:\php-snap-build\deps_aux\oracle\x64\instantclient_12_1\sdk,shared"
"--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared"
"--without-analyzer" "--with-pgo"
- All 64-bit software and drivers.
- Upgraded precompiled PHP 7.3.32 (TS VC15) for Windows to 7.4.25. Also tried PHP 8.0 which is just
as slow.
- Windows Server 2019 web and SQL Servers (no change during upgrade).
- Stock PHP ODBC extension config (no change during upgrade).
- Recent MS ODBC driver for SQL Server. Tried updating to latest available (17.8.11).
Expected result:
----------------
This script completes in about 25 minutes under PHP 7.2.x and 7.3.x.
Actual result:
--------------
After upgrade to PHP 7.4.24, the script takes over 3 hours to complete.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81564&edit=1
Thread (4 messages)