php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53000 MSSQL slow on large resultsets via Apache module
Submitted: 2010-10-06 11:49 UTC Modified: 2010-10-29 13:36 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: steven at aubergine-it dot nl Assigned:
Status: Closed Package: MSSQL related
PHP Version: 5.3.3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: steven at aubergine-it dot nl
New email:
PHP Version: OS:

 

 [2010-10-06 11:49 UTC] steven at aubergine-it dot nl
Description:
------------
Hi there,

After a lot of research I found a serious performance problem. I think the attached test script is self explaining.

So basically the performance is dramatically worse if I use PHP as module in comparison with the PHP cli. CentOS does not have a different php.ini for the Apache module and cli version.

I found a similar bug 28610, and I tried the proposed solution. But output buffering is already turned on.

*setup*
I use PHP 5.3.3, installed at CentOS via http://iuscommunity.org/. They use this configure line:
'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' 


Test script:
---------------
<?
require_once('../inc/TPInit.inc.php');


$sql = "SELECT TOP 10 * FROM productVersions WHERE subCategoryID = 8;";
benchmark('sql', 'start');
$result = mssql_query($sql);
echo 'Small result set <br/>' . "\n";
echo 'Rows in returnset: ' . mssql_num_rows($result) . '<br/>' . "\n";
echo 'Time: ' . benchmark('sql', 'show') . '<br/>' . "\n";


$sql = "SELECT * FROM productVersions WHERE subCategoryID = 8;";
benchmark('sql', 'start');
$result = mssql_query($sql);
echo 'Large result set <br/>' . "\n";
echo 'Rows in returnset: ' . mssql_num_rows($result) . '<br/>' . "\n";
echo 'Time: ' . benchmark('sql', 'show') . '<br/>' . "\n";


Expected result:
----------------
Small result set
  Rows in returnset: 10
  Time: 0.0054750442504883
Large result set
  Rows in returnset: 73782
  Time: 34.852993011475

Actual result:
--------------
Small result set
  Rows in returnset: 10
  Time: 0.0027780532836914
Large result set
  Rows in returnset: 73782
  Time: 0.45695114135742

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-29 13:33 UTC] steven at aubergine-it dot nl
Looks like the problem is solved. I think the reason is that debugging was turned on and there were some problems with the RAID array.

This bug can be CLOSED
 [2010-10-29 13:36 UTC] steven at aubergine-it dot nl
-Status: Open +Status: Closed
 [2010-10-29 13:36 UTC] steven at aubergine-it dot nl
See previous
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 05:05:53 2022 UTC