April 27, 2010 at 10:48 am
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
April 27, 2010 at 10:57 am
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
April 27, 2010 at 11:00 am
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');
April 27, 2010 at 11:36 am
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
April 27, 2010 at 11:40 am
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
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy