Personally, if I were to go on a shooting rampage at a school, I would be more worried about an on duty police officer on campus than the chance there is an armed teacher or two.
The officer is most likely more heavily armed, has body armor, has training in combat shooting, has instant communication to additional units, has other police related training, and has experience in stressful situations. On the other hand, even though I might not know how many armed teachers are present or who they are, an armed staffer isn't as likely to have the qualifications that the officer has. They likely wont have body armor or as many bullets. I think teachers are also less likely to have an elevated state of alert to look for suspicious signs where as a police officer is more likely to be at this state. I would wager that a female teacher would be more likely to try to protect her classroom because of the protective mother instinct than to venture out in the halls to locate an active shooter as compared to an officer who would go out and seek the target. (An officer wouldn't be attached to a particular room or group of students) An officer has his firearm within quick reach, a female teacher in a dress might likely keep the firearm stored in a purse or locked area not on her person. I would also wager that even if staff were allowed to CCW there probably wouldn't be that many that actually do. Any idea on how many people CCW in places where it is legal? Lets just hazard a guess of 2 - 4 % In a school with 50 staff you might end up with one or two armed staff. Even if it were more than just one or two teachers I would still take my chances against them than a police officer.
Perhaps you would like to explain with your vast intillect why you would fear a teacher who CCW so much more than a police officer?
Furthermore a lot of these individuals go into these mass shootings end up killing themselves so they clearly the fear of getting shot and dying is not their biggest of concern Thus I don't think it will be a big deterrant. CCW is great but we shouldn't treat it as this miracle cure all of crime.
While researching active shooters for a work project, I ran across the story of a School Resource Officer (SRO) I found very informative. He was involved with a kid that had been planning to shoot up his school but was alerted by another kid to the plan. The cops went to the shooter kid's house and found a series of well laid out plans. The first part of the plan was to shoot the SRO. This surprised the SRO and when he was able to talk to the kid, he asked him why he wanted to shoot him first. "Was it something I did" he asked the kid. "Did you think I treated you unfairly or badly" he asked. The kid replied that in fact he thought a lot of the SRO and that he had hoped the officer would not be at school that day because he really didn't want to shoot him. "Why, then, did you want to shoot me first" the SRO asked. "Because" the kid replied, "I knew that if you were at school and I started shooting you would be duty bound to try and stop me and I couldn't let you do that."
I also think you over estimate the training of police in general. Many only qualify with their service pistol once a year. Are there cops who shoot really well? Yes, but there are also cops who are not shooters and only the gun on their hip as another tool and the only practice they get are their annual (or semi-annual) qualifications.
The reason to "fear" an armed teacher more than an officer is exactly the reason I illustrated in the story above. If you're planning to shoot up a school that has an armed officer, you know who that officer is and will likely plan to take them out first or not storm the school when they are there. The shooter will not likely know which teachers are armed and therefore the armed teachers have the benefit of surprise. As for teachers not being alert to what's going on, I beg to differ. They are constantly responsible for the well being of many children. It is their job to be alert and ready to protect the kids, be it from a fire or an active shooter. Furthermore, most CCW holders train pretty well, knowing that proficiency with their firearm is critical to the primary goal of carrying a firearm in the first place: to protect them and their loved ones.
You know which state allows those with a CCW to carry at schools and has never had a school shooting? Utah. So sure, letting teachers carry won't be the "miracle cure" to prevent all school shootings, but as was pointed out by another poster (and as illustrated by the story above) these guys do plan out their attack and they do not want confrontations. They want to kill as many people as possible in as short as time as possible so that they can go down in historical infamy. Gun free zones embolden these guys. Allowing CCW in schools would give the shooters pause, knowing that there was possibly someone there that could prevent them from completing their grisly task and gaining the notoriety that they so desperately desire.