When is Closed World Reasoning Tractable?