Very slow with php iis6

  • Hi there I'm having very slow php /mssql transactions. Here is an example

    http://areweontrak.com/tester.php

    You can see making a query of even 1 row takes between 1.5 and 2 seconds which

    is very long for a simple query. Has anyone had this problem before? Is there a way I could debug this? I have mssql server 2005 express, php5, ii6 installed.

    When i make the same query with sql management studio it performs like it is suppose to, nice and fast.

    Any help would be appreciated

  • anthony when i tested, i was getting sub-second query times around 0.700 secs or so according to your page;

    i guess we could help more if we saw the actual query being used; maybe it can be optimized, or is suffering from parameter sniffing or something.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Hi yup I'm also getting that now, but still do you think thats high for a simple query? Here is the query below. All I am doing is pulling 1 row and column from the Project table. Thanks for your reply

    $query= mssql_query('SELECT top 1 projectID from ontrak.Project');

  • times are now in the millisecond range:

    2 rows selected it took 0.002 seconds. select 1 row select no rows

    what did you change? add an index?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Hey actually I think i got it now this is what I did

    1. in php.ini changed output_buffering = 1

    2. changed my mssql_connect to mssql_pconnect

    Doing those 2 things really helped me out I'm down to about 0.005 now. Hope this helps somebody else having the same problem.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply