Posted by Michael Austin on 02/17/06 20:03
'~=_Slawek_=~' wrote:
> I have problem with SQL update. Sometimes it can take 2-10 seconds. I need
> to make this update every time page is opened - ASYNCHRONOUSLY.
>
> I have read forums, php.net etc about running php code 'in background' after
> all data generated is received by user browser. However i cant simply use
> it. Nothing works for me, im on a paid server.
>
> I have checked the headers and all content my PHP outputs is zipped and send
> compressed by apache (content-length header filled automatically). Is there
> any way of running SQL query asynchronously to PHP script (so send query to
> SQL, query is placed in some buffer and function returns immediatelly?)
>
> TIA for help.
>
>
There are many places that an SQL update can get bogged down... to name a few:
000) poorly designed logical and/or physical database
001) poorly written update statements
make sure the column you are updating is NOT the column in an index.
010) Number of rows in a non-indexed lookup to do the update
011) Number of users concurrently updating the same site
(locking issues)
100) System/Disk/Network latencies
since it is a "paid" service you have no control over this.
And since you have not provided us with any code segments to look at everything
is just speculation.
--
Michael Austin.
DBA Consultant
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)
[Back to original message]
|