Posted by Jerry Stuckle on 02/18/06 04:16
'~=_Slawek_=~' wrote:
> Hello Michael.
>
> Thanks for thinking over my problem. Your 4. assumption is right i cant tell
> all other are wrong but I think they are. For my code:
>
> mysql_query("UPDATE liczniki SET value=value+1 WHERE
> owner_id='".$this->get_user_id()."' AND
> owner_licznik_number='$owner_licznik_number'");
>
> It takes 80ms to a couple of seconds, on shared hosting with DB overloaded
> by other users (I assume some kind of write behind caching is responsible
> for that). Table size is for now 100 records.
>
> For table structure:
> FIELD::TYPE::NULL::KEY::DEFAULT
> id::int(10) unsigned::::PRI::NULL::auto_increment
> owner_id::int(10) unsigned::YES::MUL::NULL::
> owner_user::varchar(255)::YES::MUL::NULL::
> owner_licznik_number::int(11) unsigned::::MUL::0::
> value::int(10) unsigned::::::0::
> type::enum('inny','online','wyswietlen','odwiedzin')::::::inny::
> sub_type::enum('tekstowy','graficzny')::::::tekstowy::
> style::blob::YES::::NULL::
> settings::blob::YES::::NULL::
> last_updated::timestamp::YES::::0000-00-00 00
>
> TIA.
>
>
>
Sounds like it may be time to find another host which doesn't overload
their servers like this. A simple update for 100 records shouldn't take
anywhere near 2 seconds.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|