speed up; add sql triggers; add archive tables