RE: [PHP] Expert advice needed

From: Date: Tue, 10 Jul 2001 00:51:12 +0000
Subject: RE: [PHP] Expert advice needed
Groups: php.general 
Request: Send a blank email to php-general+get-57044@lists.php.net to get a copy of this message
To prevent locking issues and general db clogging. Any table that stores votes or hits or anything that may do several transactions / second... INSERT the data into a temporary table, and then put in a cron job which will UPDATE your actual table with a count of whats in your temp table. So for instance. hit.php should execute INSERT INTO hits_temp VALUES ('/index.html'); or better yet an index of the page, make sure to have a table that explains what page #1 is INSERT INTO hits_temp VALUES (1); then make a cron job which does $hits = SELECT count(hits) FROM hits_temp WHERE page = 1; UPDATE hits SET hit_count = hit_count + $hits WHERE page = 1; This became life of death for our Sun 250 when it tried sustaining 6-8 updates / second on a bit more complicated table. Oracle just seized up, 150 processes got in waiting behind it and then denied connections until it was restarted. - Russ -----Original Message----- From: SED [mailto:sed@sed.is] Sent: Monday, July 09, 2001 5:44 PM To: php-general@lists.php.net Subject: [PHP] Expert advice needed Hi, I'm doing a polling side and I'm wandering what way I should save the result, should I save each record in MySQL or should I save only the total value in a text file each time I get vote? So, can anyone of you experts advice me what way I should go? The traffic is only 100-500 hits per day. Regards, Sumarlidi Einar Dadason SED - Graphic Design ------------------------------------------ Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: sed@sed.is Homepage: www.sed.is ------------------------------------------ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#57044) next »