Let Λ be a finite-dimensional algebra over an algebraically closed field k. The category of (finite length) Λ-modules is denoted by mod Λ. We denote by D b (Λ) the bounded derived category of complexes over modΛ. We say that Λ is piecewise hereditary of type H if there exists a hereditary abelian category H such that D b (Λ) is triangle-equivalent to the bounded derived category D b (H) of complexes over H. It is easily seen that for all X, Y ∈ H, Hom H (X, Y) and Ext 1 H (X, Y) are k-vector spaces which are finite-dimensional over k and the composition is bilinear over k. We refer to these as the basic properties of H. The type of Λ is of course only defined up to derived equivalence. This class of algebras has been previously studied in several articles (compare for example [H1], [HRS2], [HR2] and the references in those). The aim of this note is to show that results in [HR1] and previous results on Hochschild cohomology [H2] allow the computation of the Hochschild cohomology of piecewise hereditary algebras, and to apply these results to show that certain hereditary categories will not admit a tilting complex whose endomorphism algebra is representation-finite. This gives an alternative proof of results previously established by Meltzer [M]. In the first section we recall some of the relevant properties of piecewise hereditary algebras. The second section contains the computations of the Hochschild cohomology and some consequences.