Before revision:  A seminal result of Grohe, Schwentick, and Segoufin (STOC 2004 ) demonstrates that when restricted to graphs, a class of conjunctive queries can be evaluated in polynomial time if and only if it has bounded treewidth.
After revision:  A seminal result of Grohe, Schwentick, and Segoufin (STOC 2004 ) demonstrates that when restricted to graphs, a class of conjunctive queries can be evaluated in polynomial time if and only if , G has bounded treewidth.