Active database systems provide facilities that monitor and respond to changes of relevance to the database. Active behaviour is normally described using Event Condition Action rules (ECA-rules), and a number of systems have been developed, based upon different data models, that support such rules. However, experience using active databases shows that while such systems are powerful and potentially useful in many applications, they are hard to program and liable to exhibit poor performance at runtime. This document addresses both of these issues by examining both analysis and optimization of active rules in the context of a powerful active database system. It is shown how rule analysis methods developed for straightforward active rule languages for relational data models can be extended to take account of rich event description languages and more powerful execution models. It is also shown how the results of analyses can be exploited by rule optimizers, and that multiple query optimization can be applied in a range of circumstances to eliminate duplicated work during rule processing.