Let \(X\subseteq G/\mathcal {B}\) be a Schubert variety in a flag manifold and let \(\pi : \tilde{X} \rightarrow X\) be a Bott–Samelson resolution of X. In this paper, we prove an effective version of the decomposition theorem for the derived pushforward \(R \pi _{*} \mathbb {Q}_{\tilde{X}}\) . As a by-product, we obtain recursive procedure to extract Kazhdan–Lusztig polynomials from the polynomials introduced by Deodhar [7], which does not require prior knowledge of a minimal set. We also observe that any family of equivariant resolutions of Schubert varieties allows to define a new basis in the Hecke algebra and we show a way to compute the transition matrix, from the Kazhdan–Lusztig basis to the new one.