A fully normalized database with no redundant data is good "academically", but has terrible real-world performance.
The first optimization is obviously a cache system. After this, for creating redundant data for performance, when or why would (or wouldn't) you use triggers over a cron task that calls a script to update the redundant dat...
something like:
CREATE TRIGGER
schema1.triggername
AFTER INSERT ON schema2.table
FOR EACH ROW
BEGIN
;
END;
ERROR 1435 (HY000): Trigger in wrong schema
...
I have successfully created an insert before trigger on a table using the innodb engine which "throws" an error by performing an insert on a non-existent table. The problem is that as I try to run the database create script on the production server it fails because the insert table does not exist. However, the same script runs fine on my...
I have the following table and trigger but the trigger isn't setting the create_dt value to now() on the insert event:
CREATE TABLE `user` (
`user_id` int(10) NOT NULL auto_increment,
`user_name` varchar(255) NOT NULL default '',
`password` varchar(255) NOT NULL default '',
`first_name` varchar(255) NOT NULL default '',
`last_...
So I have an external script that will sometimes input something into a sql database throughout the day (usually about 3 times a day, but could potentially update ever minute) I need to find a way to make the html page (that displays the sql entries) refresh automatically when there is a new entry that's added. Any suggestions for PHP an...